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

[netCDF #GNP-293876]: module file problem



Hi Todd,

> I'm try to install netcdf 4.1.3 to use with a model I am trying to compile
> but I keep getting the error message below when I try to compile the code.
> Netcdf installs properly.
> 
> 
> /usr/bin/cpp -P -C -traditional  -P -C -traditional    -DWET_DRY 
> -DMULTIPROCESSOR  -DNETCDF_IO   -DGCN                      -DLIMITED_NO 
> -I/usr/local/include     mod_ncdio.F > mod_ncdio.f90
> /opt/platform_mpi/bin/mpif90  -c   -I/usr/local/include     mod_ncdio.f90
> PGF90-F-0004-Corrupt or Old Module file /usr/local/include/netcdf.mod 
> (mod_ncdio.f90: 54)
> PGF90/x86-64 Linux 12.3-0: compilation aborted
> make: *** [mod_ncdio.o] Error 2
> 
> Any ideas why it would say the file in Old or corrupt?

Different Fortran compilers, and even different versions of the same 
Fortran compiler, have different ways of storing module files that
declare Fortran function interfaces and constants.  The message is 
saying that the file /usr/local/include/netcdf.mod was either generated
by a different Fortran compiler or an old version of the same Fortran
compiler, or perhaps on a different platform.

Check the date on that file with

  ls -l /usr/local/include/netcdf.mod 

If it's earlier than the date and time at which you ran "make install" in
the netCDF directory, or if you specified to the "configure" script with 
the --prefix= option to install somewhere else than /usr/local/include, 
or if you were building netCDF from source with a different Fortran
compiler than mpif90, that explains the problem.  To fix it, you have
to use the same Fortran compiler to build and install netCDF as you use
to link applications.

--Russ

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



Ticket Details
===================
Ticket ID: GNP-293876
Department: Support netCDF
Priority: Normal
Status: Closed