Hi all,
I had tried to compiled the build.bash and had encountered the netcdf compilation error as shown below. I am using Centos 6.0 and had netcdf 3.6.3 and netcdf-4.1.3 in the system. I had tried to use both version of the netcdf and had the same error. Please advice me on resolving the issue.
(part of the message)
...
ROMS/Bin/cpp_clean /usr/local/software/upwelling/Build/mod_sediment.f90
cd /usr/local/software/upwelling/Build; /usr/local/openmpi/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback -free -free mod_sediment.f90
cd /usr/local/software/upwelling/Build; /usr/local/openmpi/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback -free -free mod_ncparam.f90
cd /usr/local/software/upwelling/Build; /usr/local/openmpi/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback -free distribute.f90
distribute.f90(1991): error #7013: This module file was not generated by any release of this compiler. [NETCDF]
USE netcdf
----------^
distribute.f90(2026): error #6404: This name does not have a type, and must have an explicit type. [NF90_NOERR]
mp_ncread1d=nf90_noerr
------------------^
distribute.f90(2040): error #6404: This name does not have a type, and must have an explicit type. [EXIT_FLAG]
exit_flag=2
--------^
distribute.f90(2079): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_VARID]
mp_ncread1d=nf90_inq_varid(ncid, TRIM(ncvname), varid)
--------------------^
distribute.f90(2085): error #6404: This name does not have a type, and must have an explicit type. [NOERROR]
IF (exit_flag.eq.NoError) THEN
-------------------------^
distribute.f90(2089): error #6404: This name does not have a type, and must have an explicit type. [NF90_GET_VAR]
mp_ncread1d=nf90_get_var(ncid, varid, Asend, start, total)
------------------------^
distribute.f90(2281): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_VARID]
mp_ncread2d=nf90_inq_varid(ncid, TRIM(ncvname), varid)
--------------------^
distribute.f90(2293): error #6404: This name does not have a type, and must have an explicit type. [NF90_GET_VAR]
mp_ncread2d=nf90_get_var(ncid, varid, Asend, start, total)
------------------------^
distribute.f90(2467): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_VARID]
mp_ncwrite1d=nf90_inq_varid(ncid, TRIM(ncvname), varid)
---------------------^
distribute.f90(2469): error #6404: This name does not have a type, and must have an explicit type. [NF90_PUT_VAR]
mp_ncwrite1d=nf90_put_var(ncid, varid, Arecv, start, total)
-----------------------^
distribute.f90(2677): error #6404: This name does not have a type, and must have an explicit type. [NF90_INQ_VARID]
mp_ncwrite2d=nf90_inq_varid(ncid, TRIM(ncvname), varid)
---------------------^
distribute.f90(2679): error #6404: This name does not have a type, and must have an explicit type. [NF90_PUT_VAR]
mp_ncwrite2d=nf90_put_var(ncid, varid, Arecv, start, total)
-----------------------^
compilation aborted for distribute.f90 (code 1)
make: *** [/usr/local/software/upwelling/Build/distribute.o] Error 1
------------------------------------------------------------------------------------------------------------------
(part of codes from build.bash)
export USE_MPI=on # distributed-memory parallelism
export USE_MPIF90=on # compile with mpif90 script
#export which_MPI=mpich # compile with MPICH library
#export which_MPI=mpich2 # compile with MPICH2 library
#export which_MPI=openmpi # compile with OpenMPI library
#export USE_OpenMP=on # shared-memory parallelism
export FORT=ifort
#export FORT=gfortran
#export FORT=pgi
export USE_DEBUG=on # use Fortran debugging flags
export USE_LARGE=on # activate 64-bit compilation
#export USE_NETCDF4=on # compile with NetCDF-4 library
#export USE_PARALLEL_IO=on # Parallel I/O with Netcdf-4/HDF5
export USE_MY_LIBS=on # use my library paths below
Regards
Edwin
build.bash - compilation error with netcdf
Re: build.bash - compilation error with netcdf
The NetCDFs on the system are almost certainly compiled with gcc/gfortran. You are trying to compile ROMS with the Intel compiler. You need to either use gfortran to compile ROMS or compile NetCDF with the Intel compiler. If you don't have the Intel C compilers you can use gcc for the C compiler and ifort (Intel) for the Fortran compiler when building NetCDF.
You must build NetCDF and ROMS with the same compiler(s) and sometimes the same compiler options.
You must build NetCDF and ROMS with the same compiler(s) and sometimes the same compiler options.