[MITgcm-devel] ffort and g77 libraries
Alistair Adcroft
adcroft at MIT.EDU
Wed Jul 21 10:16:52 EDT 2004
I warned you that you wouldn't like it (Chris in particular) but ...
Compiling g77 with -fno-second-underscore allows us to link to
libraries/objects copmiled with ifc. So if we uniformly switch to using this
option for g77 including compiling our libraries with it then we can use the
same libaries (netcdf, mpi, etc..) for all compilers. This would be simpler
than supplying path names to
~cnh/something_version_1.0.02.4.1/test/ifc80/lib/ on a particular platform.
Imagine: g77 -lmpi -lnetcdf
or ifc -lmpi -lnetcdf
Instead of
g77 -L/u/cnh/mpi-1.2.1.001.2b.1-g77-1.2.1.0/lib/ -lmpi -lnetcdf
and ifc -L/u/cnh/mpi-1.2.3.010.1b.1-ifc-8.0/lib/ -lmpi
-L/usr/local/opt/eds_stuff/netcdf-1.2.0-ifc/lib/ -lnetcdf
The downside is that we can't impose this on external users who don't
necessarily have the ability to re-install/compile system stuff. Here, we
need genmake2 to test for the second underscore in the libraries - easy
enough for Ed - which will avoid screwing everyone else up for our own
convenience.
What is a shame is that ifc doesn't have an option (that I found) to link to
a library comiled with g77 and thus has the second under-score. May be Ed
can figure out if it does because then we can modify the ifc optfiles rather
than the g77 optfiles and leave all the libraries intact.
A.
--
Dr Alistair Adcroft http://www.mit.edu/~adcroft
MIT Climate Modeling Initiative tel: (617) 253-5938
EAPS 54-1624, 77 Massachusetts Ave, Cambridge, MA, USA
-----Original Message-----
From: mitgcm-devel-bounces at mitgcm.org
[mailto:mitgcm-devel-bounces at mitgcm.org] On Behalf Of Ed Hill
Sent: Tuesday, July 20, 2004 10:39 PM
To: MITgcm-devel
Subject: Re: [MITgcm-devel] ffort and g77 libraries
On Tue, 2004-07-20 at 14:29, Alistair Adcroft wrote:
> Impressed am I with Ed's netcdf rpm.
>
> Irritated am I with having to build netcdf myself to use ifc/ifort.
>
> More annoyed am I with having to change paths to use different
> libraries.
>
> Clever am I for figuring out a solution.
>
> Hopeful am I you all won't be upset.
Understand I do not. ;-)
Seriously though, whats the solution that you figured out? Is it using an
environment variable instead of putting things in optfiles? And what is
that might upset us?
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
_______________________________________________
MITgcm-devel mailing list
MITgcm-devel at mitgcm.org http://dev.mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list