Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28459 Discussions

Unable to build using CMake and Intel Fortran

andy_112
Beginner
2,362 Views

I am trying to build an application called 'eccodes' produced by an organisation called 'ECMWF'. 

I have CMake (version 3.19), Visual Studio 2019 Community edition (version 16.9.3) installed and Parallel Studio XE 2020 (version 19.1.0).

I installed the Visual Studio and then the Parallel Studio XE. After installing I ran:

psxevars.bat ia32

To do the build in the command prompt I first go to:

C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2020.0.075\compilers_and_libraries_2020\windows\bin

And run:

ipsxe-comp-vars.bat ia32

 

Then I run the following:

cmake -DBASH_EXE=C:/PATH_TO_BASH.EXE/                    C:/PATH_TO_ECCODES/eccodes                  -DCMAKE_Fortran_COMPILER="C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.0.166/windows/bin/intel64_ia32/ifort"

I get:

 

-- Detecting Fortran compiler ABI info - failed

-- Check for working Fortran Compiler: C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.0.166/windows/bin/intel64_ia32/ifort.exe - broken

CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeTestFortranCompiler.cmake:51 (message):

The Fortran compiler

"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.0.166/windows/bin/intel64_ia32/ifort.exe"

is not able to compile a simple test program.

Labels (2)
0 Kudos
3 Replies
Steve_Lionel
Honored Contributor III
2,326 Views

Unfortunately, none of us have any idea what this script is testing to determine whether the compiler is available or "broken". You will have to dig into the script to see what it is doing, reproduce the test and look at the result. If you can show us error messages from the compilation or linkage process itself,. we MIGHT be able to offer advice.

0 Kudos
FortranFan
Honored Contributor II
2,323 Views

@andy_112 ,

You may want to ask about this at the Fortran Discourse site - see this following there:

https://fortran-lang.discourse.group/t/why-should-i-use-cmake/953/9

 

0 Kudos
JohnNichols
Valued Contributor III
2,320 Views

I was installing oneapi on a computer yesterday.  The new Fortran Intel compiler, it had a section on the install guides on using cmake.  

0 Kudos
Reply