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

[netCDF #WJJ-630102]: make checks fails for the f90 interface in netcdf 4.1.3



Greetings Martin,

There was a problem in the 4.1.3 release with using szlib and 
--enable-large-file-tests. There is a fix for this in the daily snapshot, which 
I recommend using as there have been other fixes as well. However, there have 
been a few changed to the library that you should be aware of as it affects how 
you run the configure scripts, and how to build the library for languages other 
than c (as they have now been split). The changes to the configure script 
basically come down to the removal of the --with-* flags (i.e. 
--with-szip=/path/to/szip); now, users need to specify the paths to the 
libraries they wish to include using the CPPFLAGS and LDFLAGS:
.....
[B]uild netcdf, specifying the location of the HDF5, zlib, and (if built into 
HDF5) the szip header files and libraries in the CPPFLAGS and LDFLAGS 
environment variables.

     CPPFLAGS="-I/home/sarms/szip/include -I/home/sarms/hdf5/include" 
LDFLAGS="-L/home/sarms/szip/lib -L/home/sarms/hdf5/lib" ./configure 
--prefix=/home/ed/local
     make check install
.....

If the libraries you wish to link with can be found in your system path, 
configure should pick those up automagically.

Also, please see the announcement below regarding the new was netCDF is 
distributed (contains the link to the daily snapshot). 

Cheers!

Sean

> ==============================================
> Date: Fri, 12 Aug 2011 06:39:09 -0600
> From: Ed Hartnett <address@hidden>
> To: address@hidden
> Subject: [netcdfgroup] time for fortran and C++ libraries to move out of
>    their parents' basement!
>
> Howdy all!
>
> For the upcoming netcdf-4.2 release, there will be a change in the
> packaging of the netCDF libraries. Until now, the Fortran 77, Fortran
> 90, C++, and the new C++ (a.k.a. CXX4) have all been packaged together.
>
> This will no longer be the case. Instead, the C library (with tools
> ncgen/ncdump/nccopy) will be released separately from the Fortran and
> C++ libraries.
>
> The netCDF daily snapshot
> (ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz)
> reflects this change. It now only builds the C library and
> ncgen/ncdump/nccopy. It no longer includes the C++ or Fortran libraries.
>
> The F77 and F90 libraries will continue to be released as one package,
> now called netcdf-fortran. A beta release can be found here:
> ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.2-beta1.tar.gz
>
> A beta of the new C++ library (netcdf-cxx4) can be found here:
> ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx4-4.2-beta1.tar.gz
>
> For backward compatibility, a distribution of the old C++ library
> (netcdf-cxx) is also available. It should not be used for new projects,
> as it does not include many important netCDF-4 features. A beta can be
> found here:
> ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2-beta1.tar.gz
>
> I have not updated the documentation with new build instructions, but in
> all cases, install the netcdf-4.1.3 C library (or the snapshot)
> somewhere, and then set CPPFLAGS and LDFLAGS to point to that spot for
> the builds of the fortran and C++ libraries.
>
> More beta releases, and then full 4.2 releases for the Fortran and C++
> libraries will come before the netCDF C library 4.2 release.
>
> These changes is intended to lighten our workload when new versions are
> released, and to provide the capability of doing a fortran or C++
> release without waiting for the next major C library release.
>
> Any feedback would be most appreciated. Please send it to:
> address@hidden
>
> Thanks!
>
> Ed
> --
> Ed Hartnett  -- address@hidden
>
> _______________________________________________
> netcdfgroup mailing list
> address@hidden
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/

















> Dear Sean,
> 
> I tried to do so. I have build szip and hdf5 first.
> 
> readelf -a libnetcdf.so| grep sz
> 
> 0x0000000000000001 (NEEDED)             Shared library: [libsz.so.2]
> 0x000000000000000f (RPATH)              Library rpath:
> [/sw/data/hdf5/SLED_11/1
> .8.6/lib:/sw/data/szip/SLED_11/2.1/lib:/sw/data/netcdf/SLED_11/4.1.3/lib]
> 0x000000000000001d (RUNPATH)            Library runpath:
> [/sw/data/hdf5/SLED_11
> /1.8.6/lib:/sw/data/szip/SLED_11/2.1/lib:/sw/data/netcdf/SLED_11/4.1.3/lib]
> 000000344588  01d000000007 R_X86_64_JUMP_SLO 000000000005e9c0 ncx_szof + 0
> 342: 000000000004e5b0   220 FUNC    GLOBAL DEFAULT   12 nc_inq_var_szip
> 464: 000000000005e9c0   130 FUNC    GLOBAL DEFAULT   12 ncx_szof
> 1023: 000000000005e9c0   130 FUNC    GLOBAL DEFAULT   12 ncx_szof
> 2032: 000000000004e5b0   220 FUNC    GLOBAL DEFAULT   12 nc_inq_var_szip
> <PHY-210:mschmidt>ls /sw/data/szip/SLED_11/2.1/lib
> libsz.a  libsz.la  libsz.so  libsz.so.2  libsz.so.2.0.0
> 
> So I think, things are there.
> 
> Configure was run as follows:
> 
> export CC=gcc
> export FC=gfortran
> export CXX=g++
> export CFLAGS="-O3 -fPIC   -Wl,-rpath,/sw/data/netcdf/SLED_11/4.1.3/lib
> -Wl,-rpath,/sw/data/hdf5/SLED_11/1.8.6/lib
> -I/sw/data/hdf5/SLED_11/1.8.6/include"
> export FCFLAGS="-O3 -fPIC  -Wl,-rpath,/sw/data/netcdf/SLED_11/4.1.3/lib
> -Wl,-rpath,/sw/data/hdf5/SLED_11/1.8.6/lib
> -I/sw/data/hdf5/SLED_11/1.8.6/include"
> export FFLAGS="-O3 -fPIC   -Wl,-rpath,/sw/data/netcdf/SLED_11/4.1.3/lib
> -Wl,-rpath,/sw/data/hdf5/SLED_11/1.8.6/lib
> -I/sw/data/hdf5/SLED_11/1.8.6/include"
> export F90FLAGS="-O3 -fPIC -Wl,-rpath,/sw/data/netcdf/SLED_11/4.1.3/lib
> -Wl,-rpath,/sw/data/hdf5/SLED_11/1.8.6/lib
> -I/sw/data/hdf5/SLED_11/1.8.6/include"
> export LDFLAGS="-fPIC -L/sw/data/netcdf/SLED_11/4.1.3/lib
> -L/sw/data/hdf5/SLED_11/1.8.6/lib"
> ./configure --with-szlib=/sw/data/szip/SLED_11/2.1
> --with-hdf5=/sw/data/hdf5/SLED_11/1.8.6 --enable-large-file-tests
> --enable-shared --enable-docs-install --prefix=/sw/data/netcdf/SLED_11/4.1.3
> 
> I think, the tests call features that are not in the netcdf code. Could
> it be, that configure does not include these features. I thought
> "--with-szlib" enables all features around this
> library?
> 
> Greetings,
> Martin
> 
> Unidata netCDF Support wrote:
> > Greetings Martin,
> >
> > Are you by any chance linking to szlib during your build?
> >
> > Cheers,
> >
> > Sean
> >
> >
> >> Hi,
> >> I am trying to build netcdf 4.1.3 and would like to have f90-support
> >> too. Without f90 I get everything running.
> >>
> >> I get a failure in make checks. I have found this also in several
> >> threads in the support e-mails, but no real answers.
> >>
> >> The reason is file
> >> nf_test/f90tst_vars2.f90
> >>
> >> CACHE_SIZE and CACHE_NELEMS are defined twice in the header and gfortran
> >> does not take this.
> >>
> >> As a guess I removed the first line and think that another compiler used
> >> at unidata takes the second definition.
> >> This line is removed:
> >> integer, parameter :: CACHE_NELEMS = 10000, CACHE_SIZE = 1000000
> >>
> >> Now the compiler complains about a wrong interface
> >>
> >> In file f90tst_vars2.f90:77
> >>
> >> call check(nf90_def_var(ncid, VAR5_NAME, NF90_INT, dimids, varid5,
> >> chunksizes
> >> 1
> >> Error: There is no specific function for the generic 'nf90_def_var' at (1)
> >>
> >> This comes from
> >> call check(nf90_def_var(ncid, VAR5_NAME, NF90_INT, dimids, varid5,
> >> chunksizes = chunksizes,&
> >> option_mask = nf90_szip_ec_option_mask, bits_per_pixel = 16))
> >>
> >> Indeed, in ../f90 the definition of nf90_def_var does not have
> >> option_mask, this keyword is generally not there.
> >> One could remove the last two parameters.
> >>
> >> Now:
> >> In file f90tst_vars2.f90:85
> >>
> >> call check(nf90_set_var_chunk_cache(ncid, varid1, CACHE_SIZE,&
> >> 1
> >> Error: Function 'nf90_set_var_chunk_cache' at (1) has no IMPLICIT type
> >>
> >> The compiler is right - nf90_set_var_chunk_cache is defined in some file
> >> in ../f90, which is not compiled.
> >> So I removed this call. The code compiles now but I get:
> >> STOP 1
> >> FAIL: f90tst_vars2
> >>
> >> So my question:
> >>
> >> - did I overlook something during configure or is there some code for
> >> future use in the code and the test suite, that lets the tests fail?
> >>
> >> Many thanks,
> >> Martin Schmidt
> >>
> >>
> >>
> >
> > Ticket Details
> > ===================
> > Ticket ID: WJJ-630102
> > Department: Support netCDF
> > Priority: Emergency
> > Status: Open
> >
> 
> 


Ticket Details
===================
Ticket ID: WJJ-630102
Department: Support netCDF
Priority: Emergency
Status: Open