Issue
I am trying to build MAGMA from Windows 10 but it's not working. I downloaded the project MAGMA from here rel="nofollow noreferrer">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"
Solution
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.
Answered By - TonyM Answer Checked By - David Goodson (WPSolving Volunteer)