I tried to duplicate, but failed.
Is it possible for you to use regular gcc instead of mpicc just to see
if mpicc or its linker is the problem?
=Dennis Heimbigner
Unidata
On 10/10/2021 11:10 PM, Vesselin Kolev via netcdfgroup wrote:
Hello Liao and thank you for the replay!
The error pops up regardless the MPI affinity. For instance, if I
compile the HDF5 library as a serial code:
LDFLAGS="-L/opt/software/zlib/1.2.11/lib"
CFLAGS="-I/opt/software/zlib/1.2.11/include"
CXXFLAGS="-I/opt/software/zlib/1.2.11/include"
FCLAGS="-I/opt/software/zlib/1.2.11/include"
ZLIB_ROOT=/opt/software/zlib/1.2.11 FC=gfortran FCFLAGS="-Ofast"
CC=gcc CFLAGS="-Ofast" CXX=g++ CXXFLAGS="-Ofast" cmake ..
-DCMAKE_INSTALL_PREFIX=/opt/software/hdf/5/1.12.1-gcc_11-zlib_1-api_v18-nojava
-DHDF5_ENABLE_THREADSAFE=OFF -DHDF5_BUILD_CPP_LIB=ON
-DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_JAVA=OFF
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DBUILD_SHARED_LIBS=ON
-DDEFAULT_API_VERSION=v18
I still get the same error while trying to compile NetCDF-c.:
../liblib/.libs/libnetcdf.so: undefined reference to `H5Pset_fapl_http'
../liblib/.libs/libnetcdf.so: undefined reference to `H5FD_http_init'
Note that H5Pset_fapl_http and H5FD_http_init are defined in
libhdf5/H5FDhttp.c:
https://fossies.org/dox/netcdf-c-4.8.0/H5FDhttp_8c.html
Both H5Pset_fapl_http and H5FD_http_init are referenced in
libhdf5/.libs/libnchdf5.a:
nm libhdf5/.libs/libnchdf5.a | grep http
U H5Pset_fapl_http
U H5FD_http_init
and it seems like H5FDhttp.c goes into the set of compiled files:
nm libhdf5/.libs/libnchdf5.a | grep ".o" | grep http
libnchdf5_la-H5FDhttp.o:
Hence, the question is why that content cannot be read during the
linking process.
Thank you very much in advance for your answer.
Best,
Vesselin Kolev
On 10/10/2021 22:37, Wei-Keng Liao wrote:
Your HDF5 was configured to be installed under folder:
/opt/software/hdf/5/1.10.7-gcc_11-zlib_1-api_v18-mpich_3
But you are using a different folder in your NetCDF configuration.
/opt/software/hdf/5/1.10.7-gcc_11-zlib_1-api_v18-nojava
In addition, your HDF5 was built using mpicc/mpifort, but
you are using gcc to build NetCDF. I suggest you to use the
same compilers.
Wei-keng
On Oct 10, 2021, at 4:17 AM, Vesselin Kolev via netcdfgroup
<netcdfgroup@xxxxxxxxxxxxxxxx> wrote:
Hello Everyone,
I face very strange problem when compiling NetCDF-C 4.8.0 against
HDF5-1.10.7 and HDF5-1.12.1.
Note that HDF5 is compiled in the following manner:
LDFLAGS="-L/opt/software/zlib/1.2.11/lib"
CFLAGS="-I/opt/software/zlib/1.2.11/include"
CXXFLAGS="-I/opt/software/zlib/1.2.11/include"
FCLAGS="-I/opt/software/zlib/1.2.11/include"
ZLIB_ROOT=/opt/software/zlib/1.2.11 FC=mpifort FCFLAGS="-Ofast"
CC=mpicc CFLAGS="-Ofast" CXX=mpic++ CXXFLAGS="-Ofast" cmake ..
-DCMAKE_INSTALL_PREFIX=/opt/software/hdf/5/1.10.7-gcc_11-zlib_1-api_v18-mpich_3
-DHDF5_ENABLE_THREADSAFE=OFF -DHDF5_BUILD_CPP_LIB=OFF
-DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_JAVA=OFF
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DBUILD_SHARED_LIBS=ON
-DDEFAULT_API_VERSION=v18 -DHDF5_ENABLE_PARALLEL=ON
using GCC 11.0.3. Also note, that the HDF5 compilation passed the
post-compilation tests without any fail.
But if I try to compile NetCDF-C agains that particular compilation
of HDF5:
LDFLAGS="-L/opt/software/hdf/5/1.10.7-gcc_11-zlib_1-api_v18-nojava/lib"
CC=gcc CFLAGS="-Ofast
-I/opt/software/hdf/5/1.10.7-gcc_11-zlib_1-api_v18-nojava/include"
./configure
--prefix=/opt/software/netcdf-c/4/4.8.0-gcc_11_hdf5_1.10.7
--enable-mmap --enable-byterange
I get the following error:
../liblib/.libs/libnetcdf.so: undefined reference to `H5Pset_fapl_http'
../liblib/.libs/libnetcdf.so: undefined reference to `H5FD_http_init'
Any suggestions where to look for the source of the problem are
greatly welcomed.
Thank you very much in advance!
Best,
Vesselin Kolev
_______________________________________________
NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web. Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
https://urldefense.com/v3/__https://www.unidata.ucar.edu/mailing_lists/__;!!Dq0X2DkFhyF93HkjWTBQKhk!GiUL4XCgAQH0TzGBrQkV8rNtI2NK6xL6B6o83VkZrOi0_pyXo5cF3OpWZ3tD_YVeAs2z$
_______________________________________________
NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web. Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
https://www.unidata.ucar.edu/mailing_lists/