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.
> 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