Problems with parallel support

Dear users/devs,

I am trying to install HDF5 with parallel support for using with NetCDF and PNetCDF. make install says that everything is ok but it seems that the parallel libraries were not installed. When I try to install NetCDF-4.7.4 I get the following:

configure: error: Parallel tests requested, but no parallel HDF5 installation detected.

I know that it might look like a problem with the NetCDF install so I checked the HDF5 binaries of the HDF5 install folder:

:/p1-nemo/danilocs/programs_sources/netcdf-c-4.7.4$ ls …/…/mpaslibs/bin/
cdfdiff gif2h5 h5clear h5diff h5import h5mkgrp h5repack h5unjam ncmpidump ncvalidator
curl h52gif h5copy h5dump h5jam h5perf_serial h5repart h5watch ncmpigen pnetcdf-config
curl-config h5cc h5debug h5format_convert h5ls h5redeploy h5stat ncmpidiff ncoffsets pnetcdf_version

The configure option I used for the install were the following:

./configure --prefix=/p1-nemo/danilocs/mpaslibs/
–with-szlib=/p1-nemo/danilocs/mpaslibs/
–with-zlib=/p1-nemo/danilocs/mpaslibs/include,/p1-nemo/danilocs/mpaslibs/lib
–enable-parallel
CC=/usr/local/ifort/mpich/bin/mpicc
CFLAGS="-no-multibyte-chars"

make check
make install

Do you know which HDF5 library your netCDF-4 built is using? It is not specified on the configure line.

I think the HDF5 binaries are from the sequential built since there is no h5perf tool that is built when parallel HDF5 is built. Could you please check the libhdf5.settings file and see if HDF5 parallel feature is enabled? The file should be under the lib directory of the installation point.

Thanks for the reply!

I used the following commands for building the HDF5:

./configure --prefix=$DIR/grib2 --with-zlib=$DIR/grib2 --enable-hl --enable-fortran --disable-shared --enable-parallel-tests --enable-parallel CFLAGS="-no-multibyte-chars"

And, from the libhd5.settings:

And libhdf5.settings file? The content is not in your reply.

Oh, sorry. I forgot to attach it.

libhdf5.settings (3.28 KB)

It looks good. Did all test pass?

I suggest that you don’t use --disable-shared flag when building HDF5 and follow netCDF-4 instructions. If you build with the static HDF5 you will need to specify location of the installed parallel HDF5 library.

I don’t recall now if all tests passed, actually. In any case, I will remove everything and start over and also build with shared libraries. Thanks for the support!

When I try to build HDF5 without --disable-shared flag I get:

ld: /usr/local/ifort/mpich/lib/libmpich.a(comm_create_keyval.o): relocation R_X86_64_32 against `MPID_Keyval_mem’ can not be used when making a shared object; recompile with -fPIC
/usr/local/ifort/mpich/lib/libmpich.a: error adding symbols: Bad value

In the past I contacted their support and they suggested to compile with -disable–shared to solve this… although I don’t fully understood this error yet

Ah, ok, now building static makes sense.

Please follow these instructions (see “Building with static libraries” section) from Unidata.

Thanks for the suggestions.

So, I followed the instructions you sent me and tried to configure with:

CC=mpicc FC=mpif90 F77=mpif77 \

CPPFLAGS=“-I${NETCDF}/include -I${HDF5}/include” \

LDFLAGS=“-L${NETCDF}/lib -L${HDF5}/lib” \

LD_LIBRARY_PATH=${NETCDF}/lib:${HDF5}/lib \

LIBS=“-lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl” \

CFLAGS=“-no-multibyte-chars” \

./configure --disable-shared --prefix=${NCDIR}

which resulted in:

configure: error: in /p1-nemo/danilocs/MPAS/Downloads/netcdf-fortran-4.5.3': configure: error: C compiler cannot create executables See config.log’ for more details

Would be it a version compatibility problem? My result for mpicc -v is:

mpicc for MPICH version 3.0.4
icc version 13.0.0 (gcc version 4.7.0 compatibility)

I attached the config.log just in case

config.log (10.9 KB)