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

[netCDF #MLF-697840]: Parallel NetCDF 4.1.3 compile error finding HDFflush



> Ok.  Added the export statements back in, and the resulting output from
> the "configure" script is the same:
> 
> Script:
> #!/bin/bash
> # Proper header for a Bash script.
> 
> set -x
> 
> export H5DIR=/u/home/eylandej/hdf5
> export CC=/site/intel/impi/4.1.0.024/intel64/bin/mpicc
> echo $LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=${H5DIR}/lib:$LD_LIBRARY_PATH
> export CPPFLAGS="-I${H5DIR}/include -I/u/home/eylandej/zlib-1.2.7/include
> -I/u/home/eylandej/szip-2.1/include"
> export LDFLAGS="-L${H5DIR}/lib -L/u/home/eylandej/zlib-1.2.7/lib
> -L/u/home/eylandej/szip-2.1/lib"
> export LIBS=-ldl
> ./configure --prefix=/u/home/eylandej/netcdf-4.3.0 --enable-parallel-tests
> --disable-shared
> 
> exit

From the config.log file you sent,  it looks like you compiled HDF5
with --disable-shared, so all libraries that HDF5 depends on need to
be expicitly specified when linking.  But there's no "-lsz" for the
szip library, so that has to be added to LIBS, which should be:

  LIBS="-lsz -ldl"

If that doesn't work, keep sending the config.log and we should be able to
figure out if anything else is needed.

--Russ

> Screen output from configure:
> 
> 
> checking whether isinf is declared... yes
> checking whether isfinite is declared... yes
> checking whether signbit is declared... yes
> checking for struct stat.st_blksize... yes
> checking for IEEE floating point format... yes
> checking for size_t... (cached) yes
> checking for off_t... yes
> checking for ssize_t... yes
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking for longlong... no
> checking whether char is unsigned... no
> checking whether byte ordering is bigendian... no
> checking size of short... 2
> checking size of int... 4
> checking size of long... 8
> checking size of long long... 8
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 8
> checking size of size_t... 8
> checking for library containing deflate... none required
> checking for floor in -lm... yes
> checking for library containing H5Fflush... no
> configure: error: Can't find or link to the hdf5 library. Use
> --disable-netcdf-4, or see config.log for errors.
> + exit
> 
> While the above is identical to all results I've seen from each attempt to
> configure, I notice different errors in the config.log (see attached).
> The compile commands do have the hdf5 libs and include files corrected
> referenced, but still can't link to the Hdf5 library:
> 
> /* end confdefs.h.  */
> |
> | /* Override any GCC internal prototype to avoid an error.
> |    Use char because int might match the return type of a GCC
> |    builtin and then its argument prototype would still apply.  */
> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char H5Fflush ();
> | int
> | main ()
> | {
> | return H5Fflush ();
> |   ;
> |   return 0;
> | }
> configure:16246: result: no
> configure:16253: error: Can't find or link to the hdf5 library. Use
> --disable-netcdf-4, or see config.log for errors.
> 
> 
> 
> NOTE:  I'm using Intel MPI compiler...just in case you didn't see that.  I
> tried using OpenMPI, but had the same result as using IntelMPI.
> 
> John
> 
> 
> 
> 
> 
> --
> 
> 
> ________________________________________
> 
> John B. Eylander
> Cold Regions Research and Engineering Lab
> U.S. Army Engineer Research and Development Center
> 72 Lyme Road
> Hanover, NH  03755
> 
> PH:  603-646-4188    BB:  603-359-9717
> 
> Unclass:  address@hidden
> SIPR:  address@hidden
> JWICS:  address@hidden
> ________________________________________
> 
> 
> 
> 
> 
> 
> 
> On 7/30/13 3:33 PM, "Unidata netCDF Support"
> <address@hidden> wrote:
> 
> >John,
> >
> >> I am not running as root or sudo.  I don't have those privileges on the
> >> system.
> >>
> >> Also understand...the --with statements are ignored; however, I also
> >>have
> >> included the libraries in my LDFLAGS and CPPFLAGS environmental
> >>variables
> >> that I included in the --with statements.  I will clean up my configure
> >> script to remove the --with statements though.
> >>
> >> My config.log is attached.
> >
> >Are you exporting the environment variables LDFLAGS and CPPFLAGS?  One
> >way of doing this is preceding the invocation of configure but on the
> >same line, or you can also
> >give them as arguments to configure.  However, if you just define them in
> >the shell
> >in which configure is invoked, I don't think they get inherited by
> >configure's
> >subshell.
> >
> >I'm asking, because of these lines in the config.log you sent:
> >
> >  CC='/site/intel/impi/4.1.0.024/intel64/bin/mpicc'
> >   ...
> >  CPPFLAGS=''
> >   ...
> >  LDFLAGS=''
> >
> >and the compile lines that don't have the "-L" or "-I" flags needed to
> >find the
> >HDF5 libraries:
> >
> >  /site/intel/impi/4.1.0.024/intel64/bin/mpicc -o conftest -g -O2
> >conftest.c -lhdf5  -lm -lcurl  >&5
> >  /usr/bin/ld: cannot find -lhdf5
> >  collect2: ld returned 1 exit status
> >
> >Different shells have different syntax for exporting environment
> >variables, but
> >I think you only need to use
> >
> >  export CPPFLAGS="-I${H5DIR}/include
> >-I/u/home/eylandej/zlib-1.2.7/include -I/u/home/eylandej/szip-2.1/include"
> >
> >and similarly for LDFLAGS ...
> >
> >--Russ
> >
> >> On 7/30/13 2:43 PM, "Unidata netCDF Support"
> >> <address@hidden> wrote:
> >>
> >> >> Ok.  Thanks so far. I am now transitioning to go with your
> >>suggestion of
> >> >> compiling netcdf 4.3.0 first then compiling NetCDF 4.2 fortran.
> >> >>
> >> >> However...trying to compile NetCDF4.3.0 I get the exact same error as
> >> >>when
> >> >> I was trying to compile netcdf 4.1.3.
> >> >>
> >> >> My configure script (sets up the enviro variables, etc)
> >> >>
> >> >> In directory /u/home/eylandej/netcdf-4.3.0
> >> >>
> >> >> #!/bin/bash
> >> >> # Proper header for a Bash script.
> >> >>
> >> >> set -x
> >> >
> >> >Are you running configure using sudo or as root?  There can be
> >> >problems with inheriting environment variables with sudo, due to
> >> >security policies.  We recommend running configure and make check as a
> >> >normal user, and only using sudo for "make install".
> >> >
> >> >If that's not it, can you attach or otherwise make available the whole
> >> >config.log file created by the configure script.  Also, note that the
> >> >"--with-zlib=" and "--with-szip=" option syntax hasn't been supported
> >> >by the netCDF configure script for a while.  Instead, all the
> >> >information about libraries and header file locations is supposed to
> >> >be conveyed in the LDFLAGS and CPPFLAGS, and LD_LIBRARY_PATH
> >>environment
> >> >variables.  The configure script just ignores flags it doesn't
> >> >process, such as --with-zlib= ...  It also ignores CXX, as the
> >> >netcdf-4.3.0 distribution is only for the C libraries and utilities.
> >> >
> >> >--Russ
> >> >
> >> >> export H5DIR=/u/home/eylandej/hdf5
> >> >> CC=/site/intel/impi/4.1.0.024/intel64/bin/mpicc
> >> >> CXX=/site/intel/impi/4.1.0.024/intel64/bin/mpicxx
> >> >> echo $LD_LIBRARY_PATH
> >> >> LD_LIBRARY_PATH=${H5DIR}/lib:$LD_LIBRARY_PATH
> >> >> CPPFLAGS="-I${H5DIR}/include -I/u/home/eylandej/zlib-1.2.7/include
> >> >> -I/u/home/eylandej/szip-2.1/include"
> >> >> LDFLAGS="-L${H5DIR}/lib -L/u/home/eylandej/zlib-1.2.7/lib
> >> >> -L/u/home/eylandej/szip-2.1/lib"
> >> >> LIBS=-ldl
> >> >> ./configure --prefix=/u/home/eylandej/netcdf-4.3.0
> >> >> --with-zlib=/u/home/eylandej/zlib-1.2.7
> >> >> --with-szip=/u/home/eylandej/szip-2.1 \
> >> >> --enable-parallel-tests --disable-shared
> >> >>
> >> >> exit
> >> >>
> >> >>
> >> >>
> >> >> Here is the output of the ./configure script:
> >> >>
> >> >> checking for ssize_t... yes
> >> >> checking for ptrdiff_t... yes
> >> >> checking for uchar... no
> >> >> checking for longlong... no
> >> >> checking whether char is unsigned... no
> >> >> checking whether byte ordering is bigendian... no
> >> >> checking size of short... 2
> >> >> checking size of int... 4
> >> >> checking size of long... 8
> >> >> checking size of long long... 8
> >> >> checking size of float... 4
> >> >> checking size of double... 8
> >> >> checking size of off_t... 8
> >> >> checking size of size_t... 8
> >> >> checking for library containing deflate... none required
> >> >> checking for floor in -lm... yes
> >> >> checking for library containing H5Fflush... no
> >> >> configure: error: Can't find or link to the hdf5 library. Use
> >> >> --disable-netcdf-4, or see config.log for errors.
> >> >>
> >> >> I looked through the config.log file, but nothing seems obvious.
> >> >>
> >> >> I KNOW that H5Fflush is in the HDF libraries.  I ran a nm on the HDF5
> >> >> libs, and H5Fflush is in there.  I don't know why netcdf won't see
> >>that.
> >> >>
> >> >> John
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >>
> >> >> ________________________________________
> >> >>
> >> >> John B. Eylander
> >> >> Cold Regions Research and Engineering Lab
> >> >> U.S. Army Engineer Research and Development Center
> >> >> 72 Lyme Road
> >> >> Hanover, NH  03755
> >> >>
> >> >> PH:  603-646-4188    BB:  603-359-9717
> >> >>
> >> >> Unclass:  address@hidden
> >> >> SIPR:  address@hidden
> >> >> JWICS:  address@hidden
> >> >> ________________________________________
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On 7/30/13 1:28 PM, "Unidata netCDF Support"
> >> >> <address@hidden> wrote:
> >> >>
> >> >> >Hi John,
> >> >> >
> >> >> >We recommend this way to build with parallel I/O support:
> >> >> >
> >> >> >  http://www.unidata.ucar.edu/netcdf/docs/build_parallel.html
> >> >> >
> >> >> >This works for netCDF version 4.3.0, but I don't know for sure
> >> >> >whether it works for the older 4.1.3 release.  Is there some reason
> >> >> >you have to use version 4.1.3?  I notice you're building a separate
> >> >> >netCDF-Fortran library anyway, which is what you would do if you
> >> >> >first build and install netCDF-C library version 4.3.0, then build
> >> >> >and install netCDF-Fortran version 4.2 according to these
> >>instructions:
> >> >> >
> >> >> >
> >>http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html
> >> >> >
> >> >> >paying attention to the parallel I/O instructions in step 4, under
> >>the
> >> >> >"Using Static Libraries" section, if that's what you want to
> >>install.
> >> >> >
> >> >> >--Russ
> >> >> >
> >> >> >> Full Name: John Eylander
> >> >> >> Email Address: address@hidden
> >> >> >> Organization: Army Cold Regions Research & Eng. Lab
> >> >> >> Package Version: 4.1.3
> >> >> >> Operating System: RHEL 6.2 64-bit OS
> >> >> >> Hardware: 64-Bit
> >> >> >> Description of problem: I'm having extreme troubles compiling
> >>NetCDF
> >> >> >>4.1.3 (with parallel I/O support enabled).  I have HDF5 1.8.6
> >> >>installed
> >> >> >>and successfully compiled and installed.  I have searched all the
> >> >>google
> >> >> >>sources I know to try to find the right flag or option to turn
> >>off/on
> >> >> >>with no luck.  Here is my NetCDF compile script:
> >> >> >>
> >> >> >> HDF_DIR=/u/home/eylandej/hdf5
> >> >> >> export CC=/site/intel/impi/4.1.0.024/intel64/bin/mpicc
> >> >> >> export F77=/site/intel/impi/4.1.0.024/intel64/bin/mpif77
> >> >> >> export CXX=/site/intel/impi/4.1.0.024/intel64/bin/mpicxx
> >> >> >> export FC=/site/intel/impi/4.1.0.024/intel64/bin/mpif90
> >> >> >> echo $LD_LIBRARY_PATH
> >> >> >> export
> >> >>LD_LIBRARY_PATH=/u/home/eylandej/hdf5-1.8.6/lib:$LD_LIBRARY_PATH
> >> >> >> export FCFLAGS="-I/u/home/eylandej/hdf5/include
> >> >> >>-I/u/home/eylandej/zlib-1.2.7/include
> >> >> >>-I/u/home/eylandej/szip-2.1/include -m64"
> >> >> >> export CPPFLAGS="-I/u/home/eylandej/hdf5/include
> >> >> >>-I/u/home/eylandej/zlib-1.2.7/include
> >> >> >>-I/u/home/eylandej/szip-2.1/include -DpgiFortran"
> >> >> >> export FFLAGS="-I/u/home/eylandej/hdf5/include
> >> >> >>-I/u/home/eylandej/zlib-1.2.7/include
> >> >> >>-I/u/home/eylandej/szip-2.1/include -m64"
> >> >> >> export LDFLAGS="-L${HDF_DIR}/lib -L/u/home/eylandej/zlib-1.2.7/lib
> >> >> >>-L/u/home/eylandej/szip-2.1/lib"
> >> >> >> LIBS="-ldl -lz -lm -lhdf5 -lhdf5_hl -lhdf5_fortran
> >>-lhdf5hl_fortran"
> >> >> >> ./configure --prefix=/u/home/eylandej/netcdf-4.1.3
> >> >> >>--with-zlib=/u/home/eylandej/zlib-1.2.7
> >> >> >>--with-szip=/u/home/eylandej/szip-2.1 \
> >> >> >> --enable-netcdf-4 --enable-pnetcdf4 --disable-dap --disable-shared
> >> >> >>--enable-static \
> >> >> >> --enable-separate-fortran  --enable-f90 --with-udunits
> >>--with-libcf
> >> >> >>--enable-large-file-tests --enable-parallel-tests
> >> >> >>
> >> >> >> This is the error I get during the "configure" stage of compiling
> >> >> >>NetCDF:
> >> >> >>
> >> >> >> checking for ptrdiff_t... yes
> >> >> >> checking for uchar... no
> >> >> >> checking for longlong... no
> >> >> >> checking whether char is unsigned... no
> >> >> >> checking whether byte ordering is bigendian... no
> >> >> >> checking size of short... 2
> >> >> >> checking size of int... 4
> >> >> >> checking size of long... 8
> >> >> >> checking size of float... 4
> >> >> >> checking size of double... 8
> >> >> >> checking size of off_t... 8
> >> >> >> checking size of size_t... 8
> >> >> >> checking for library containing deflate... none required
> >> >> >> checking for floor in -lm... yes
> >> >> >> checking for library containing H5Fflush... no
> >> >> >> configure: error: Can't find or link to the hdf5 library. Use
> >> >> >>--disable-netcdf-4, or see config.log for errors.
> >> >> >> + exit
> >> >> >>
> >> >> >> I need to compile NetCDF 4 with parallel I/O support for WRF
> >>version
> >> >> >>3.4.1. Any ideas on what I have done wrong with my flags/options?
> >> >>I've
> >> >> >>been struggling with this for a couple of weeks...  Thanks in
> >>adance!
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >Russ Rew                                         UCAR Unidata
> >>Program
> >> >> >address@hidden
> >>http://www.unidata.ucar.edu
> >> >> >
> >> >> >
> >> >> >
> >> >> >Ticket Details
> >> >> >===================
> >> >> >Ticket ID: MLF-697840
> >> >> >Department: Support netCDF
> >> >> >Priority: Normal
> >> >> >Status: Closed
> >> >> >
> >> >>
> >> >>
> >> >
> >> >Russ Rew                                         UCAR Unidata Program
> >> >address@hidden                      http://www.unidata.ucar.edu
> >> >
> >> >
> >> >
> >> >Ticket Details
> >> >===================
> >> >Ticket ID: MLF-697840
> >> >Department: Support netCDF
> >> >Priority: Normal
> >> >Status: Closed
> >> >
> >>
> >>
> >>
> >Russ Rew                                         UCAR Unidata Program
> >address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> >Ticket Details
> >===================
> >Ticket ID: MLF-697840
> >Department: Support netCDF
> >Priority: Normal
> >Status: Closed
> >
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: MLF-697840
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.