Hi, I am a beginner in ROMS. And I am trying to install ROMS in the cluster. Here is the error:
master jus/ROMS> make
makefile:235: INCLUDING FILE /home/jus/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
which: no ifort in (/opt/kde3/bin:/opt/gnome/bin:/usr/games:/usr/bin/X11:/usr/bin:/bin:/usr/sbin:/sbin:/opt/pathscale/bin)
cp -f /opt/intelsoft/netcdf4/include/netcdf.mod Build
cp: cannot stat `/opt/intelsoft/netcdf4/include/netcdf.mod': No such file or directory
It seems there is no ifort in the following directory. What should I do? Can anyone give some advice?
Thank you!!
Make error
-
- Posts: 23
- Joined: Fri Jan 29, 2010 6:17 pm
- Location: GSO URI
Make error
Qianqian@URI
Re: Make error
First, you should make sure that 'ifort' compiler and 'netcdf' library already installed in your machine and find the path where those two things were installed . Then, set those paths to the xxx-ifort.mk file (e.g. Linux-ifort.mk if you use linux) in Compiler subdirectory.
More information can be read from the Wiki ROMS:
https://www.myroms.org/wiki/index.php/C ... nd_Linking
cheers,
al
More information can be read from the Wiki ROMS:
https://www.myroms.org/wiki/index.php/C ... nd_Linking
cheers,
al
-
- Posts: 23
- Joined: Fri Jan 29, 2010 6:17 pm
- Location: GSO URI
Re: Make error
Thank you very much! I will have a try.alazhar wrote:First, you should make sure that 'ifort' compiler and 'netcdf' library already installed in your machine and find the path where those two things were installed . Then, set those paths to the xxx-ifort.mk file (e.g. Linux-ifort.mk if you use linux) in Compiler subdirectory.
More information can be read from the Wiki ROMS:
https://www.myroms.org/wiki/index.php/C ... nd_Linking
cheers,
al
Have a nice day.
Qianqian@URI
-
- Posts: 23
- Joined: Fri Jan 29, 2010 6:17 pm
- Location: GSO URI
Re: Make error
I installed netcdf and changed the paths in Linux-ifort.mk.
Then I came back to ROMS.
However, here comes another problem.
[q@master ROMS]$ make
makefile:235: INCLUDING FILE /home/q/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cp -f /home/q/ROMS/netcdf-4.0.1/include/netcdf.mod Build
cp: cannot stat `/home/q/ROMS/netcdf-4.0.1/include/netcdf.mod': No such file or directory
make: *** [Build/netcdf.mod] Error 1
It seems there is no netcdf.mod in the directory of netcdf-4.0.1 nor directory of include.
I think I have installed netcdf correctly.
with
tar -zxvf netcdf-4.0.1.tar.gz
cd netcdf-4.0.1
export FC=ifort; export "FFLGS"="-heap-arrays-fp-model precise"
./configure
make
check make
Anyone know what's the problem?
Thank you.
Then I came back to ROMS.
However, here comes another problem.
[q@master ROMS]$ make
makefile:235: INCLUDING FILE /home/q/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cp -f /home/q/ROMS/netcdf-4.0.1/include/netcdf.mod Build
cp: cannot stat `/home/q/ROMS/netcdf-4.0.1/include/netcdf.mod': No such file or directory
make: *** [Build/netcdf.mod] Error 1
It seems there is no netcdf.mod in the directory of netcdf-4.0.1 nor directory of include.
I think I have installed netcdf correctly.
with
tar -zxvf netcdf-4.0.1.tar.gz
cd netcdf-4.0.1
export FC=ifort; export "FFLGS"="-heap-arrays-fp-model precise"
./configure
make
check make
Anyone know what's the problem?
Thank you.
alazhar wrote:First, you should make sure that 'ifort' compiler and 'netcdf' library already installed in your machine and find the path where those two things were installed . Then, set those paths to the xxx-ifort.mk file (e.g. Linux-ifort.mk if you use linux) in Compiler subdirectory.
More information can be read from the Wiki ROMS:
https://www.myroms.org/wiki/index.php/C ... nd_Linking
cheers,
al
Qianqian@URI
Re: Make error
When you build NetCDF, it will build the C library. It will check your compilers and if it finds a suitable C++ compiler, it will compile that interface as well. Ditto for Fortran 77, ditto for Fortran 90. During the configure phase, it will have told you whether it was successful for each of these. If it didn't build the file netcdf.mod, you will have to go back and coax it into compiling the Fortran 90 interface. You exported FC, try also F90, maybe even F77 too. I think NetCDF uses all three...
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: Make error
As Kate has said, go back over the configure logs and see whether a Fortran 90 compiler was found and the Fortran 90 interface built. (The lack of a netcdf.mod suggests it wasn't.)justina0622 wrote: I think I have installed netcdf correctly with
tar -zxvf netcdf-4.0.1.tar.gz
cd netcdf-4.0.1
export FC=ifort; export "FFLGS"="-heap-arrays-fp-model precise"
./configure
make
check make
If the above commands were cut and pasted from the command window you built netCDF with (and if they weren't they should have been, so that we know exactly what you did) then there are several issues:
- FFLGS should be FFLAGS, and shouldn't have quotation marks around it.
- "check make" should be "make check".
- You will normally want to pass the same options to the Fortran compiler while building the F90 interface as when building the F77 interface, since they will normally be the same compiler. For the F90 interface, the environment variable you need is FCFLAGS (if I recall correctly). For F77 it is FFLAGS.
- You should pass the --enable-fortran option to configure
- The environment variables passed to configure aren't needed by the subseuqent calls to make, so you can specifiy them on the configure command line
FC=ifort FFLAGS="-heap-arrays-fp-model precise" FCFLAGS="-heap-arrays-fp-model precise" ./configure --enable-fortran
Edit: removed a couple of stray quotation marks
Last edited by m.hadfield on Wed Mar 17, 2010 4:50 am, edited 1 time in total.
-
- Posts: 23
- Joined: Fri Jan 29, 2010 6:17 pm
- Location: GSO URI
Re: Make error
Thank you very much. I will try.kate wrote:When you build NetCDF, it will build the C library. It will check your compilers and if it finds a suitable C++ compiler, it will compile that interface as well. Ditto for Fortran 77, ditto for Fortran 90. During the configure phase, it will have told you whether it was successful for each of these. If it didn't build the file netcdf.mod, you will have to go back and coax it into compiling the Fortran 90 interface. You exported FC, try also F90, maybe even F77 too. I think NetCDF uses all three...
Qianqian@URI
-
- Posts: 23
- Joined: Fri Jan 29, 2010 6:17 pm
- Location: GSO URI
Re: Make error
Thank you.m.hadfield wrote:As Kate has said, go back over the configure logs and see whether a Fortran 90 compiler was found and the Fortran 90 interface built. (The lack of a netcdf.mod suggests it wasn't.)justina0622 wrote: I think I have installed netcdf correctly with
tar -zxvf netcdf-4.0.1.tar.gz
cd netcdf-4.0.1
export FC=ifort; export "FFLGS"="-heap-arrays-fp-model precise"
./configure
make
check make
If the above commands were cut and pasted from the command window you built netCDF with (and if they weren't they should have been, so that we know exactly what you did) then there are several issues:
- FFLGS should be FFLAGS, and shouldn't have quotation marks around it.
- "check make" should be "make check".
- You will normally want to pass the same options to the Fortran compiler while building the F90 interface as when building the F77 interface, since they will normally be the same compiler. For the F90 interface, the environment variable you need is FCFLAGS (if I recall correctly). For F77 it is FFLAGS.
- You should pass the --enable-fortran option to configure
So I suggest your configure command should be
- The environment variables passed to configure aren't needed by the subseuqent calls to make, so you can specifiy them on the configure command line
FC=ifort FFLAGS"="-heap-arrays-fp-model precise" FCFLAGS"="-heap-arrays-fp-model precise" ./configure --enable-fortran
Qianqian@URI