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

[netCDF #BUI-278362]: Netcdf-C-4.7.1 installs perfect but NOT netcdf-fortran, please help



Hello,

There is a bug that prevents the current version of netCDF-Fortran from linking 
against a C library that lacks netCDF-4 support.  For the time being, I'd 
recommend using the latest C library and version 4.5.0 of netCDF-Fortran.  We 
are working on a fix for this that will be released ASAP.  

I hope this helps,

-Ward


> sorry, but I got a bit lost here. In the following webpage and everywhere
> in their website, people are suggesting using netcdf libraries (latest
> versions) but without enabling -netcdf-4. I have asked them too but haven't
> gotten a reply yet.
> 
> This is from the EPA webpage.
> https://github.com/USEPA/CMAQ/blob/master/DOCS/Users_Guide/CMAQ_UG_ch03_preparing_compute_environment.md
> On this page, if you check under netCDF library section you can see " Users
> should install *classic shared netCDF C and Fortran libraries only without
> netCDF4, HDF5, HDF4, DAP client, PnetCDF, or zlib support.* In order to do
> so, users should provide the appropriate flags to build and install minimal
> netCDF-3 with no DAP client support, such as --disable-netcdf-4 and
> --disable-dap, at the configure stage for netCDF C."
> 
> I wonder if this was never possible to install netcdf C and netcdf Fortran
> libraries using --disable-netcdf-4?
> 
> Thanks for your patience.
> 
> 
> 
> address@hidden> wrote:
> 
> > Hello,
> >
> > You will need to recompile netcdf-c with netcdf-4 support enabled.  We
> > will address this in the netcdf-fortran library, as it should not *require*
> > netcdf-4 support, but apparently it currently does.  That would explain the
> > missing symbols in libnetcdf, as they are required by netcdf-4.
> >
> > My apologies, I hope this helps,
> >
> > -Ward
> >
> > > Just a kind reminder. I wonder if you had a chance to look into this
> > issue?
> > >
> > > Thank you.
> > >
> > > On Wed, Sep 4, 2019 at 2:44 PM Janak Joshi <address@hidden> wrote:
> > >
> > > > Thank you for the reply.  As I was trying with another gcc version
> > 9.2.0
> > > > to see if things would change, but I still get the same error as with
> > > > gcc9.1.0.
> > > >
> > > >  nm
> > > >
> > /home/ytang/jjoshi/softwares/cmaq_libsgcc9.2.0/netcdf-c-4.7.1-gcc9.2.0/lib/libnetcdf.so
> > > > | grep nc_inq_var_chunking_ints    gives nothing, meaning it didn't
> > find
> > > > the argument in search.
> > > >
> > > >
> > > > The config.log file for netcdf-c is attached. Moreover, all the outputs
> > > > from running the script to install netcdf libraries is also attached
> > (named
> > > > nohup.out_netcdfs).
> > > >
> > > >
> > > > Thank you.
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Joshi
> > > >
> > > >
> > > >
> > > >
> > > > address@hidden> wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> If you run the following command, what is the output you get?
> > > >>
> > > >>     $ nm
> > > >>
> > /home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib/libnetcdf.so
> > > >> | grep nc_inq_var_chunking_ints
> > > >>
> > > >> If you see this symbol defined, it would suggest that there is another
> > > >> libnetcdf library on your system somewhere that the compiler is
> > picking up,
> > > >> instead of the more recently compiled one.  If it does not appear to
> > be
> > > >> defined, can you send the config.log generated when you compile
> > netcdf-c?
> > > >>
> > > >> Thanks!
> > > >>
> > > >> -Ward
> > > >>
> > > >> > Hi there,
> > > >> > I have been struggling for a long time in installing correctly the
> > > >> > netcdf-fortran and netcdf-c libraries. The details are below.
> > > >> >
> > > >> > 1. Finally, I am able to install netcdf-c-4.7.1 with all tests
> > passed.
> > > >> > 2. None of the fortran-netcdf's (tried with 4.4.5, 4.4.5, 4.5.0) are
> > > >> > installing
> > > >> >
> > > >> > Files for more information
> > > >> > (I) My script used for installing the libraries is attached (named
> > > >> > script.sh)
> > > >> > (II) config.log from netcdf-fortran (config.log_fortran)
> > > >> > (III) nohup.out( all outputs from executing script.sh)
> > > >> > (Iv) readelf.out (the result of readelf -Ws libnetcdff.so in
> > > >> > netcdf-fortran-4.5.0/fortran/.libs directory)
> > > >> >
> > > >> > The 'make check'  gives:
> > > >> >
> > > >> > Making check in libsrc
> > > >> > make[1]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/libsrc'
> > > >> > make[1]: Nothing to be done for `check'.
> > > >> > make[1]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/libsrc'
> > > >> > Making check in fortran
> > > >> > make[1]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> > > >> > make  check-am
> > > >> > make[2]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> > > >> > make[2]: Nothing to be done for `check-am'.
> > > >> > make[2]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> > > >> > make[1]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> > > >> > Making check in nf_test
> > > >> > make[1]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > make  check-am
> > > >> > make[2]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > make  nf_test tst_int64 tst_f77_v2 ftest nf03_test f03test
> > tst03_f77_v2
> > > >> > make[3]: Entering directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > /bin/sh ../libtool  --tag=F77   --mode=link
> > > >> > /home/ytang/jjoshi/compilers/gcc9.1.0/bin/gfortran -I../fortran -O
> > > >> >
> > > >>
> > -L/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> > > >> > -o nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o
> > > >> nf_test.o
> > > >> > test_read.o test_write.o util.o f03lib.o ../fortran/libnetcdff.la
> > -ldl
> > > >> -lm
> > > >> > -lnetcdf
> > > >> > libtool: link: /home/ytang/jjoshi/compilers/gcc9.1.0/bin/gfortran
> > > >> > -I../fortran -O -o .libs/nf_test f03lib_f_interfaces.o test_get.o
> > > >> > test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o
> > f03lib.o
> > > >> >
> > > >>
> > -L/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> > > >> > ../fortran/.libs/libnetcdff.so -ldl
> > > >> >
> > > >>
> > /home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib/libnetcdf.so
> > > >> > -lm -Wl,-rpath
> > > >> >
> > > >>
> > -Wl,/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0-gcc9.1.0/lib
> > > >> > -Wl,-rpath
> > > >> >
> > > >>
> > -Wl,/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_set_chunk_cache_ints'
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_inq_var_chunking_ints'
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_get_chunk_cache_ints'
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_set_var_chunk_cache_ints'
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_get_var_chunk_cache_ints'
> > > >> > ../fortran/.libs/libnetcdff.so: undefined reference to
> > > >> > `nc_def_var_chunking_ints'
> > > >> > collect2: error: ld returned 1 exit status
> > > >> > make[3]: *** [nf_test] Error 1
> > > >> > make[3]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > make[2]: *** [check-am] Error 2
> > > >> > make[2]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > make[1]: *** [check] Error 2
> > > >> > make[1]: Leaving directory
> > > >> >
> > > >>
> > `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> > > >> > make: *** [check-recursive] Error 1
> > > >> >
> > > >> > Please, any help would be a great relief.
> > > >> >
> > > >> > Thanks
> > > >> > Regards
> > > >> > Janak
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >> Ticket Details
> > > >> ===================
> > > >> Ticket ID: BUI-278362
> > > >> Department: Support netCDF
> > > >> Priority: Normal
> > > >> Status: Closed
> > > >> ===================
> > > >> NOTE: All email exchanges with Unidata User Support are recorded in
> > the
> > > >> Unidata inquiry tracking system and then made publicly available
> > through
> > > >> the web.  If you do not want to have your interactions made available
> > in
> > > >> this way, you must let us know in each email you send to us.
> > > >>
> > > >>
> > > >>
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: BUI-278362
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> > ===================
> > NOTE: All email exchanges with Unidata User Support are recorded in the
> > Unidata inquiry tracking system and then made publicly available through
> > the web.  If you do not want to have your interactions made available in
> > this way, you must let us know in each email you send to us.
> >
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: BUI-278362
Department: Support netCDF
Priority: High
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.