[MITgcm-support] [Fwd: Auto-discard notification]

Ed Hill ed at eh3.com
Tue Sep 28 10:58:14 EDT 2004


On Tue, 2004-09-28 at 10:15, Karsten Friis wrote:
> Hi Ed,
> 
> this is the result:
> 
> $ nm /usr/local/lib/libnetcdf.a | grep nf_get_vara_int
>   00000318 T nf_get_vara_int1_
>   000003ce T nf_get_vara_int2_
>   00000484 T nf_get_vara_int_
> 
> What do you think?


Hi Karsten,

This is helpful, it means that the Fortran interface for NetCDF was
installed.  But it appears to have been installed for a different
compiler than g77 since it doesn't have the typical g77 name-mangling.  

So you have two options:

 1) Compile your own copy of NetCDF for the Fortran compiler that 
    you wish to use (I assume g77).

 2) Use the same Fortran compiler for MITgcm as they used for 
    their NetCDF library.

The directions for Option #1 are:

 a) Build NetCDF using:

    $  cd $HOME
    $  wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5.1.tar.Z
    $  tar -xzf netcdf-3.5.1.tar.Z
    $  cd netcdf-3.5.1/src
    $  export CPPFLAGS="-DNDEBUG -Df2cFortran -fPIC"
    $  export CFLAGS="-Df2cFortran -fPIC"
    $  export FC="g77"
    $  ./configure
    $  make

    where $HOME is your home directory.

 b) Then get a copy of the optfile from 

      MITgcm/tools/build_options/linux_ia32_g77

    and add these lines to it:

      INCLUDES="-I$HOME/netcdf-3.5.1/src/fortran"
      LIBS="-L$HOME/netcdf-3.5.1/src/libsrc -lnetcdf"

 c) Then use the custom optfile with MITgcm:

    $  genmake2 -mods=../code -of=$YOUR_CUSTOM_OPTFILE


The directions for Option #2 are:

 a) Talk to your local sysadmin and find out which Fortran compiler 
    they used and then pick (or write) an appropriate optfile for 
    that compiler.  Good examples are located in:

      MITgcm/tools/build_options/


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