[MITgcm-support] using mnc

Jason Goodman goodman_jason at wheatonma.edu
Fri Oct 22 00:43:48 EDT 2010


On Oct 21, 2010, at 4:26 PM, Dave Spiegel wrote:

> Hi,
> 
> I have been trying to compile a with netcdf, but I getting an error message:
> 
> *********************************************************************
> WARNING: the "mnc" package was enabled but tests failed to compile
>   NetCDF applications.  Please check that:
> 
>   1) NetCDF is correctly installed for this compiler and
>   2) the LIBS variable (within the "optfile") specifies the correct 
>        NetCDF library to link against.
> 
>   Due to this failure, the "mnc" package is now DISABLED.
> *********************************************************************
> 
> So, I set
> LIBS='-L/usr/lib64'
> which did not help and then tried setting
> LIBS='-L/usr/lib64/libnetcdf.a -L/usr/lib64/libnetcdf_c++.a -L/usr/lib64/libnetcdff.a'
> which also did not help.  Am I specifying the right sort of thing in the optfile?  Any thoughts?

Good luck ... getting netcdf to work with MITGCM and MPI is my biggest source of frustration whenever I set up MITGCM on new hardware.  I'm assuming netcdf libraries are actually installed at the location you listed.

In my case, the problem is that some mpif77 scripts add their own -L library paths in ways which trump the -L entries used by MITGCM's genmake script.  Stealth environment variables also cause trouble.  It's a different problem every time, but it's always hell.

The way forward is to look at the log output in genmake_warnings, look at the commands genmake is using to test whether netcdf is installed (it creates a file called "genmake_tnc.F" for this purpose) and try to replicate the error by hand.


More information about the MITgcm-support mailing list