compiling error with the latest ROMS

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
isopycnal
Posts: 15
Joined: Fri Jan 05, 2007 3:36 pm
Location: Ocean institution,Chinese Academy of Sciences

compiling error with the latest ROMS

#1 Unread post by isopycnal »

hi,everyone
I used the ROMS version 71 on my Linux system and it works well.But after I got the latest ROMS version through svn update and compile it, the errors appears as below:

Code: Select all

cd Build; ifort -c  -ip -O3 -xW -free mod_netcdf.f90
fortcom: Error: mod_netcdf.f90, line 19: This module file was not generated by any release of this compiler.   [NETCDF]
        USE netcdf
------------^
fortcom: Error: mod_netcdf.f90, line 21: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant.   [NF90_REAL]
        integer, parameter :: NF_FOUT = nf90_real
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 22: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant.   [NF90_DOUBLE]
        integer, parameter :: NF_FRST = nf90_double
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 23: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant.   [NF90_DOUBLE]
        integer, parameter :: NF_TYPE = nf90_double
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 21: This name does not have a type, and must have an explicit type.   [NF90_REAL]
        integer, parameter :: NF_FOUT = nf90_real
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 22: This name does not have a type, and must have an explicit type.   [NF90_DOUBLE]
        integer, parameter :: NF_FRST = nf90_double
----------------------------------------^
compilation aborted for mod_netcdf.f90 (code 1)
So, what is the error like "This module file was not generated by any release of this compiler". and how I can correct such errors?
thanks for any suggestions.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

You need to build the NetCDF library with your ifort compiler. ROMS now uses the f90 netCDF module interface which is less portable between compilers than just the library.

isopycnal
Posts: 15
Joined: Fri Jan 05, 2007 3:36 pm
Location: Ocean institution,Chinese Academy of Sciences

#3 Unread post by isopycnal »

HI, Kate,
thank you very much. I recompiled the netcdf 3.6.2 using my ifort compiler, and it is ok. thanks again.

Post Reply