[MITgcm-devel] gfortran 4.0.0 an ptracers_readparms
Ed Hill
ed at eh3.com
Sun Mar 12 09:32:04 EST 2006
On Sun, 2006-03-12 at 08:00 +0100, Martin Losch wrote:
> Hi Ed,
> I now have gfortran 4.2.0 on my Apple PowerBook and the code compiles
> and runs (although compiling with gfortran is really slow).
> However, I don't seem to be able to use the netcdf libraries that
> work with g77. Do you know anything about that. I have tried to have
> a look at the name mangling with "nm", but it seems that the
> underscores are at the right places (if I could only interpret the
> output of nm (o:)
Hi Martin,
Yes, name-mangling has changed between g77 and gfortran. For g77,
you'll want to use a recent (3.6.0 or later) version of netCDF thats
been compiled with:
CPPFLAGS="-fPIC"
and for gfortran you should use:
CPPFLAGS="-fPIC -DpgiFortran"
And you can install the two different static libs that result side-by-
side with different names. For instance, the netcdf RPMs that I
maintain for Fedora Extras come with libs that are named:
/usr/lib/netcdf-3/libnetcdf.a
/usr/lib/netcdf-3/libnetcdf_g77.a
so that you can use
g77: -L/usr/lib/netcdf-3 -lnetcdf_g77
gfortran: -L/usr/lib/netcdf-3 -lnetcdf
and things will work for both.
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-devel
mailing list