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

Re: 970715: building netCDF 3.3.1 on NCAR's Crays



>To: address@hidden
>From: address@hidden (Mary Haley)
>Subject: building netCDF 3.3.1 on NCAR's Crays
>Organization: .
>Keywords: 199707152228.QAA02083

Hi Mary,

> I'm trying to build netCDF on NCAR's Crays, but am running to some
> warnings when I try to compile a program that uses the netCDF Fortran
> interface.
> 
> I have a simple program that just opens and closes a netCDF file:
> 
>       include 'netcdf.inc'
>       character*100 filename
>       filename = '/usr/local/ncarg/lib/ncarg/data/cdf/contour.cdf'      
>       ncid = ncopn(filename,0,ierr)
>       call ncclos(ncid,ierr)
>       stop
>       end
> 
> I copied the 'netcdf.inc' file into the same directory to be on the
> safe side.  Then, I tried to compile the program, and it gives me
> the following warnings:
> 
> antero[293] f90 -o testf testf.f lib/libnetcdf.a
>  ldr-133 f90: CAUTION 
>      Unsatisfied external references have been encountered.
>  
>  Unsatisfied external references
>  Entry name      Modules referencing entry 
>  
>  NF_GET_ATT_INT1  $MAIN
>  NF_GET_ATT_INT2  $MAIN
>  NF_GET_VAR1_INT1  $MAIN
>  NF_GET_VAR1_INT2  $MAIN
>  NF_GET_VARA_INT1  $MAIN
>  NF_GET_VARA_INT2  $MAIN
>  NF_GET_VARM_INT1  $MAIN
>  NF_GET_VARM_INT2  $MAIN
>  NF_GET_VARS_INT1  $MAIN
>  NF_GET_VARS_INT2  $MAIN
>  .
>  .
>  .
> 
> 
> Do you know what the problem might be?  I found these routines on another
> system (Solaris) in the netCDF 3.3.1 library, but on the Crays, these
> undefineds don't seem to be getting built in.

Offhand, it looks like you are trying to link against an old version of
the library, such as 2.4.3, rather than the new version you just built.
The routines above are part of the new 3.3.1 interface, and get compiled
and tested as part of building netcdf 3.3.1.  However, if you don't
install the resulting library where it will be found by default, or
explicitly reference the new library as I assume you meant to do with
"lib/libnetcdf.a" above), then probably the old version will be found
first.

If that's not the problem, then you could see how a Fortran test program
is linked to the new library and follow this example, assuming the test
worked OK when you typed "make test".  For example, if you change to the
src/ncgen/ directory and invoke "make test", you should see ncgen
creating a generating a test program named "ftest.f" and then compiling
it and linking it, before running it and comparing the output with the
expected output.  It will be a line something like:

  f90 -o ftest -O ftest.f ../libsrc/libnetcdf.a 

except using whatever Fortran options and flags the configure script
determines for the Cray.  You should be able to use the same options and
flags and identify the libnetcdf.a file using the appropriate relative
or absolute pathname to try linking your test program with the library.

Please let us know if this doesn't seem to help.

--Russ

_____________________________________________________________________

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