This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Ted, > Thank you for your prompt reply. Indeed, I did find the Fortran > subroutines, e.g. nf_open, in .../lib/libnetcdff.a. > > Previous version of libnetcdff.a seemed to be in directory .libs. > > Below is the result of running nc-config --all. > > After setting FC to pgf90, my config statement was > > config --prefix=/c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B > CPPFLAGS=-DpgiFortran As of version 4.1.3, we no longer support having Fortran, C, and C++ libraries all in the same library. They have to be linked separately. An announcement of this and the reasons why are in these 3 postings to the netcdfgroup mailing list: http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2011/msg00071.html http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2011/msg00103.html http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2011/msg00377.html I'm afraid users will have to change their Makefiles to add -lnetcdff after -lnetcdf, unless you can find a way to use your linker to combine the two libraries into one that will also work for shared libraries. --Russ > Ted > > > > 136 venusa: pwd > /usc-data/c/source/netcdf/netcdf-4.1.3 > 137 venusa: > 137 venusa: nc-config --all > > This netCDF 4.1.3 has been built with the following features: > > --cc -> gcc > --cflags -> -I/c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B/include > -DpgiFortran > --libs -> -L/c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B/lib -lnetcdf > > --cxx -> g++ > --has-c++ -> yes > > --fc -> pgf90 > --fflags -> -g -I/c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B/include > --flibs -> -L/c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B/lib -lnetcdff > -lnetcdf > --has-f77 -> yes > --has-f90 -> yes > > --has-dap -> yes > --has-nc2 -> yes > --has-nc4 -> no > --has-hdf5 -> no > --has-hdf4 -> no > --has-pnetcdf-> no > --has-szlib -> > > --prefix -> /c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B > --includedir-> /c/source/netcdf/netcdf-4.1.3-64-pgf90.11.10B/include > --version -> netCDF 4.1.3 > > 138 venusa: > > > > ----- Original Message ----- > From: "Unidata netCDF Support" <address@hidden> > To: address@hidden > Cc: address@hidden > Sent: Tuesday, January 31, 2012 7:49:15 AM > Subject: [netCDF #PWR-674353]: NETCDF library question > > Hi Ted, > > > I just finished installing the latest version (4.1.3) of netcdf.a > > on our Linux64 computer venus. > > > > Users are getting unresolved references to nf_open and other nf_* > > subroutines, e.g. nf_inq_dimid. > > > > These were in the 4.1.1 version of netcdf.a. > > > > Are the nf_* subroutines no longer supported? > > They are still supported (and we're committed to supporting that version > 2 Fortran API for the foreseeable future). Some possibilities why > you don't see them include: > > - They were installed in a separate Fortran library, libnetcdff.a (note > the "ff"), so to link an application requires -lnetcdf -lnetcdff > - The 4.1.3 library was built with that API disabled, which is not the > default, but requires one of the configure options --disable-v2, > --disable-f77, --disable-fortran, or --enable-c-only. > - The configure script was unable to find a Fortran compiler that worked > for Fortran-77 or was unable to link objects created by the C compiler > with the Fortran compiler it found. > > Looking at the output from running "nc-config --all" or the output of the > configure script from when the 4.1.3 library was built may clarify what's > going on. > > --Russ > > > Ted Terpstra > > General Atomics - Fusion > > San Diego, CA > > > > > > 4.1.1 netcdf.a > > > > 163 venusa: nm /c/source/netcdf/netcdf-4.1.1/lib/libnetcdf.a | fgrep -i > > inq_dimid > > 0000000000000439 T nc_inq_dimid > > U nc_inq_dimid > > 0000000000000673 t __netcdf_nf90_inq_dimid_END > > 0000000000000640 T netcdf_nf90_inq_dimid_ > > U nf_inq_dimid_ > > U nc_inq_dimid > > 0000000000000373 T nf_inq_dimid_ > > > > ------------------------------------------------------------------------------------ > > > > 4.1.3 netcdf.a > > > > 164 venusa: nm /c/source/netcdf/netcdf-4.1.3/lib/libnetcdf.a | fgrep -i > > inq_dimid > > U nc_inq_dimid > > 0000000000000230 T nc_inq_dimid > > 0000000000000530 T NC3_inq_dimid > > U NC3_inq_dimid > > 165 venusa: > > > > > > Russ Rew UCAR Unidata Program > address@hidden http://www.unidata.ucar.edu > > > > Ticket Details > =================== > Ticket ID: PWR-674353 > Department: Support netCDF > Priority: Normal > Status: Closed > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: PWR-674353 Department: Support netCDF Priority: Normal Status: Closed