[MITgcm-devel] build on sunos_sun4u_g77

Ed Hill ed at eh3.com
Fri Dec 10 08:37:07 EST 2004


On Fri, 2004-12-10 at 14:15 +0100, Martin Losch wrote:
> One thing remains:
> what is mnccdir (called from mnc_readparms) and why do I not have it. 
> The CPP-Flag HAVE_MNCCDIR should probably not be defined locally in 
> mnc_readparms, should it?

Hi Martin,

The mnccdir() routine is a little bit of C code that creates the
subdirectory into which MNC writes all its files.  When the
"mnc_use_outdir" flag is set (and we're able to compile the mnccdir()
code), then the directory is created.  Its a feature thats not critical
to the use of MNC -- its just a convenience!

To get mnccdir() working, you have to get the C--Fortran name mangling
figured out.  On most systems its a matter of adding additional trailing
or leading underscores ("_") to the function names.  For your Sun
system, you can try adding one of the following lines to your optfile:

  FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
  FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## __"
  FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) _ ## X"

And you can look at the results of name mangling on your system by using
the "nm file.o" command to see what the symbols are created within each
of the object files.  If you send me the results of

  nm mnc_readparms.o

we can try to figure it out.

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