[MITgcm-support] mnc package

Ed Hill ed at eh3.com
Tue Jun 14 11:00:39 EDT 2005


On Tue, 2005-06-14 at 10:36 -0400, Nicolas Wienders wrote:
> Ed Hill wrote: 
> > On Mon, 2005-06-13 at 18:42 -0400, Nicolas Wienders wrote:
> >   
> > > The installation went well, and the script specifies indeed the
> > > correct options
> > > for the compiler we are using ( CPPFLAGS=-DIBMR2Fortran ...etc....).
> > > 
> > > I have specified the netcdf libraries to use in the OPT file
> > > (LIBS='-L/usr/local/netcdf/lib -lnetcdf') but it still doesn't work.
> > >     
> > 
> > Hi Nicolas,
> > 
> > The LIBS setting looks good but did you also specify the netcdf include
> > directory?  The syntax is:
> > 
> >   INCLUDES="$INCLUDES -I/usr/local/netcdf/include"
> 
> Yes i did:
> 
> LIBS='-L/usr/local/netcdf/lib -lnetcdf'
> INCLUDES='-I/usr/local/netcdf/include'

Hi Nicolas,

So you've set the proper libs and library but still can't create a
netcdf-enabled version of MITgcm?

OK, there are now two *separate* things for you to try.  The first is to
turn off the can-we-build-with-netcdf checking in genmake2 and the
second is for you to compile a short "hello-world"-type Fortran program
that contains netcdf calls.  The first will check whether its a problem
with genmake2's checks and the second will verify that your netcdf
install really is working with your compiler.

So, to turn off the genmake2 check, please add:

 SKIP_NETCDF_CHECK=t

to your optfile.

And to verify that your netcdf install is really working, please compile
the attached program using your compiler.  For instance, I compiled the
program using GCC with:

  g77 -I/usr/include/netcdf-3/ -o test test.f  \
      -L/usr/lib/netcdf-3/ -lnetcdf

and you should be using a similar command but with xlf.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.f
Type: text/x-fortran
Size: 1902 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20050614/641bc0fe/attachment.bin>


More information about the MITgcm-support mailing list