Closed HCKimDaniel closed 2 years ago
Hello @HCKimDaniel - How does Frontera handle loading the Intel tool suite? For example, do you know whether your environment is able to access the Intel compiler and libraries? You could try which ifort
.
Hi!! @rafmudaf As far as I know, intel compiler can be assessed because I used ifort to compile an in-house code in Frontera. Also, I copy and paste the answer for which ifort
below.
login3.frontera(1001)$ which ifort /opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort
login3.frontera(1004)$ which cmake /opt/apps/cmake/3.20.3/bin/cmake
Currently Loaded Modules: 1) intel/19.1.1 4) autotools/1.2 7) pmix/3.1.4 10) TACC 2) impi/19.0.9 5) python3/3.7.0 8) hwloc/1.11.12 3) git/2.24.1 6) cmake/3.20.3 9) xalt/2.10.34
The difference from the previous compiling experience is that cmake is used for the openfast. If I follow the compile process from the website "https://openfast.readthedocs.io/en/main/source/install/index.html#cmake-with-make-for-linux-macos", the frontera system uses the gfortran automatically. Do I need to change the cmake option in the related cmake input file to compile openfast using ifort?
Yes, you could try that. Change the value for CMAKE_FORTRAN_COMPILER
in openfast/build/CMakeCache.txt
to contain the path from the which ifort
command. Be sure to run cmake ..
after saving this change.
However, I think this will not change the math libraries that would have been found by CMake. A safer method might be to set the FC
environment variable to the path to ifort and start the configuration and compile from scratch. Something like this:
cd openfast/
rm -rf build
mkdir build && cd build
export FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort
cmake ..
There is no value for CMAKE_FORTRAN_COMPILER
in openfast/build/CMakeCache.txt
. Do you mean that I need to add the value in openfast/build/CMakeCache.txt
?
Could you post the CMakeCache file here? You can just attach it to a comment rather than copy-paste the contents.
I posted CMakeCache.txt below CMakeCache.txt
Did the cmake configuration command (cmake ..
) end successfully? As in, did it state
-- Configuring done
-- Generating done
-- Build files have been written to: <path>/openfast/build
If CMake finished correctly, the CMakeCache must contain a variable for the Fortran compiler in the same way that it contains paths to the C++ and C compilers.
OK. I cloned the repository from GitHub again and tried as you commented
cd openfast/
rm -rf build
mkdir build && cd build
export FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort
cmake ..
The message is changed like below after cmake ..
. I think taht the fortran compiler is successfully changed to ifort based on the message. I will compile openfast again. And let you know the update. Thank you.
login3.frontera(1078)$ rm -rf build
login3.frontera(1079)$ mkdir build && cd build
login3.frontera(1080)$ export FC=/opt/intel/compilers_and_libraries_2020.1.217/l inux/bin/intel64/ifort
login3.frontera(1081)$ cmake ..
-- The CXX compiler identification is GNU 8.3.0
-- The C compiler identification is GNU 8.3.0
-- The Fortran compiler identification is Intel 19.1.0.20200306
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/apps/gcc/8.3.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/apps/gcc/8.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/intel/compilers_and_libraries_2020.1 .217/linux/bin/intel64/ifort - skipped
-- Checking whether /opt/intel/compilers_and_libraries_2020.1.217/linux/bin/inte l64/ifort supports Fortran 90
-- Checking whether /opt/intel/compilers_and_libraries_2020.1.217/linux/bin/inte l64/ifort supports Fortran 90 - yes
-- Performing Test HAS_FORTRAN2008
-- Performing Test HAS_FORTRAN2008 - Success
-- Enabling Fortran 2008 features
-- Found MKL: /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel6 4/libmkl_intel_lp64.so;/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/l ib/intel64/libmkl_sequential.so;/opt/intel/compilers_and_libraries_2020.1.217/li nux/mkl/lib/intel64/libmkl_core.so
-- Setting system file as: src/SysIFL.f90
-- Configuring done
-- Generating done
-- Build files have been written to: /home1/08330/hckim81/OpenFAST/build
Yes, this looks good. At least CMake is able to find your Intel compiler and the Intel MKL library. Please let me know if you're able to compile.
@rafmudaf Thank you so much!!! It fully works well.
Is your feature request related to a problem? Please describe. The linux system used the gfortan automatically instead of intel Fortran when compiled
Describe the solution you'd like I want to compile OpenFAST with IntelFortran in the Linux system
Describe alternatives you've considered No Alternatives are considered
Additional context I am using TACC Frontera System for compiling OpenFAST. I want to compile OpenFAST with IntelFortran in the Linux system, but it used the gfortran automatically. Can you help me for me to compile OpenFAST using Intel Fortran in the Linux.