1

I am trying to build MAGMA from Windows 10 but it's not working. I downloaded the project MAGMA from here http://icl.utk.edu/projectsfiles/magma/downloads/magma-2.6.2.tar.gz. I downloaded and installed Intel's One API compilers and MKL. I'm taking the following step as part of my command line setup:

> call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
> :: I do this extra because CMake complains that doesn't find the dpcpp and ifort compilers in the PATH.
> set "PATH=%PATH%;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin"
> set "PATH=%PATH%;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\intel64"

in MAGMA project extracted folder I do the typical:

> mkdir build
> cd build
> cmake -DCMAKE_CXX_COMPILER=dpcpp -DCMAKE_Fortran_COMPILER=ifort ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- The Fortran compiler identification is unknown
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:9 (project):
  The CMAKE_Fortran_COMPILER:

    ifort

  is not a full path and was not found in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Dev/Opt/magma/2.6.2/build/CMakeFiles/CMakeOutput.log".
See also "C:/Dev/Opt/magma/2.6.2/build/CMakeFiles/CMakeError.log".

UPDATE as shown below, the newest One API C++ compiler dpcpp and ifort are both available in the command line and %PATH% where CMake is run from:

C:\>dpcpp --version
Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm

C:\>ifort --version
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.

ifort: command line warning #10006: ignoring unknown option '/-version'
ifort: command line error: no files specified; for help type "ifort /help"
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
  • 4
    Before you run cmake does running `ifort` on the command line work? If not you'll need to make sure that's available on the path – Alan Birtles Jul 12 '22 at 21:12

1 Answers1

2

I'm guessing you're running a version of CMake > 3.0? CMake doesn't necessarily honor the environment paths correctly as it is doing its lookups.

I tried installing 2.8.12.2 (the version recommended by the author) and it seems to build fine.

I also tried with the latest 3.x version (3.22.x) and I see the same error as you do. Rather than try to fix up the CMake file, it might be quicker to just downgrade CMake 2.8.12.x.

TonyM
  • 366
  • 1
  • 4
  • Indeed, I'm running the latest 3.24.0-rc3 as of two weeks ago :( – SkyWalker Jul 24 '22 at 17:48
  • Thanks a lot! your solution actually solves that issue but then I run into other problems such as not being able to run my full build because other dependencies e.g. GoogleTest etc. require CMake >3.5. – SkyWalker Jul 25 '22 at 09:15
  • Is there a fix from Intel to overcome this issue of not finding the different compilers? – SkyWalker Jul 25 '22 at 09:17
  • 1
    I'll have to double check, the issue I believe is more with how the Magma CMake is calling ifort vs something in the ifort Cmake configuration. It actually might be easier to fix there, although then likely that breaks other parts of their toolchain if they depend on < 2.8.x. It might make sense to reach out to their maintainers to see if they can update to a more recent version of Magma. All that being said, I'll try to follow up on this around how Intel is supporting multiple version of Cmake – TonyM Jul 25 '22 at 15:12