[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NBI-237922]: probleme on nf90 interface



Hi Jingmei,

Sorry it has taken so long to respond to you question ...

> I failed to compile CESM(The Community Earth System Model ) model
> with Intel Fortran and C++ compiler. Here are some concerning
> informations: the exact version of netCDF - see the VERSION
> file.=========3.6.3=========
> 2. the *complete* output of “./configure”, “make”, and “make check. Yes,
> it's long, but it's all important.
> 
> ============================================
> configure.log.yu, make.log.yu,check-install.log.yu in attached

I didn't see any attached files.  Are you sure you attached them?

> ============================================
> 3. if the configure failed, the contents of
config.log.===============it was successful.===============
> 4.if you are having problems with very large files (larger than
> 2GiB), send the output of "make check" after first running "make
> distclean" and invoking the configure script with the
> –enable-large-file-tests option included. 
> ==========haven't
> ==========
> The compile command of my CESM model is:./configure -dyn fv -hgrid
1.9x2.5 -nospmd -nosmp  -fc ifort -fc_type intel -chem none -test

We're not familiar with the CESM configure script or its options, so
I'll just have to assume the configure command above is correct.

> The erros are:
>
/home/yujingmei/Model/CESM/jm-test/model_jm-1.9x2.5/cesm1_0_3/models/utils/pio/pio_types.F90(1>
1): error #7013: This module file was not generated by any release of this 
compiler.   [NETCDF]
>      use netcdf                                  ! _EXTERNAL
> ---------^

Different Fortran compilers use different formats for "netcdf.mod"
module files they generate from the Fortran source.  So a program that
has the statement

  use netcdf

must be compiled with the same Fortran compiler that was used for the
netCDF Fortran library.

/home/yujingmei/Model/CESM/jm-test/model_jm-1.9x2.5/cesm1_0_3/models/utils/pio/pio_types.F90(2>
91): error #6592: This symbol must be a defined parameter, an
enumerator, or an argument of an inquiry function that evaluates to
a compile-time constant.   [NF90_GLOBAL]
>    integer, public, parameter :: PIO_global = nf90_global
> ----------------------------------------------^

That error is the result of error with the "use netcdf" statement not
reading in the netcdf.mod file, which had been generated by a
different Fortran compiler.

> As I use intel fortran compiler by the option "-fc ifort" and
"-fc_type intel" to compile CESM model, I suppose that the probleme
is caused by the type of the fortran compile is different from the
one that netcdf is builed. While I remark that in the configure
output file(configure.log.yu), the checking of ifort is "no", and in
the make output file(make.log.yu), there is "gfortran compile".

Yes, that would explain the error.

> But in the .bashrc file, I've added the environmental variables:
> # fortran compiler
> source /opt/intel/bin/ifortvars.sh ia32
> # c compiler
> source /opt/intel/bin/iccvars.sh ia32
> # netcdf
> export CC=icc
> export CXX=icpc
> export CFLAGS='-O3 -xT -ip -no-prec-div -static'
> export CXXFLAGS='-O3 -xT -ip -no-prec-div -static'
> export F77=ifort
> export FC=ifort
> export F90=ifort
> export FFLAGS='-O3 -xT -ip -no-prec-div -static'
> export CPP='icc -E'
> export CXXCPP='icpc -E'
> export NETCDF=/usr/local
> export INC_NETCDF=$NETCDF/include
> export LIB_NETCDF=$NETCDF/lib
> # PATH
> export PATH=$PATH:/usr/local
> 
> and source ~/.bashrc before configure netcdf.
> What's wrong?

Apparently the configure script foud a problem compiling with ifort,
so used gfortran instead.  Without the complete config.log, I can't
tell why the attempt to compile with ifort failed.

Incidentally, the configure script doesn't use any of the environment
variables NETCDF, INC_NETCDF, or LIB_NETCDF, but maybe those are used
by CESM?

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: NBI-237922
Department: Support netCDF
Priority: Normal
Status: Closed