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

[netCDF #GUU-420054]: Getting Corrupt or Old Module file ./netcdf.mod error code



Good morning Hiro,

I am not certain what is going on regarding the behavior you are observing with 
the module file.  I do not have experience with the PGI fortran compiler, but 
since you have tried gfortran on a different system it does not appear to 
compiler specific.  Is it possible that there is a second, older netcdf.mod 
file installed on the system? Possibly in /usr/include or /usr/local/include?

Regarding --has-f90; if --has-f03 returns yes, you can ignore the result of 
--has-f90; f03=yes implies f90 functionality as well.  This is unclear and a 
fix is in the works.  If both --has-f90 and --has-f03 say no, then it is fairly 
clear that there is a larger problem going on, and I would bet that there is a 
second, older install somewhere.  If --has-f03 returns yes, then you should be 
ok on this front.

I only have access to gfortran; can you provide the config.log you generated 
when configuring on the gfortran system?  I will work to recreate this on my 
end as well, although at a glance everything is working without issue on our 
test systems.  Let me know if you determine there is an older version of 
netcdf.mod present on the system, as well.

Thanks, I hope this helps, Go Rams!

-Ward



> Full Name: Hiro Gosden
> Email Address: address@hidden
> Organization: Colorado State University
> Package Version: netcdf-fortran-4.4.4
> Operating System: CentOS 6.9
> Hardware: 64bit
> Description of problem: I've searched through the UNIDATA support database, 
> but have not been able to find a definitive solution for this particular 
> issue, so I'm submitting a new support request.
> 
> I've followed the netCDF installation documentation to install netCDF using 
> pgf90 compiler. The FORTRAN77 code compiles fine, but FORTRAN90 code fails, 
> and I get the following error message: "Corrupt or Old Module file 
> ./netcdf.mod."
> 
> I used the gfortran compiler to install netCDF on a different system. And 
> when I compile the FORTRAN 90 code, I get the following error message, "File 
> 'netcdf.mod' opened at (1) is not a GNU Fortran module file."
> 
> In both cases, the netcdf.mod does exist in the 
> /usr/local/netcdf-fortran-4.4.4/include/ directory with the installation 
> time-stamp that matches the date the netCDF was installed. However, this 
> netcdf.mod file has the same exact file size as the netcdf.mod file in the 
> /usr/local/src/NETCDF/netcdf-fortran-4.4.4/fortran/ directory where I staged 
> my installation files. Also, when I type "nc-config --all" the flag 
> "--has-f90" indicates a "no". One of the older support tickets from 2015 
> indicated that there might be a bug that indicates the incorrect indication 
> for the flag "--has-f90," not sure if this might still be the case?
> 
> My questions are these:
> 
> If the "--has-f90" flag is correct, how do I enable f90 during my 
> installation?
> 
> And should the file size of netcdf.mod file in the "installed" directory 
> differ from the netcdf.mod file in the "source" directory?
> 
> I've included the config.log file from the installation that was performed 
> using the pgf90 compiler. The config.log file does not show this, but my 
> compiler flags to run the configure script looks like this:
> FC=/usr/local/pgi/linux86-64/14.3/bin/pgf90 
> F77=/usr/local/pgi/linux86-64/14.3/bin/pgf90 
> F90=/usr/local/pgi/linux86-64/14.3/bin/pgf90  ./configure 
> --prefix=/usr/local/netcdf-fortran-4.4.4 LDFLAGS=-L/usr/local/hdf5-1.8.16/lib 
> LDFLAGS=-L/usr/local/netcdf-4.4.1.1/lib 
> CPPFLAGS=-I/usr/local/hdf5-1.8.16/include 
> CPPFLAGS=-I/usr/local/netcdf-4.4.1.1/include
> 
> Thanks,
> 
> Hiro
> 
> 
> 


Ticket Details
===================
Ticket ID: GUU-420054
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.