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

[netCDF #AAT-303974]: Can I build netcdf with both hdf4 and hdf5 support and szip not being recognized



Minor point. You can remove the --enable-fortran flags for hdf5 and hdf4
unless you need to call them directly from fortran (as opposed to
accessing them only thru the netcdf-c library)

> 
> From last email i have tried to compile netcdt 4.6.2 with hdf4 and it
> fails, as can seen in the screen shot below
> 
> [image: image.png]
> 
> 
> What I did:
> 
> configured hdf-4.2.13 like this:
> CC=icc CFLAGS='-O3 -xHost -ip -m64 -fPIC' F9X=ifort CXX=icpc
> CXXFLAGS="-fPIC" F77=ifort \
> ./configure
> --prefix=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL
> --enable-fortran --disable-netcdf --enable-production \
> --with-zlib=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL \
> --with-jpeg=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL \
> --with-szlib=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL
> 2>&1  | tee logHDF4_CONFIG.txt
> 
> 
> configured hdf5 like this:
> CC=icc CFLAGS='-O3 -xHost -ip -m64 -fPIC' CXX=icpc F9X=ifort FC=ifort
> FCFLAGS='-O3 -xHost -ip -m64' \
> ./configure
> --prefix=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL
> --enable-fortran --enable-cxx --enable-shared \
> --with-zlib=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL \
> --with-szlib=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL
> 2>&1 | tee logHDF5_INTEL_CONFIG.txt
> 
> 
> configured 4.6.2 liek this:
> CC=icc CXX=icpc CFLAGS='-O3 -xHost -ip -no-prec-div -fPIC' CXXFLAGS='-O3
> -xHost -ip -no-prec-div'\
> F77=ifort FC=ifort F90=ifort FFLAGS='-O3 -xHost -ip -no-prec-div' CPP='icc
> -E'\
> CXXCPP='icpc -E' \
> ./configure --enable-netcdf-4 --enable-shared --enable-hdf4
> --enable-hdf4-file-tests \
> --prefix=/home/rwasokadt1/BUILD_PREREQ_SUPER_Aug2018_ncdf4/INSTALL 2>&1 |
> tee logCONFIG_Netcdf_C_462.txt
> 
> 
> the error files are attached
> 
> 
> tried with nc-c-4.4.1.1 and still its not working
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> address@hidden> wrote:
> 
> > Yes, you should be able to build a netcdf library that supports both
> > netcdf-enhanced(hdf5) and hdf4(read-only).
> > By default, the hdf5 support is enabled, so you should just
> > be able to add the --enable-hdf4 option to ./configure
> > to get what you want.
> > Dont forget to add the path to the hdf4 library to LDFLAGS
> > before building.
> >
> > As for szip, it is not normally enabled by either hdf4 or hdf5,
> > so you will have to rebuild those libraries with szip support
> > (if you did not already do this).
> > Then when you build the netcdf library, if it detects that hdf5 was
> > built with szip support, it will build the netcdf library with szip
> > support.
> > Not sure why nc-config is not showing szip; probably an error in our
> > configuration process.
> > You might look at the file "libnetcdf.settings" that should exist
> > in the netcdf build directory and see if it mentions szip.
> >
> >
> > >
> > > I have codes that need netcdf with hdf4 support and also newer codes that
> > > require netcdf with hdf5 support. Can i compile a single netcdf program
> > > with both hdf4 and hdf4 support or i must have two builds of netcdf i.e.
> > > one with hdf4 and another with hdf5? If i can do both in one netcdf
> > > program, how?
> > >
> > > Secondly, how do i ensure that szip is recognized or captured in the
> > netcdf
> > > build/compilation; szip is not being recognized when I do nc-config
> > --all ?
> > > See below
> > >
> > > *NB - i am building all my prerequisites i.e - szip, zlib and hdf5 into
> > the
> > > same directories*
> > >
> > >
> > > $nc-config --all
> > >
> > > --cc        -> icc
> > > --cflags    -> -I/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/include
> > > -I/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/include
> > > --libs      -> -L/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/lib -lnetcdf
> > >
> > > --has-c++   -> no
> > > --cxx       ->
> > >
> > > --has-c++4  -> no
> > > --cxx4      ->
> > >
> > > --has-fortran -> no
> > > --has-dap     -> yes
> > > --has-nc2     -> yes
> > > --has-nc4     -> yes
> > > --has-hdf5    -> yes
> > > --has-hdf4    -> no        # can i have both  hdf4 and hdf5 enabled
> > > --has-logging  -> no
> > > --has-pnetcdf  -> no
> > > --has-szlib ->             # how come there is nothing here? but its
> > > compiled into hdf5
> > >
> > > --prefix    -> /home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL
> > > --includedir-> /home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/include
> > > --libdir    -> /home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/lib
> > > --version   -> netCDF 4.4.1.1
> > >
> > >
> > > *Compilation configurations*
> > >
> > > export CPPFLAGS="-I/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/include"
> > > export LDFLAGS="-L/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/lib"
> > >
> > >
> > > ## zlib
> > > CC=icc CFLAGS='-O3 -xHost -ip -m64' \
> > > ./configure --prefix=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL 2>&1 |
> > > tee logZLIB1211_INTEL_CONFIG.txt
> > >
> > >
> > > ##szip
> > > ./configure --prefix=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL 2>&1 |
> > tee
> > > logSZIP_INTEL_CONFIG.txt
> > >
> > > ###  hdf5-1.8.16
> > > CC=icc CFLAGS='-O3 -xHost -ip -m64' CXX=icpc F9X=ifort FC=ifort
> > > FCFLAGS='-O3 -xHost -ip -m64' \
> > > ./configure --prefix=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL
> > > --enable-fortran --enable-cxx \
> > > --with-zlib=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL \
> > > --with-szlib=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL 2>&1 | tee
> > > logHDF5_INTEL_CONFIG.txt
> > >
> > > ### LD_LIBRARY_PATH
> > > export
> > >
> > LD_LIBRARY_PATH="/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL/lib:$LD_LIBRARY_PATH"
> > >
> > >
> > > #### netcdf-4.4.1.1
> > > # options --with-zlib/hdf5/szlib though on the unidata website dont
> > work; I
> > > do
> > > CC=icc CXX=icpc CFLAGS='-O3 -xHost -ip -no-prec-div' CXXFLAGS='-O3 -xHost
> > > -ip -no-prec-div'\
> > > F77=ifort FC=ifort F90=ifort FFLAGS='-O3 -xHost -ip -no-prec-div'
> > CPP='icc
> > > -E'\
> > > CXXCPP='icpc -E' \
> > > ./configure --enable-netcdf-4 --enable-shared
> > > --prefix=/home/rwas/BUILD_PREREQ_SUPER_ncdf4/INSTALL 2>&1 | tee
> > > logNetcdfC4411.txt
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > > --------
> > > Tendayi
> > >
> > >
> >
> > =Dennis Heimbigner
> >   Unidata
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: AAT-303974
> > Department: Support netCDF
> > Priority: Normal
> > Status: Open
> > ===================
> > 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.
> >
> >
> >
> 
> --
> Donald T Rwasoka
> 
> 
> "You cannot solve the problems of today by the same thinking that created
> them"
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: AAT-303974
Department: Support netCDF
Priority: Normal
Status: Open
===================
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.