Discussion:
[CMake] Intel fortran compiler, cmake and windows
Alin M Elena
2007-11-29 23:30:34 UTC
Permalink
Hi,

I try to use cmake (cvs 29/11/2007), intel fortran compiler (10.1 september
build) on a windows vista machine.

The intel fortran compiler works. I have tested it in both command line and
visual studio 2005 professional modes.
Cmake works fine with Microsoft c++ and intel c++ compilers.

When I try to use cmake and ifort I get the following error


-- 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.
Determining if the Fortran compiler works failed 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>Linking Fortran target cmTryCompileExec.exe

1>ipo: error #11035: Fatal error cannot open ifconsol

1>ifort: error #10014: problem during multi-file optimization compilation
(code 1)

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\tdtbuj\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"

1>cmTryCompileExec - 3 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

I also attach the CMakeCache.txt


Any thoughts?

Alin

____________________________________________________________________
"...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/
***@yahoo.co.uk
***@qub.ac.uk
______________________________________________________________________
Dunlavy, Daniel M
2007-11-29 23:55:12 UTC
Permalink
Hi Alin,

I have posted the same problem on this list and the response was that my
Intel Fortran Compiler was probably not setup correctly. But I do not
think that is the case. Either way, here is my work-around for this
problem:

1) Install the Intel Fortran Compiler to a directory with no spaces in
the full path to the "bin" directory. The default is "C:\Program
Files\Intel". I installed mine to "C:\Intel" (I had to uninstall the
previously installed one, and then re-install using this path (using
Custom Install) in order for the installer to use the new path.)

2) Add the paths to the "Include", "Bin" and "Lib" directories of the
Intel Fortran compiler to several environment variables (Control
Panel->System->Advanced->Environment Variables->System Variables). With
the Intel Fortran compiler is located in
"C:\Intel\Compiler\Fortran\10.1.011\IA32", here are the environment
variables that I changed:

IFORT_COMPILER10: C:\Intel\Compiler\Fortran\10.1.011\
INCLUDE: C:\Intel\Compiler\Fortran\10.1.011\IA32\Include
LIB: C:\Intel\Compiler\Fortran\10.1.011\IA32\Lib
LIBPATH: C:\Intel\Compiler\Fortran\10.1.011\IA32\Lib
Path:
C:\Intel\Compiler\Fortran\10.1.011\IA32\Bin;C:\Intel\Compiler\Fortran\10
.1.011\IA32\Lib

3) Add the path to the Intel Fortran compiler's "Lib" directory to the
LINK_DIRECTORIES at the top of the "Windows-ifort.cmake" module in the
"share\cmake-x.x\Modules\Platform" subdirectory of your CMake
distribution (change "x.x" to your CMake version). Here is the line in
mine:

LINK_DIRECTORIES(C:/Intel/Compiler/Fortran/10.1.011/IA32/Lib)


I hope this works for you. Please let me know.

--Danny Dunlavy
-----Original Message-----
Of Alin M Elena
Sent: Thursday, November 29, 2007 4:31 PM
Subject: [CMake] Intel fortran compiler, cmake and windows
Hi,
I try to use cmake (cvs 29/11/2007), intel fortran compiler
(10.1 september
build) on a windows vista machine.
The intel fortran compiler works. I have tested it in both
command line and visual studio 2005 professional modes.
Cmake works fine with Microsoft c++ and intel c++ compilers.
When I try to use cmake and ifort I get the following error
-- 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.
Determining if the Fortran compiler works failed with the
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>Linking Fortran target cmTryCompileExec.exe
1>ipo: error #11035: Fatal error cannot open ifconsol
1>ifort: error #10014: problem during multi-file optimization
1>compilation
(code 1)
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\tdtbuj\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\Bu
ildLog.htm"
1>cmTryCompileExec - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0
skipped ==========
I also attach the CMakeCache.txt
Any thoughts?
Alin
____________________________________________________________________
"...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/
______________________________________________________________________
Arjen Markus
2007-11-30 07:33:53 UTC
Permalink
Post by Alin M Elena
Hi,
I try to use cmake (cvs 29/11/2007), intel fortran compiler (10.1 september
build) on a windows vista machine.
The intel fortran compiler works. I have tested it in both command line and
visual studio 2005 professional modes.
Cmake works fine with Microsoft c++ and intel c++ compilers.
When I try to use cmake and ifort I get the following error
-- 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.
I am sure you thought of it, but as I myself regularly forget, I want to
mention the following:

To use the Intel Fortran compiler (or the Compaq Visual Fortran compiler
or MS Visual C/C++ compiler)
in a DOS-box, you need to run the corresponding batch file that sets the
environment variables first.
Post by Alin M Elena
ifvars32.bat
(Message to the effect that the Intel Fortran Compiler can now be
properly used)
Post by Alin M Elena
cmake ....
The thing is, the compiler is found in the path set in the default
environment, but not such variables as LIBPATH etc
that the compiler needs to find "ifconsol.lib" and the like.

(If you run these compilers via Visual Studio, the environment variables
are set automatically, so you never
need to do that).

Perhaps this helps,

Arjen

Loading...