[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clarification on gennet



>To: address@hidden
>From: K V Ramesh <address@hidden>
>Subject: Re: 20000529: Clarification on gennet 
>Organization: Indian Institute of tropical Meteorology;Climate and Global 
>Modelling Division
>Keywords: Version 2 Fortran interface

Hi Ramesh,

> I installed netCDF package in our SUN solaris 5.7 Ultra 60.  I
> downloaded gennet.f . while compiling it cant able to find the
> following Subroutines. So please help me to get the Subroutines.
> "ncdinq, ncvinq, ncainq, ncanam, ncagtc, ncopn, ncinq"

These are names of subroutines in the netCDF Fortran-77 version 2
interface.  They are compiled and included in the netCDF library when
the library is built with the Fortran interface.  So first check that
you didn't omit the Fortran interface (which you could have done by
specifying the environment variable FC='' before invoking the
configure script, for example).

If the Fortran-77 interface was built, then invoking "make test"
should have included the tests of the subroutines in this interface,
and should have produced output something like this (after the tests
of the C interface):

  Making `test' in directory /scratch/russ/builds/buddy-opt/src/fortran

  + /opt/SUNWspro/bin/f77 -c -O -w ftest.F 
  /tmp/fpp.26521.0.f:
   MAIN ftest:
          tncacpy:
          tncadel:
          tncagt:
          tncapt:
   BLOCK DATA:
          tncddef:
          tncinq:
          tncredf:
          tncvdef:
          tncvgt:
          tncvgt1:
          tncvpt:
          tncvpt1:
          tfills:
  ar cru ../libsrc/libnetcdf.a fort-attio.o      fort-control.o  fort-dim.o     
 fort-genatt.o   fort-geninq.o   fort-genvar.o   fort-lib.o      fort-misc.o    
 fort-v2compat.o         fort-vario.o    fort-var1io.o   fort-varaio.o   
fort-varmio.o   fort-varsio.o
  ranlib ../libsrc/libnetcdf.a
  /opt/SUNWspro/bin/f77 -o ftest -O -w  ftest.o ../libsrc/libnetcdf.a 
  ./ftest
  *** Testing nccre ...
  *** Testing ncddef ...
  *** Testing ncvdef ...
  *** Testing ncapt, ncaptc ...
  *** Testing ncclos ...
  *** Testing ncvpt1 ...
  *** Testing ncvgt1 ...
  *** Testing ncvpt ...
  *** Testing ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq ...
  *** Testing ncvgt, ncvgtc ...
  *** Testing ncagt, ncagtc ...
  *** Testing ncredf, ncdren, ncvren, ncaren, ncendf ...
  *** Testing ncacpy ...
  *** Testing ncadel ...
  *** Testing fill values ...

if the tests ran successfully.  If they did, then that shows that the
libnetcdf.a library file does include the Fortran subroutines.  

If you installed it, perhaps you have just neglected to tell the
Fortran compiler where it's installed so it can link gennet.  For
example, if you installed the library in

  /usr/local/netcdf/lib/libnetcdf.a

then you should compile gennet.f using 

  -L /local/netcdf/lib -lnetcdf

flags, as in:

  f77 gennet.f -o gennet -L /local/netcdf/lib -lnetcdf

I hope this helps.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu