Cmake does not find ifort

1,000 views
Skip to first unread message

jdetroullioud

unread,
Oct 20, 2016, 11:14:26 PM10/20/16
to SCALE Users Group
Hi everyone,


I am trying to recompile scale6.1 on a Ubuntu16.04 laptop.

I installed correctly (I think) ifort via intel parallel studio. I added the script "source /opt/intel/bin/compilervars.sh intel64" into .bashrc which, according to intel, is supposed to set the environment variable for the ifort compiler (see website: https://software.intel.com/en-us/articles/setting-up-the-build-environment-for-using-intel-c-or-fortran-compilers)

Now, when I follow the instructions in the scale6.1_readme.pdf Build Instructions the step where I invoke the script linux_x86_64-cmake produces the following error:

CMake Error at CMakeLists.txt:5 (project):
  The CMAKE_Fortran_COMPILER:

    ifort

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.


I also tried to manually add the directory where the ifort bin is located to the .bashrc PATH variable or setting the variable FC to ifort, same error.

Would anyone be able to see what the problem is or to give me a solution? If that can be of any help, I put the CmakeOutput.log and Error.log as attached files.

Thank you in advance.


Julien de Troullioud de Lanversin
CMakeOutput.log
CMakeError.log

Rob Lefebvre

unread,
Oct 24, 2016, 8:34:39 PM10/24/16
to SCALE Users Group
Hi Julien,
Prior to invoking the linux_x86_64-cmake script, what does the following produce?
ifort --version


It seems that your .bashrc isn't quit working as we would hope. Can you compile a test program on the command line using ifort?

Is it possible that your .bashrc or .bash_profile has some logic that modifies the environment after the compilervars.sh is executed?
Best regards,
Rob Lefebvre

jdetroullioud

unread,
Oct 27, 2016, 10:58:39 AM10/27/16
to SCALE Users Group
Hi Rob,


Prior to invoke the cmake script, if I run ifort --version I have :

ifort (IFORT) 17.0.0 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.


I think my ifort environment variables are correctly set. I was also able to compile a little fortran script I wrote with ifort. Therefore, I really have the impression that linux_x86_64-cmake is the one who can't properly find ifort.

I thus changed the permission for linux_x86_64-cmake and changed the CMAKE_Fortran_COMPILER flag as follow:

-D CMAKE_Fortran_COMPILER:STRING=/opt/intel/compilers_and_libraries_201\
7.0.098/linux/bin/intel64/ifort \


(The original version of linux_x86_64-cmake just has this flag set to the name ifort)

Now, I am able to properly run linux_x86_64-cmake.

However, a new problem appears when I type the command sudo make in my build directory:

ifort: command line remark #10148: option '-vec-report0' not supported
catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.
compilation aborted for /scale/scale6.1/src/scalelib/fido_M.f90 (code 1)
src/scalelib/CMakeFiles/scalelib.dir/build.make:494: recipe for target 'src/scalelib/CMakeFiles/scalelib.dir/fido_M.f90.o' failed
make[2]: *** [src/scalelib/CMakeFiles/scalelib.dir/fido_M.f90.o] Error 1
CMakeFiles/Makefile2:529: recipe for target 'src/scalelib/CMakeFiles/scalelib.dir/all' failed
make[1]: *** [src/scalelib/CMakeFiles/scalelib.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2


Looks like my version of ifort does not really like the '-vec-report0' option. Is Scale6.1 compatible with the latest version of ifort?

Thanks a lot for your help.


Julien

jdetroullioud

unread,
Oct 31, 2016, 4:55:42 PM10/31/16
to SCALE Users Group
Hi,


Just to update this post: I installed ifort 16.0.4 20160811 (2016 version) and the catastrophic error disappears. Scale6.1 is thus probably not compatible with ifort 2017. However, I still need to modify the script linux_x86_64-cmake to explicitly specify the path to ifort; I don't think this is normal.


Thanks.


Julien
Reply all
Reply to author
Forward
0 new messages