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

Re: netCDF 5.0 F90 Error handling



>To: address@hidden
>From: Lifeng Luo <address@hidden>
>Subject: Re: 20011205: Re: netCDF 5.0 F90 Error handling
>Organization: Rutgers
>Keywords:

Hi Lifeng,

> I don't know where I should ask questions about netcdf lib.  I found
> your email address in NetCDF-F90 interface document page
> 
> http://www.unidata.ucar.edu/packages/netcdf/f90/index.html
> 
> So... I am here.

The best place to ask questions or report bugs is
address@hidden.  That way they will get routed to someone
who is here to answer them, even if I happen to be away from my email.

> I recently installed netcdf 5.0 lib on my Sun. But one problem I
> have is that the compiler cannot find the following function
> 
> nf90_strerror(status))
> 
> So the error handling subroutine in the F90 document is not woring
> for me.  Do you have any idea why? I linked libnetcdf.a when I
> compiled it. Other functions are all working fine.

I assume you mean netCDF version 3.5.0.

The nf90_strerror(ncerr) function is defined in the source file
netcdf/src/f90/netcdf_file.f90, so it should be in libnetcdf.a if that
library was correctly built and installed from the 3.5.0 sources and
if the configure script found a working Fortran 90 compiler.  As part
of installing netCDF, when you run "make test" it compiles, links, and
runs a Fortran90 test program in src/f90:

 Making `test' in directory /scratch/russ/builds/buddy0/src/f90

 /opt/SUNWspro/bin/f90 -o netcdf_test   netcdf_test.f90 netcdf.o typeSizes.o 
../libsrc/libnetcdf.a 
 *** Success ***

and that test program (src/f90/netcdf_test.f90) calls nf90_strerror
several times, so it could not have run if nf90_strerror were not in
the library.

Maybe you are trying to link to a library from a previous version of
netCDF before 3.5.0 (the first released version that included the
Fortran90 interface), or perhaps the library needs to be rebuilt since
a Fortran90 compiler was installed.  For instructions on rebuilding
the library from source, see

 http://www.unidata.ucar.edu/packages/netcdf/INSTALL.html

--Russ

_____________________________________________________________________

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