[MITgcm-support] MITgcm now uses NetCDF (was: Re: testreport on G4, mnc)
Ed Hill
ed at eh3.com
Fri Sep 24 08:53:31 EDT 2004
On Fri, 2004-09-24 at 08:17, Martin Losch wrote:
> Hi Ed,
>
> In this case I have suggestion. I DID have NetCDF installed in
> /sw/incluce and /sw/lib, which is the place where FINK puts them. I
> have now linked the files into /usr/include and /usr/lib and now exp0
> seems to pass.
>
> Appearently, MITgcm requires the libraris and includes to be in a
> particular place (/usr/include /usr/lib). This will not work on all
> systems. Wouldn't it be a good idea to include the netcdf-path in the
> build options (or as a general rule as environment varibles that are
> passed to make; on second thought environment variables may not be a
> good idea because different makes behave differently with respect to
> reading environment variables)
>
>
> (I thought that testreport only tries to use MNC if it already has
> detected some for of NetCDF, is that so?)
Hi Martin,
The MITgcm build system provides a convenient optfile facility so that
you can put additional headers and libraries *anywhere* you want them.
The syntax within the optfile is:
INCLUDEDIRS='-I/your/path/to/netcdf/headers'
LIBS="-L/your/path/to/netcdf/lib/ -lyour_netcdf_lib_name"
and there are *numerous* examples of this in the various optfiles at:
MITgcm/tools/build_options
The only reason that anyone expects to see headers in /usr/include and
libraries in /usr/lib is because thats where YOUR COMPILER (by default!)
looks for them. Your comment that
"MITgcm requires the libraris and includes to be in a
particular place"
is *completely* false. Its merely the default behavior of *your*
compiler and the default search paths that *your* compiler uses. If you
want to put headers and libs in any location then feel free to do so and
enjoy the convenience of saving your configuration in a custom optfile.
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
More information about the MITgcm-support
mailing list