[MITgcm-devel] build on sunos_sun4u_g77

Martin Losch mlosch at awi-bremerhaven.de
Fri Dec 10 08:53:29 EST 2004


Unfortunately, the FC_NAMEMANGLE doesn't work for me. I think the 
problem is that mnccdir is simply not anywhere. Do I need to link a 
special library? Or should the code be in the repository/MITgcm  
directory? If the existence of mnccdir is system-dependent, that I 
think that the CPP-Flag HAVE_MNCCDIR should not be defined in 
mnc_readparms, but somewhere globally?. Don't you agree?

Martin

PS. Here comes the output of
mn mnc_readparms.o
attached as "fored.txt". I conclude from that that I should use
>   FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
Is that correct?, but that doesn't change anything.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fored.txt
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20041210/f23072e0/attachment.txt>
-------------- next part --------------

On Dec 10, 2004, at 2:37 PM, Ed Hill wrote:

> 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
>
> _______________________________________________
> 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