Hi I am new to ROMS. I tried to compile ROMS using gfortran and it succeeded. However, there is memory leak problem if using gfortran (viewtopic.php?p=24029&hilit=leak#p24029). It is recommended to use ifort instead. So I install ifort. When typing "which fort", I got "/opt/intel/oneapi/compiler/2023.0.0/linux/bin/intel64/ifort". Then in the makefile, I changed the compiler to be ifort, but I got the following errors:
f95: error: precise: No such file or directory
f95: error: all: No such file or directory
f95: error: bounds: No such file or directory
f95: error: uninit: No such file or directory
f95: error: interfaces,nouncalled: No such file or directory
f95: error: unrecognized debug output level ‘en-interfaces’
f95: error: unrecognized command line option ‘-fp-model’
f95: error: unrecognized command line option ‘-h’
f95: error: unrecognized command line option ‘-check’; did you mean ‘-fcheck=’?
f95: error: unrecognized command line option ‘-check’; did you mean ‘-fcheck=’?
f95: error: unrecognized command line option ‘-traceback’
f95: error: unrecognized command line option ‘-check’; did you mean ‘-fcheck=’?
f95: error: unrecognized command line option ‘-warn’; did you mean ‘--warn-’?
make: *** [ROMS/Modules/Module.mk:14: Build_roms/mod_kinds.o] Error 1
When I typed "f95 --version", it seems that f95 points to GNU Fortran instead of Intel Fortran Compiler.
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So how can I make f95 point to ifort instead of GNU Fortran. I tried to search online, but just could not find any useful information. Any help is appreciated!
compile with ifort problems
- arango
- Site Admin
- Posts: 1368
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: compile with ifort problems
You can compile with gfortran; I do it all the time. However, you need to use a newer version of the compiler. Notice that in the message that you referred to, the user solved the memory leak and bug in the compiler by using a newer version. To use ifort, you need to customize the proper *-ifort.mk configuration file or use CMake. Remember that you still need the required external libraries to be compiled with the same version of the compiler.
There is plenty of information in wikiROMS. You may need the help of the computer manager at your institution.
There is plenty of information in wikiROMS. You may need the help of the computer manager at your institution.
Re: compile with ifort problems
Do you have USE_MPI and USE_MPIF90 set in your build script? If so, I would guess that your system has Intel MPI installed and in your path and you didn't change which_MPI to be set to intel. To access the MPI enabled Intel Fortran compilers when you are using Intel's MPI implementation, you need to set which_MPI to intel so the ROMS build script knows to use mpiifort (note the double i) for the compiler.
Intel MPI ships with both GCC linked MPI compilers (mpifort, mpicc, etc.) and Intel linked MPI compilers (mpiifort, mpiicc, etc.) so ROMS needs which_MPI to be set correctly to find the right compilers.
If you have not set USE_MPI and USE_MPIF90 then perhaps attach your ROMS build script and the full output log so we have a better idea what is happening.
Intel MPI ships with both GCC linked MPI compilers (mpifort, mpicc, etc.) and Intel linked MPI compilers (mpiifort, mpiicc, etc.) so ROMS needs which_MPI to be set correctly to find the right compilers.
If you have not set USE_MPI and USE_MPIF90 then perhaps attach your ROMS build script and the full output log so we have a better idea what is happening.