[CMake] Intel fortran compiler, cmake and windows more info

Alin M Elena alin.elena at qub.ac.uk
Fri Nov 30 05:23:21 EST 2007


Hi 

Coming back with more info.
Thank Danny and Arjen for the replies.

The compiler is set correctly for my shell environment.
I can reproduce the problem in both cmd.exe and PowerShell.
I can produce executables using ifort by hand not with cmake.
Here it is the verbose output of the compiler for a working case and the
wrong case.
The first difference that I saw is that include information is different.

I will not have time to continue looking into it for few days, maybe someone
else will do it by then

Alin

working output

PS C:\Users\Alin M Elena\testFortran> ifort /watch:cmd /o a test.f90
Intel(R) Visual Fortran Compiler for applications running on IA-32, Version
10.1    Build 20070913 Package ID: w_fc_p_10
.1.011
Copyright (C) 1985-2007 Intel Corporation.  All rights reserved.

C:\PROGRA~1\Intel\Compiler\Fortran\101~1.011\Ia32\Bin\fortcom  \
    -D__INTEL_COMPILER=1010 \
    -D_MT \
    -D_M_IX86=700 \
    -D_WIN32 \
    -D__INTEL_COMPILER_BUILD_DATE=20070913 \
    -mGLOB_pack_sort_init_list \
    -I. \
    "-IC:\Program Files\Intel\MKL\10.0.012\include" \
    "-IC:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE" \
    "-IC:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE" \
    "-IC:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include" \
    "-IC:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include" \
    "-IC:\Program Files\Intel\Compiler\Fortran\10.1.011\Ia32\Include" \
    "-IC:\Program Files\Intel\Compiler\C++\10.1.011\Ia32\Include" \
    "-fp_modspec fp_speculation_FAST" \
    -O2 \
    -mP1OPT_version=1010 \
    -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 \
    -mGLOB_tune_for_fort \
    -mGLOB_use_fort_dope_vector \
    -mP2OPT_static_promotion \
    -mP1OPT_print_version=FALSE \
    -mP3OPT_use_mspp_call_convention \
    "-mGLOB_options_string=-Qvc8 -Qlocation,link,C:\Program Files\Microsoft
Visual Studio 8\VC\Bin -watch:cmd -o a" \
    -mGLOB_cxx_limited_range=FALSE \
    -mGLOB_diag_file=test.diag \
    -mP3OPT_defaultlibs_omit=FALSE \
    -mP3OPT_defaultlibs=P3OPT_DEFAULTLIBS_STATIC_MULTITHREAD \
    -mP3OPT_defaultlibs_select=P3OPT_DEFAULTLIBS_SELECT_F90_IVF \
    -mP3OPT_defaultlibs_f90_port \
    -mP1OPT_check_stack \
    -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE \
    -mGLOB_fp_speculation=GLOB_FP_SPECULATION_FAST \
    -mP2OPT_gen_read_only_strings=TRUE \
    -mP2OPT_subs_out_of_bound=FALSE \
    -mGLOB_ansi_alias \
    -mIPOPT_ninl_user_level=2 \
    -mIPOPT_activate \
    -mIPOPT_lite \
    -mP2OPT_hlo_level=2 \
    -mP2OPT_hlo \
    -mPAROPT_par_report=1 \
    -mGLOB_split_functions=1 \
    -mIPOPT_obj_output_file_name=test.obj \
    -mGLOB_os_target=GLOB_OS_TARGET_WINNT \
    -mP3OPT_asm_target=P3OPT_ASM_TARGET_MASM5 \
    -mP3OPT_obj_target=P3OPT_OBJ_TARGET_NTCOFF \
    -mP3OPT_enable_safeseh=TRUE \
    -mGLOB_obj_output_file=test.obj \
    -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN \
    -mP1OPT_source_file_name=test.f90 \
    test.f90

C:\Program Files\Microsoft Visual Studio 8\VC\Bin\link  \
    -out:a.exe \
    -subsystem:console \
    test.obj

Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:a.exe
-subsystem:console
test.obj
del C:\Users\ALINME~1\AppData\Local\Temp\48282arg

del C:\Users\ALINME~1\AppData\Local\Temp\48283arg

PS C:\Users\Alin M Elena\testFortran>

PS C:\Users\Alin M Elena\testFortran> ./a.exe
 hello world

this fails

PS C:\Users\Alin M Elena\testFortran> $env:FFLAGS="/watch:cmd"
PS C:\Users\Alin M Elena\testFortran> cmake .
-- Check for working Fortran compiler: C:/Program
Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe
-- Check for working Fortran compiler: C:/Program
Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe -- broken
CMake Error: The Fortran compiler "C:/Program
Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe" is not able to
compile a simple test program.
It fails with the following output:

Microsoft (R) Visual Studio Version 8.0.50727.867.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
1>------ Build started: Project: cmTryCompileExec, Configuration: Debug
Win32 ------
1>Building Fortran object testFortranCompiler.obj
1>C:\PROGRA~1\Intel\Compiler\Fortran\101~1.011\IA32\Bin\fortcom  \
1>    -D__INTEL_COMPILER=1010 \
1>    -D_MT \
1>    -D_M_IX86=700 \
1>    -D_WIN32 \
1>    -D__INTEL_COMPILER_BUILD_DATE=20070913 \
1>    -mGLOB_pack_sort_init_list \
1>    "-IC:\Users\Alin M Elena\testFortran\CMakeFiles\CMakeTmp" \
1>    -I. \
1>    "-IC:\Program Files\Microsoft Visual Studio 8\VC\include" \
1>    "-IC:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include" \
1>    "-IC:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include"
\
1>    "-IC:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include" \
1>    "-fp_modspec fp_speculation_FAST" \
1>    -O2 \
1>    "-warn general" \
1>    -mP1OPT_version=1010 \
1>    -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 \
1>    -mGLOB_tune_for_fort \
1>    -mGLOB_use_fort_dope_vector \
1>    -mP2OPT_static_promotion \
1>    -mP1OPT_print_version=FALSE \
1>    -mP3OPT_use_mspp_call_convention \
1>    "-mGLOB_options_string=-Qvc8 -Qlocation,link,C:\Program
Files\Microsoft Visual Studio 8\VC\Bin -nologo -FotestFortranCompiler.obj
-watch:cmd -W1 -c" \
1>    -mGLOB_cxx_limited_range=FALSE \
1>    -mGLOB_diag_file=testFortranCompiler.diag \
1>    -mP3OPT_defaultlibs_omit=FALSE \
1>    -mP3OPT_defaultlibs=P3OPT_DEFAULTLIBS_STATIC_MULTITHREAD \
1>    -mP3OPT_defaultlibs_select=P3OPT_DEFAULTLIBS_SELECT_F90_IVF \
1>    -mP3OPT_defaultlibs_f90_port \
1>    -mP1OPT_check_stack \
1>    -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE \
1>    -mGLOB_fp_speculation=GLOB_FP_SPECULATION_FAST \
1>    -mP2OPT_gen_read_only_strings=TRUE \
1>    -mP2OPT_subs_out_of_bound=FALSE \
1>    -mGLOB_ansi_alias \
1>    -mIPOPT_ninl_user_level=2 \
1>    -mIPOPT_activate \
1>    -mIPOPT_lite \
1>    -mP2OPT_hlo_level=2 \
1>    -mP2OPT_hlo \
1>    -mPAROPT_par_report=1 \
1>    -mGLOB_split_functions=1 \
1>    -mIPOPT_obj_output_file_name=testFortranCompiler.obj \
1>    -mGLOB_os_target=GLOB_OS_TARGET_WINNT \
1>    -mP3OPT_asm_target=P3OPT_ASM_TARGET_MASM5 \
1>    -mP3OPT_obj_target=P3OPT_OBJ_TARGET_NTCOFF \
1>    -mP3OPT_enable_safeseh=TRUE \
1>    -mGLOB_obj_output_file=testFortranCompiler.obj \
1>    -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN \
1>    "-mP1OPT_source_file_name=C:\Users\Alin M
Elena\testFortran\CMakeFiles\CMakeTmp\testFortranCompiler.f" \
1>    "C:\Users\Alin M
Elena\testFortran\CMakeFiles\CMakeTmp\testFortranCompiler.f"
1>del C:\Users\ALINME~1\AppData\Local\Temp\13162arg
1>Linking Fortran target cmTryCompileExec.exe
1>C:\PROGRA~1\Intel\Compiler\Fortran\101~1.011\IA32\Bin\fortcom  \
1>    -mP1OPT_version=1010 \
1>    -mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 \
1>    -mGLOB_tune_for_fort \
1>    -mGLOB_use_fort_dope_vector \
1>    -mP2OPT_static_promotion \
1>    -mP1OPT_print_version=FALSE \
1>    -mP3OPT_use_mspp_call_convention \
1>    "-mGLOB_options_string=-Qvc8 -Qlocation,link,C:\Program
Files\Microsoft Visual Studio 8\VC\Bin -nologo -watch:cmd -W1
-FecmTryCompileExec.exe" \
1>    -mGLOB_cxx_limited_range=FALSE \
1>    -mGLOB_diag_file=testFortranCompiler.diag \
1>    -mP3OPT_defaultlibs_omit=FALSE \
1>    -mP3OPT_defaultlibs=P3OPT_DEFAULTLIBS_STATIC_MULTITHREAD \
1>    -mP3OPT_defaultlibs_select=P3OPT_DEFAULTLIBS_SELECT_F90_IVF \
1>    -mP3OPT_defaultlibs_f90_port \
1>    -mP1OPT_check_stack \
1>    -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE \
1>    -mGLOB_fp_speculation=GLOB_FP_SPECULATION_FAST \
1>    -mP2OPT_gen_read_only_strings=TRUE \
1>    -mP2OPT_subs_out_of_bound=FALSE \
1>    -mGLOB_ansi_alias \
1>    -mIPOPT_ninl_user_level=2 \
1>    -mIPOPT_activate \
1>    -mP2OPT_hlo \
1>    -mPAROPT_par_report=1 \
1>    -mGLOB_split_functions=1 \
1>    -mIPOPT_link \
1>    -mIPOPT_ipo_activate \
1>    -mIPOPT_ipo_mo_activate \
1>    -mIPOPT_ipo_mo_nfiles=1 \
1>
-mIPOPT_source_files_list=C:\Users\ALINME~1\AppData\Local\Temp\48004lst \
1>
-mIPOPT_short_data_info=C:\Users\ALINME~1\AppData\Local\Temp\48005sdata \
1>    -mIPOPT_global_data \
1>    -mIPOPT_cmdline_objs="testFortranCompiler.obj" \
1>    -mIPOPT_cmdline_libs="user32.lib" \
1>    "-mIPOPT_cmdline_link="-out:cmTryCompileExec.exe" "-subsystem:console"
"-nologo" "/INCREMENTAL:YES" "/subsystem:console"" \
1>    -mIPOPT_save_il0 \
1>    -mIPOPT_il_in_obj \
1>    -mIPOPT_ipo_activate_warn=FALSE \
1>
-mIPOPT_obj_output_file_name=C:\Users\ALINME~1\AppData\Local\Temp\ipo_4800.o
bj \
1>    -mGLOB_os_target=GLOB_OS_TARGET_WINNT \
1>    -mP3OPT_asm_target=P3OPT_ASM_TARGET_MASM5 \
1>    -mP3OPT_obj_target=P3OPT_OBJ_TARGET_NTCOFF \
1>    -mP3OPT_enable_safeseh=TRUE \
1>
-mGLOB_obj_output_file=C:\Users\ALINME~1\AppData\Local\Temp\ipo_4800.obj \
1>
-mP1OPT_source_file_name=C:\Users\ALINME~1\AppData\Local\Temp\ipo_4800.f \
1>    testFortranCompiler.obj \
1>    -mIPOPT_mo_unique_name=cmTryCompileExec \
1>    -mIPOPT_object_files=C:\Users\ALINME~1\AppData\Local\Temp\48003txt
1>ipo: error #11035: Fatal error cannot open ifconsol
1>ifort: error #10014: problem during multi-file optimization compilation
(code 1)
1>del C:\Users\ALINME~1\AppData\Local\Temp\48003txt
1>del C:\Users\ALINME~1\AppData\Local\Temp\48004lst
1>del C:\Users\ALINME~1\AppData\Local\Temp\48005sdata
1>del C:\Users\ALINME~1\AppData\Local\Temp\ipo_4800.obj
1>del C:\Users\ALINME~1\AppData\Local\Temp\48006arg
1>Project : error PRJ0019: A tool returned an error code from "Linking
Fortran target cmTryCompileExec.exe"
1>Build log was saved at "file://c:\Users\Alin M
Elena\testFortran\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildL
og.htm"
1>cmTryCompileExec - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


CMake will not be able to correctly generate this project.
-- Configuring done
PS C:\Users\Alin M Elena\testFortran>



____________________________________________________________________
"...if the universities will not study useless subjects, who will?"
                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk
alin.elena at qub.ac.uk
______________________________________________________________________





More information about the CMake mailing list