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.
Hi Nicolas, For netcdf-4.3.0 (and any netCDF version since 4.1.2 from 2011), the "--with-hdf5=..." is not a supported configure option. Instead, you need to specify the location of the installed HDF5 library with the environment variables CPPFLAGS and LDFLAGS, as described here: http://www.unidata.ucar.edu/netcdf/docs/build_default.html If you're intrested, the reasons for dropping the use of the with-hdf5= option are explained here: http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2011/msg00345.html Also, buiding and installing the netcdf-fortran 4.2 library depends on first installing the netCDF C library, currently at version 4.3.0, as described here: http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html Compiling with parallel access enabled depends on the HDF5 library having been built with parallel access, and the use of parallel compilers, as you have specified: http://www.unidata.ucar.edu/netcdf/docs/build_parallel.html Good luck, and let us know if you encounter additional problems with the build. --Russ > I'm trying to compile netcdf-4 with parallel access enabled. > So I'm using the intel composer XE suite 2013 (composer_xe_2013_sp1) but > can't compile the netcdf lib... here are my commands : > > # the C compiler (Composer XE suite) > export CC=mpiicc > # the C++ compiler, the intel one. > export CXX=mpiicpc > # the Fortran 9X compiler. > export FC=mpiifort > # the Fortran 77 compiler. For intel, is just the fortran one. > export F77=mpif77 > # C Compiler flags > export CFLAGS="-O3 -xHost -axSSE4.2 -fPIC" > # F9X Compiler flags > export FCFLAGS="-O3 -xHost -axSSE4.2 -fPIC" > # F77 Compiler flags > export FFLAGS="-O3 -xHost -axSSE4.2 -fPIC" > # CXX Compiler flags > export CXXFLAGS="-O3 -xHost -axSSE4.2 -fPIC" > # Linker flags > export LDFLAGS="-Wl,-rpath=/opt/intel/lib > -Wl,-rpath=/opt/intel/lib/intel64 -i-dynamic" > > Zlib (compiled successfully) : > > wget > downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz > tar -xvf zlib-1.2.8.tar.gz > cd zlib-1.2.8 > ./configure --prefix=/home/OASIS/nnajdovski/local/zlib --64 > make clean; make all check install > cd ../ > > HDF5 (compiled successfully) : > > wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz > tar -xvf hdf5-1.8.12.tar.gz > cd hdf5-1.8.12/ > ./configure --prefix=/home/OASIS/nnajdovski/local/hdf5 > --enable-fortran --with-zlib=/home/OASIS/nnajdovski/local/ > --enable-parallel > make clean; make all check install > cd ../ > > SUMMARY OF THE HDF5 CONFIGURATION > ================================= > > General Information: > ------------------- > HDF5 Version: 1.8.12 > Configured on: Mon Nov 25 09:26:12 CET 2013 > Configured by: nnajdovski@eliegeo09 > Configure mode: production > Host system: x86_64-unknown-linux-gnu > Uname information: Linux eliegeo09 3.4.63-2.44-desktop #1 SMP > PREEMPT Wed Oct 2 11:18:32 UTC 2013 (d91a619) x86_64 x86_64 > x86_64 GNU/Linux > Byte sex: little-endian > Libraries: static > Installation point: /home/OASIS/nnajdovski/local/hdf5 > > Compiling Options: > ------------------ > Compilation Mode: production > C Compiler: /opt/intel/impi/4.1.1.036/bin64/mpiicc ( Intel(R) C > Intel(R) 64 Compiler Version 14.0.0.080 Build 20130728) > CFLAGS: -O3 -xHost -axSSE4.2 -fPIC > H5_CFLAGS: -std=c99 -O > AM_CFLAGS: > CPPFLAGS: > H5_CPPFLAGS: -D_POSIX_C_SOURCE=199506L -DNDEBUG -UH5_DEBUG_API > AM_CPPFLAGS: -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE > -D_BSD_SOURCE > Shared C Library: no > Static C Library: yes > Statically Linked Executables: no > LDFLAGS: -Wl,-rpath=/opt/intel/lib > -Wl,-rpath=/opt/intel/lib/intel64 -i-dynamic > H5_LDFLAGS: > AM_LDFLAGS: > Extra libraries: -lz -ldl -lm > Archiver: ar > Ranlib: ranlib > Debugged Packages: > API Tracing: no > > Languages: > ---------- > Fortran: yes > Fortran Compiler: /opt/intel/impi/4.1.1.036/bin64/mpiifort ( > Intel(R) Fortran Intel(R) 64 Compiler Version 14.0.0.080 Build > 20130728) > Fortran 2003 Compiler: no > Fortran Flags: -O3 -xHost -axSSE4.2 -fPIC > H5 Fortran Flags: -O3 > AM Fortran Flags: > Shared Fortran Library: no > Static Fortran Library: yes > > C++: no > > Features: > --------- > Parallel HDF5: yes > High Level library: yes > Threadsafety: no > Default API Mapping: v18 > With Deprecated Public Symbols: yes > I/O filters (external): deflate(zlib) > I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset > MPE: > Direct VFD: no > dmalloc: no > Clear file buffers before write: yes > Using memory checker: no > Function Stack Tracing: no > GPFS: no > Strict File Format Checks: no > Optimization Instrumentation: no > Large File Support (LFS): yes > > > NETCDF-4 (Compilation failed) : > > wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.0.tar.gz > tar -xvf netcdf-4.3.0.tar.gz > cd netcdf-4.3.0/ > ./configure --prefix=/home/OASIS/nnajdovski/local/netcdf > --with-hdf5=/home/OASIS/nnajdovski/local/hdf5/ --enable-fortran=yes > --enable-netcdf4=yes > make clean; make check install -j 2 > export > LD_LIBRARY_PATH=/home/OASIS/nnajdovski/local/netcdf/lib:$LD_LIBRARY_PATH > > configure: WARNING: unrecognized options: --with-hdf5 > configure: loading site script > /usr/share/site/x86_64-unknown-linux-gnu > > > cd ../ > wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.2.tar.gz > tar -xvf netcdf-4.2.tar.gz > cd netcdf-fortran-4.2/ > CPPFLAGS=-I/home/OASIS/nnajdovski/local/netcdf/include > LDFLAGS=-L/home/OASIS/nnajdovski/local/netcdf/lib ./configure > --prefix=/home/OASIS/nnajdovski/local/netcdf > --with-hdf5=/home/OASIS/nnajdovski/local/hdf5/ --enable-netcdf4=yes > make clean; make check install -j 2 > > configure: WARNING: unrecognized options: --with-hdf5, > --enable-netcdf4 > > cd .. && /bin/sh ./config.status fortran/nfconfig1.inc > fort-nc4.c(204): warning #167: argument of type "const int *" is > incompatible with parameter of type "const long long *" > FCALLSCFUN4(NF_INT, nc_put_var1_longlong, NF_PUT_VAR1_INT64, > nf_put_var1_int64, > ^ > > fort-nc4.c(206): warning #167: argument of type "const int *" is > incompatible with parameter of type "const long long *" > FCALLSCFUN5(NF_INT, nc_put_vara_longlong, NF_PUT_VARA_INT64, > nf_put_vara_int64, > ^ > > fort-nc4.c(208): warning #167: argument of type "const int *" is > incompatible with parameter of type "const long long *" > FCALLSCFUN6(NF_INT, nc_put_vars_longlong, NF_PUT_VARS_INT64, > nf_put_vars_int64, > ^ > > fort-nc4.c(210): warning #167: argument of type "int *" is > incompatible with parameter of type "const long long *" > FCALLSCFUN7(NF_INT, nc_put_varm_longlong, NF_PUT_VARM_INT64, > nf_put_varm_int64, > ^ > > fort-nc4.c(212): warning #167: argument of type "int *" is > incompatible with parameter of type "const long long *" > FCALLSCFUN3(NF_INT, nc_put_var_longlong, NF_PUT_VAR_INT64, > nf_put_var_int64, > ^ > > fort-nc4.c(215): warning #2330: argument of type "const int *" > is incompatible with parameter of type "long long *" (dropping > qualifiers) > FCALLSCFUN4(NF_INT, nc_get_var1_longlong, NF_GET_VAR1_INT64, > nf_get_var1_int64, > ^ > > fort-nc4.c(217): warning #2330: argument of type "const int *" > is incompatible with parameter of type "long long *" (dropping > qualifiers) > FCALLSCFUN5(NF_INT, nc_get_vara_longlong, NF_GET_VARA_INT64, > nf_get_vara_int64, > ^ > > fort-nc4.c(219): warning #2330: argument of type "const int *" > is incompatible with parameter of type "long long *" (dropping > qualifiers) > FCALLSCFUN6(NF_INT, nc_get_vars_longlong, NF_GET_VARS_INT64, > nf_get_vars_int64, > ^ > > fort-nc4.c(221): warning #167: argument of type "int *" is > incompatible with parameter of type "long long *" > FCALLSCFUN7(NF_INT, nc_get_varm_longlong, NF_GET_VARM_INT64, > nf_get_varm_int64, > ^ > > fort-nc4.c(223): warning #167: argument of type "int *" is > incompatible with parameter of type "long long *" > FCALLSCFUN3(NF_INT, nc_get_var_longlong, NF_GET_VAR_INT64, > nf_get_var_int64, > ^ > > config.status: creating fortran/nfconfig1.inc > make[3] : on quitte le répertoire « > /home/OASIS/nnajdovski/local/netcdf-fortran-4.2/fortran » > libtool: compile: mpiicc -DHAVE_CONFIG_H -I. -I.. -DDLL_EXPORT > -I/home/OASIS/nnajdovski/local/netcdf/include -O3 -xHost > -axSSE4.2 -fPIC -MT fort-nc4.lo -MD -MP -MF .deps/fort-nc4.Tpo > -c fort-nc4.c -o fort-nc4.o >/dev/null 2>&1 > /bin/sh ../libtool --tag=FC --mode=link mpiifort -O3 -xHost > -axSSE4.2 -fPIC -version-number 5:3:1 > -L/home/OASIS/nnajdovski/local/netcdf/lib -o libnetcdff.la > -rpath /home/OASIS/nnajdovski/local/netcdf/lib64 fort-attio.lo > fort-control.lo fort-dim.lo fort-genatt.lo fort-geninq.lo > fort-genvar.lo fort-lib.lo fort-misc.lo fort-v2compat.lo > fort-vario.lo fort-var1io.lo fort-varaio.lo fort-varmio.lo > fort-varsio.lo fort-nc4.lo ../f90/libnetcdff90.la -lnetcdf > libtool: link: mpiifort -shared .libs/fort-attio.o > .libs/fort-control.o .libs/fort-dim.o .libs/fort-genatt.o > .libs/fort-geninq.o .libs/fort-genvar.o .libs/fort-lib.o > .libs/fort-misc.o .libs/fort-v2compat.o .libs/fort-vario.o > .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o > .libs/fort-varsio.o .libs/fort-nc4.o --whole-archive > ../f90/.libs/libnetcdff90.a --no-whole-archive > -L/home/OASIS/nnajdovski/local/netcdf/lib -lnetcdf -soname > libnetcdff.so.5 -o .libs/libnetcdff.so.5.3.1 > ifort: command line warning #10006: ignoring unknown option > '-fwhole-archive' > ifort: command line warning #10006: ignoring unknown option > '-fno-whole-archive' > ifort: command line warning #10006: ignoring unknown option > '-soname' > *ifort: error #10236: File not found: 'libnetcdff.so.5'* > make[2]: *** [libnetcdff.la] Erreur 1 > make[2] : on quitte le répertoire « > /home/OASIS/nnajdovski/local/netcdf-fortran-4.2/fortran » > make[1]: *** [install] Erreur 2 > make[1] : on quitte le répertoire « > /home/OASIS/nnajdovski/local/netcdf-fortran-4.2/fortran » > make: *** [install-recursive] Erreur 1 > > > What am I doing wrong? > > Thanks, > > Best, > Nicolas > > > > > -- > > > > * > NAJDOVSKI Nicolas - PhD Student > **Earthand Life Institute <http://www.uclouvain.be/eli>***/- > //Environment <http://www.uclouvain.be/elie>/ > Université catholique de Louvain <http://www.uclouvain.be> > Croix du Sud, 2 - L7.05.16 > 1348 Louvain-la-Neuve, Belgium > Tél +32 (0) 10 47 88 97 > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: TYA-988003 Department: Support netCDF Priority: Normal Status: Closed