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

Using intel Fortran compiler with cmake

Sili_L_
Beginner
1,772 Views

I what to compile a software which use cmake as build system. The project is written in c++, but it need a Fortran compiler. I choosed the intel compiler.

While running cmake, it failed. Here is the error message in CMakeError.log:

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/bin/intel64/fortcom.exe
Build flags:
Id flags: -v

 

The output was:
3
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 17.0 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.
010101_0

Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.

It seems the Intel Fortran Compiler crashed internally without any useful error message. Trying to compile that source file manually with

fortcom.exe -fpp CMakeFortranCompilerId.F

leaves similar result. Do you have any suggestion? Thanks.

Update: I am very sorry. I used "fortcom.exe" directly instead of "ifort.exe". After I change the compiler to "ifort.exe", the problem solved.

My envirnment:

OS: Windows 7

C++ Compiler: Microsoft Visual C++ Compiler 14.0 (amd64)

0 Kudos
5 Replies
mecej4
Honored Contributor III
1,772 Views

Please post the source code in the file CMakeFortranCompilerId.F. If it turns out that the ICE does not occur with an version of the Fortran, compiler, you may consider a work-around to use with the 17.0 compiler or see if you need to revert to an earlier version.

0 Kudos
Arjen_Markus
Honored Contributor I
1,772 Views

This is more a question for the CMake mailing list, but I can assure you that CMake usually works fine with the Intel Fortran compiler. That does not solve your problem of course, merely indicates that there is a solution.

The C compiler you use seems to be a trifle old. Should not be the cause though.

Please follow mecej4's advice - it can be a bit tedious to find the exact source file.

 

0 Kudos
mecej4
Honored Contributor III
1,771 Views

It is likely that the source file in question is one that Cmake uses to find the version number of the Fortran compiler. Such utilities often employ tricks that worked with previous versions of the compiler but fail when a new version comes out.

0 Kudos
Steven_L_Intel1
Employee
1,772 Views

An internal compiler failure is always a compiler bug. Please provide the source file in question (CMakeFortranCompilerId.F) and also tell us what compiler options were used (in particular any preprocessor definitions).

0 Kudos
amine_b_1
Beginner
1,772 Views
This comment has been moved to its own thread
0 Kudos
Reply