Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
27783 Discussions

Unable to build using CMake and Intel Fortran

andy_112
Beginner
1,152 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
Black Belt Retired Employee
1,116 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.

FortranFan
Honored Contributor II
1,113 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

 

JohnNichols
Valued Contributor II
1,110 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.  

Reply