From: Alan W. I. <ir...@be...> - 2007-05-29 14:35:23
|
On 2007-05-29 16:39+0900 Valery Pipin wrote: > Hi! >>> I have intel fortran 9 installed in /usr/local/intel. >>> I heard that libtool does not support ifort. Also, there is linking >>> problem like : >>> >>> /usr/bin/cmake -P >>> CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake /usr/local/intel/bin/ifort >>> -KPIC -lm -O2 >>> "CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.o" -o >>> cmTryCompileExec -i_dynamic IPO link: can not find "(" ifort: error: >>> problem during multi-file optimization compilation (code 1) gmake[1]: >>> *** [cmTryCompileExec] Error 1 gmake[1]: Leaving directory >>> `/home/vv/RPM/BUILD/plplot-5.7.3/alt/CMakeFiles/CMakeTmp' gmake: *** >>> [cmTryCompileExec/fast] Error 2 >>> >> I don't remember having tried the Intel Fortran compiler via CMake, >> but this looks >> like a problem in the CMake support for that compiler. > This is a feature (or bug) of ifort. It appears for multi-file > optimization. There is a disscussion about somewhere in the net.I don't > remeber where I found it. The similar bug appeared when I tried to > compile "windows_to_the_stars" with ifort. I don't know how to switch it > off for cmake. CMake usually has certain default compilers it uses and flags for those compilers depending on your system. However, sometimes that default system does not work or does not give you exactly what you want. In that case, to control all aspects of your compiler under CMake (whether C, C++, or Fortran) set compiler environment variables _before_ running cmake in an _empty_ build directory. We already give some simple examples at http://www.miscdebris.net/plplot_wiki/. export CC="gcc -O2" export CXX="g++ -O2" export FC="g77 -O2" but you have complete control; you can change to any appropriate compiler name for each of these variables, and any command-line option appropriate to the compiler in question. For example, Valery, suppose you want to use the ifort compiler with optimization turned off. Specify that as follows: export FC="ifort -O0" BTW, according to my quick Google search, the -O0 option turns off all optimization including multi-file optimization so you will probably want to use a much more specific combination of ifort compiler flags to turn off multi-file optimization while, for example, specifying normal -O2 optimization for everything else. Valery, I understand you don't have much need for fortran, but if you do pursue this out of curiosity, please let us know the results of specifying the FC environment variable for the case of your particular ifort compiler. Good luck. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |