espressomd-users
[Top][All Lists]
Advanced

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

Re: Compilation Error: h5xx; template..cannot be overloaded...


From: Jean-Noël Grad
Subject: Re: Compilation Error: h5xx; template..cannot be overloaded...
Date: Sat, 05 Aug 2023 22:17:35 +0200
User-agent: Roundcube Webmail/1.4.13

Dear William Brown,

Thank you for reporting this issue to us, and for providing these detailed information about your build environment!

After some investigation, it seems to me the h5md/h5xx library is currently not compatible with hdf5 >= 1.13.0. We never caught it in the ESPResSo automated tests, because the latest versions of Fedora and Ubuntu are still providing hdf5 <= 1.12.1 at the moment (hdf5 1.14.1 is currently being explored in Fedora scratch builds, though). From the looks of it, h5md/h5xx is missing a few ifdef guards to become compliant with hdf5 >= 1.13.0. I have opened a ticket on their main repo to explain the situation [10]. Please find below my observations.

The hdf5 1.14 specifications defines "hsize_t" as "uint64_t" in H5public.h [4]. On a 64-bit platform, "uint64_t" is typically equivalent to "long unsigned int", which just so happens to also be equivalent to "std::size_t". Hence the constructor overloads in the h5xx code [5] are declared twice with the same argument types, which is not allowed.

This was not an issue with previous hdf5 releases, because the definition of "hsize_t" was "unsigned long long" in 1.10 [6] and 1.12 [7]. That was safe because "unsigned long long" and "long unsigned int" are both 8 bytes, and the constructor overload resolution considered them as different types, so there was no re-definition. The change to "uint64_t" happened in 1.13 [8], more specifically in HDFGroup/hdf5#709.

The h5md/h5xx project could probably resolve this issue by adding ifdef guards around all std::size_t overloads to disable them when the hdf5 version is >= 1.13.0, although I'm not 100% sure how to properly handle portability issues architectures other than 64-bit.

Do you have by any chance the option of loading an older version of hdf5 on your cluster?

Best regards,
Jean-Noël Grad

Links:
[4] https://github.com/HDFGroup/hdf5/blob/hdf5-1_14_1/src/H5public.h#L291 [5] https://github.com/fhoefling/h5xx/blob/459f07af/h5xx/dataspace/dataspace.hpp#L49C77-L53C53 [6] https://github.com/HDFGroup/hdf5/blob/hdf5-1_10_0/src/H5public.h#L184 [7] https://github.com/HDFGroup/hdf5/blob/hdf5-1_12_0/src/H5public.h#L186 [8] https://github.com/HDFGroup/hdf5/blob/hdf5-1_13_0/src/H5public.h#L291
[9] https://github.com/HDFGroup/hdf5/pull/709
[10] https://github.com/fhoefling/h5xx/issues/11

On 2023-08-04 18:29, William Brown wrote:
I am trying to compile 4.2.1 using GCC 12.2.0.  cmake seems to go OK;

. the notice about doxygen missing components: dot I read is related
to graphviz, and is only needed to produce the documents.

$ CMAKE ..

-- CMAKE VERSION: 3.24.3

-- THE CXX COMPILER IDENTIFICATION IS GNU 12.2.0

-- DETECTING CXX COMPILER ABI INFO

-- DETECTING CXX COMPILER ABI INFO - DONE

-- CHECK FOR WORKING CXX COMPILER:
/HOME/APPS/EASYBUILD/SOFTWARE/GCCCORE/12.2.0/BIN/C++ - SKIPPED

-- DETECTING CXX COMPILE FEATURES

-- DETECTING CXX COMPILE FEATURES - DONE

-- THE C COMPILER IDENTIFICATION IS GNU 12.2.0

-- DETECTING C COMPILER ABI INFO

-- DETECTING C COMPILER ABI INFO - DONE

-- CHECK FOR WORKING C COMPILER:
/HOME/APPS/EASYBUILD/SOFTWARE/GCCCORE/12.2.0/BIN/CC - SKIPPED

-- DETECTING C COMPILE FEATURES

-- DETECTING C COMPILE FEATURES - DONE

-- CONFIG FILE:
/HOME/APPS/CUSTOM/SOFTWARE/ESPRESSO/4.2.1/ESPRESSO/SRC/CONFIG/MYCONFIG-DEFAULT.HPP

-- PERFORMING TEST RESULT__PRETTY_FUNCTION__

-- PERFORMING TEST RESULT__PRETTY_FUNCTION__ - SUCCESS

-- FOUND PYTHONINTERP:
/HOME/APPS/EASYBUILD/SOFTWARE/PYTHON/3.10.8-GCCCORE-12.2.0/BIN/PYTHON3
(FOUND SUITABLE VERSION "3.10.8", MINIMUM REQUIRED IS "3.8")

-- FOUND CYTHON:
/HOME/APPS/EASYBUILD/SOFTWARE/PYTHON/3.10.8-GCCCORE-12.2.0/BIN/PYTHON3;-M;CYTHON
(FOUND SUITABLE VERSION "0.29.36", MINIMUM REQUIRED IS "0.29.14")

-- FOUND PYTHONHEADERS:
/HOME/APPS/EASYBUILD/SOFTWARE/PYTHON/3.10.8-GCCCORE-12.2.0/INCLUDE/PYTHON3.10

-- FOUND NUMPY:
/HOME/APPS/EASYBUILD/SOFTWARE/SCIPY-BUNDLE/2023.02-GFBF-2022B/LIB/PYTHON3.10/SITE-PACKAGES/NUMPY/CORE/INCLUDE
(FOUND VERSION "1.24.2")

-- FOUND FFTW3:
/HOME/APPS/EASYBUILD/SOFTWARE/FFTW.MPI/3.3.10-GOMPI-2022B/LIB/LIBFFTW3.SO

-- FOUND HDF5:
/HOME/APPS/EASYBUILD/SOFTWARE/HDF5/1.14.0-GOMPI-2022B/LIB/LIBHDF5.SO;/USR/LIB64/LIBPTHREAD.SO;/HOME/APPS/EASYBUILD/SOFTWARE/SZIP/2.1.1-GCCCORE-12.2.0/LIB/LIBSZ.SO;/HOME/APPS/EASYBUILD/SOFTWARE/ZLIB/1.2.12-GCCCORE-12.2.0/LIB/LIBZ.SO;/USR/LIB64/LIBDL.SO;/USR/LIB64/LIBM.SO;/USR/LIB64/LIBM.SO;/USR/LIB64/LIBPTHREAD.SO
(FOUND SUITABLE VERSION "1.14.0", MINIMUM REQUIRED IS "1.8") FOUND
COMPONENTS: C

-- FOUND GSL: /HOME/APPS/EASYBUILD/SOFTWARE/GSL/2.7-GCC-12.2.0/INCLUDE
(FOUND VERSION "2.7")

-- FOUND MPI_C:
/HOME/APPS/EASYBUILD/SOFTWARE/OPENMPI/4.1.4-GCC-12.2.0/LIB/LIBMPI.SO
(FOUND SUITABLE VERSION "3.1", MINIMUM REQUIRED IS "3.0")

-- FOUND MPI_CXX:
/HOME/APPS/EASYBUILD/SOFTWARE/OPENMPI/4.1.4-GCC-12.2.0/LIB/LIBMPI.SO
(FOUND SUITABLE VERSION "3.1", MINIMUM REQUIRED IS "3.0")

-- FOUND MPI: TRUE (FOUND SUITABLE VERSION "3.1", MINIMUM REQUIRED IS
"3.0")

-- FOUND MPIEXECBACKEND:
/HOME/APPS/EASYBUILD/SOFTWARE/OPENMPI/4.1.4-GCC-12.2.0/BIN/MPIEXEC

-- FOUND BOOST:
/HOME/APPS/EASYBUILD/SOFTWARE/BOOST.MPI/1.81.0-GOMPI-2022B/LIB64/CMAKE/BOOST-1.81.0/BOOSTCONFIG.CMAKE
(FOUND SUITABLE VERSION "1.81.0", MINIMUM REQUIRED IS "1.69.0") FOUND
COMPONENTS: MPI SERIALIZATION FILESYSTEM SYSTEM UNIT_TEST_FRAMEWORK

-- FOUND DOXYGEN: /USR/BIN/DOXYGEN (FOUND VERSION "1.8.5") FOUND
COMPONENTS: DOXYGEN MISSING COMPONENTS: DOT

-- FOUND SPHINX:
/HOME/APPS/EASYBUILD/SOFTWARE/PYTHON/3.10.8-GCCCORE-12.2.0/BIN/PYTHON3;-M;SPHINX
(FOUND SUITABLE VERSION "5.3.0", MINIMUM REQUIRED IS "2.3.0")

-- FOUND GIT: /USR/BIN/GIT (FOUND VERSION "1.8.3.1")

-- THE FOLLOWING FEATURES HAVE BEEN ENABLED:

* HDF5 (REQUIRED VERSION >= 1.8), PARALLEL

-- THE FOLLOWING OPTIONAL PACKAGES HAVE BEEN FOUND:

* FFTW3

* MPIEXECBACKEND

* DOXYGEN

* SPHINX (REQUIRED VERSION >= 2.3.0)

* GIT

-- THE FOLLOWING REQUIRED PACKAGES HAVE BEEN FOUND:

* PYTHONINTERP (REQUIRED VERSION >= 3.8)

* CYTHON (REQUIRED VERSION >= 0.29.14)

* PYTHONHEADERS

* NUMPY

* HDF5 (REQUIRED VERSION >= 1.8), PARALLEL

* GSL

* MPI

* BOOST_MPI (REQUIRED VERSION == 1.81.0)

* BOOST_SERIALIZATION (REQUIRED VERSION == 1.81.0)

* BOOST_ATOMIC (REQUIRED VERSION == 1.81.0)

* BOOST_FILESYSTEM (REQUIRED VERSION == 1.81.0)

* BOOST_SYSTEM (REQUIRED VERSION == 1.81.0)

* BOOST_HEADERS (REQUIRED VERSION == 1.81.0)

* BOOST_UNIT_TEST_FRAMEWORK (REQUIRED VERSION == 1.81.0)

* BOOST (REQUIRED VERSION >= 1.69.0)

-- CONFIGURING DONE

-- GENERATING DONE

-- BUILD FILES HAVE BEEN WRITTEN TO:
/HOME/APPS/CUSTOM/SOFTWARE/ESPRESSO/4.2.1/ESPRESSO/BUILD

However the compilation fails:

.

.

[ 44%] Building CXX object
src/core/CMakeFiles/Espresso_core.dir/magnetostatics/dds_gpu.cpp.o

[ 44%] Building CXX object
src/core/CMakeFiles/Espresso_core.dir/magnetostatics/dds_replica.cpp.o


[ 44%] Building CXX object
src/core/CMakeFiles/Espresso_core.dir/magnetostatics/dlc.cpp.o

In file included from
/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/dataspace.hpp:16,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/attribute/attribute.hpp:17,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/attribute.hpp:17,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/h5xx.hpp:23,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/src/core/io/writer/h5md_specification.hpp:24,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/src/core/io/writer/h5md_core.hpp:27,


                 from
/home/apps/custom/software/espresso/4.2.1/espresso/src/core/io/writer/h5md_core.cpp:22:


/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/dataspace/dataspace.hpp:52:5:
error: 'template<long unsigned int N> h5xx::dataspace::dataspace(const
boost::array<long unsigned int, NumDims>&)' cannot be overloaded with
'template<long unsigned int N> h5xx::dataspace::dataspace(const
boost::array<long unsigned int, NumDims>&)'

   52 |     dataspace(boost::array<hsize_t, N> const& dims);

      |     ^~~~~~~~~

/home/apps/custom/software/espresso/4.2.1/espresso/libs/h5xx/h5xx/dataspace/dataspace.hpp:50:5:
note: previous declaration 'template<long unsigned int N>
h5xx::dataspace::dataspace(const boost::array<long unsigned int,
NumDims>&)'

   50 |     dataspace(boost::array<std::size_t, N> const& dims);

      |     ^~~~~~~~~

.

.

These are the lines from
espresso/libs/h5xx/h5xx/dataspace/dataspace.hpp  relating to the first
two error messages:

    /** construct simple dataspace of given extents, boost::array
version */

    template <std::size_t N>

    dataspace(boost::array<std::size_t, N> const& dims);

    template <std::size_t N>

    dataspace(boost::array<hsize_t, N> const& dims);

There are more errors in a similar vein about overloading that follow.


I see that h5xx ships with Espresso, so I am wondering if there is a
compatibility issue with the versions of HDF5 or Boost, or GCC 12.   I
did not have this problem building Espresso 4.1.4 with Boost/1.74 and
HDF5/1.10.7 and GCC 10.   I see that h5xx is identical in 4.1.4 and
4.2.1 and dates to 2018 and is # 89d8d43 [1] - and I see that h5xx has
more recently had a version 0.9.2 which specifically mentions C++ 11
changes: https://github.com/fhoefling/h5xx/issues.   I have tried
building with h5xx 0.9.2 but I get the same errors.

I am using Easybuild and Lmod and these are the loaded versions of the
required software:

Currently Loaded Modules:

  1) GCCcore/12.2.0                        25)
FFTW.MPI/3.3.10-gompi-2022b     (H)

  2) zlib/1.2.12-GCCcore-12.2.0       (H)  26)
OpenBLAS/0.3.21-GCC-12.2.0      (H)

  3) binutils/2.39-GCCcore-12.2.0     (H)  27)
FlexiBLAS/3.2.1-GCC-12.2.0      (H)

  4) GCC/12.2.0                            28)
ScaLAPACK/2.2.0-gompi-2022b-fb  (H)

  5) numactl/2.0.16-GCCcore-12.2.0    (H)  29) foss/2022b

  6) XZ/5.2.7-GCCcore-12.2.0          (H)  30)
ncurses/6.3-GCCcore-12.2.0      (H)

  7) libxml2/2.10.3-GCCcore-12.2.0    (H)  31)
libreadline/8.2-GCCcore-12.2.0  (H)

  8) libpciaccess/0.17-GCCcore-12.2.0 (H)  32)
Tcl/8.6.12-GCCcore-12.2.0       (H)

  9) hwloc/2.8.0-GCCcore-12.2.0       (H)  33)
SQLite/3.39.4-GCCcore-12.2.0    (H)

10) OpenSSL/1.1                      (H)  34) GMP/6.2.1-GCCcore-12.2.0


11) libevent/2.1.12-GCCcore-12.2.0   (H)  35)
libffi/3.4.4-GCCcore-12.2.0     (H)

12) UCX/1.13.1-GCCcore-12.2.0        (H)  36)
Python/3.10.8-GCCcore-12.2.0

13) libfabric/1.16.1-GCCcore-12.2.0  (H)  37) gfbf/2022b
       (H)

14) PMIx/4.2.2-GCCcore-12.2.0        (H)  38)
pybind11/2.10.3-GCCcore-12.2.0  (H)

15) UCC/1.1.0-GCCcore-12.2.0         (H)  39)
SciPy-bundle/2023.02-gfbf-2022b (H)

16) OpenMPI/4.1.4-GCC-12.2.0         (H)  40)
Biopython/1.81-foss-2022b

17) gompi/2022b                      (H)  41)
Cython/0.29.36-GCCcore-12.2.0

18) bzip2/1.0.8-GCCcore-12.2.0       (H)  42) GSL/2.7-GCC-12.2.0

19) gzip/1.12-GCCcore-12.2.0              43)
Szip/2.1.1-GCCcore-12.2.0

20) lz4/1.9.4-GCCcore-12.2.0              44) HDF5/1.14.0-gompi-2022b

21) zstd/1.5.2-GCCcore-12.2.0             45)
cURL/7.86.0-GCCcore-12.2.0

22) ICU/72.1-GCCcore-12.2.0               46)
libarchive/3.6.1-GCCcore-12.2.0 (H)

23) Boost.MPI/1.81.0-gompi-2022b          47)
CMake/3.24.3-GCCcore-12.2.0     (H)

24) FFTW/3.3.10-GCC-12.2.0           (H)

  Where:

   H:  Hidden Module

I have looked around but I have not find any report of a similar
issue.  I need to use GCC 12 as the user needs to use this with
Biopython/1.81, which has been built to use GCC 12 under Easybuild.

I would be grateful for any suggestions as to what to try next.

William

William Brown
Senior System Administrator (Research IT)

Information Technology
121/122 St Stephen's Green Dublin 2 Ireland
T: +353 1 402 5234 M: +353 894 746447
E: williambrown@rcsi.ie W: www.rcsi.com [2]

Discover why we are Top 50 in the World for 'International Outlook' -
THE World University Ranking 2023 [3]

If you receive this email outside of your normal working hours, you
are not expected to respond until you return to work.

Registered Charity Number: 20001957

Links:
------
[1] https://github.com/h5md/h5xx/commit/89d8d435872ec77dd931e709df98eefac8cbc925
[2] http://www.rcsi.com/
[3] https://www.rcsi.com/about/international



reply via email to

[Prev in Thread] Current Thread [Next in Thread]