Skip to content

Commit

Permalink
Merge pull request #3077 from chuckatkins/h5vol-to-113
Browse files Browse the repository at this point in the history
Updated H5VOL for HDF5 v1.13
  • Loading branch information
Chuck Atkins authored Feb 26, 2022
2 parents e83b10e + 7aa92e8 commit 716460c
Show file tree
Hide file tree
Showing 34 changed files with 175 additions and 149 deletions.
4 changes: 2 additions & 2 deletions docs/user_guide/source/setting_up/source/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ Notes:
.. code-block:: bash
# Several dependencies are installed under /opt/foo/bar and then a
# single dependency (HDF5 in this case) is installed in /opt/hdf5/1.12.0
# single dependency (HDF5 in this case) is installed in /opt/hdf5/1.13.0
$ export CMAKE_PREFIX_PATH=/opt/foo/bar
$ cmake -DHDF5_ROOT=/opt/hdf5/1.12.0 ../ADIOS2
$ cmake -DHDF5_ROOT=/opt/hdf5/1.13.0 ../ADIOS2
Example: the following configuration will build, test and install under /opt/adios2/2.7.1 an optimized (Release) version of ADIOS2.

Expand Down
4 changes: 2 additions & 2 deletions examples/hello/hdf5Reader/helloHDF5Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int main(int argc, char *argv[])
const std::map<std::string, adios2::Params> variables =
h5IO.AvailableVariables();

for (const auto variablePair : variables)
for (const auto &variablePair : variables)
{
std::cout << "Name: " << variablePair.first;
std::cout << std::endl;
Expand Down Expand Up @@ -132,7 +132,7 @@ int main(int argc, char *argv[])
const std::map<std::string, adios2::Params> attributes =
h5IO.AvailableAttributes();

for (const auto attrPair : attributes)
for (const auto &attrPair : attributes)
{
std::cout << "AttrName: " << attrPair.first;
std::cout << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc10-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc10-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc11-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc11-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc8-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc8-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc9-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-gcc9-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-icc-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-icc-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-nvhpc222-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_CUDA:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=OFF
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-nvhpc222-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_CUDA:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=OFF
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-oneapi-mpi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake-v2/ci-el8-oneapi-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
16 changes: 8 additions & 8 deletions scripts/ci/images/power8-el7-leaf-smpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ ENV MPI_ROOT=/opt/ibm/spectrum_mpi \
PATH=/opt/ibm/spectrum_mpi/bin:${PATH} \
LD_LIBRARY_PATH=/opt/ibm/spectrum_mpi/lib:${PATH}

# Install HDF5 1.12.0
# Install HDF5 1.13.0
WORKDIR /opt/hdf5
ARG HDF5_ARGS
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 | \
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.bz2 | \
tar -xvj && \
mkdir build && \
cd build && \
cmake ${HDF5_ARGS} \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.12.0 \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.13.0 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -29,13 +29,13 @@ RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0
-DBUILD_TESTING=OFF \
-DHDF5_BUILD_TOOLS=ON \
-DHDF5_ENABLE_PARALLEL=ON \
../hdf5-1.12.0 && \
../hdf5-1.13.0 && \
make -j$(grep -c '^processor' /proc/cpuinfo) install && \
cd .. && \
rm -rf hdf5-1.12.0 build
ENV PATH=/opt/hdf5/1.12.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.12.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.12.0:${CMAKE_PREFIX_PATH}
rm -rf hdf5-1.13.0 build
ENV PATH=/opt/hdf5/1.13.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.13.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.13.0:${CMAKE_PREFIX_PATH}

# Misc cleanup of unneeded files
RUN rm -rf /tmp/* && \
Expand Down
16 changes: 8 additions & 8 deletions scripts/ci/images/power8-el7-leaf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ARG COMPILER
FROM ornladios/adios2:ci-x86_64-power8-el7-${COMPILER}-base

# Install HDF5 1.12.0
# Install HDF5 1.13.0
WORKDIR /opt/hdf5
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 | \
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.bz2 | \
tar -xvj && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.12.0 \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.13.0 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -17,13 +17,13 @@ RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0
-DHDF5_BUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DHDF5_BUILD_TOOLS=OFF \
../hdf5-1.12.0 && \
../hdf5-1.13.0 && \
make -j$(grep -c '^processor' /proc/cpuinfo) install && \
cd .. && \
rm -rf hdf5-1.12.0 build
ENV PATH=/opt/hdf5/1.12.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.12.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.12.0:${CMAKE_PREFIX_PATH}
rm -rf hdf5-1.13.0 build
ENV PATH=/opt/hdf5/1.13.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.13.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.13.0:${CMAKE_PREFIX_PATH}

# Misc cleanup of unneeded files
RUN rm -rf /tmp/* && \
Expand Down
16 changes: 8 additions & 8 deletions scripts/ci/images/suse-nvhpcsdk-openmpi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM ornladios/adios2:ci-suse-nvhpcsdk-base

# Install HDF5 1.12.0
# Install HDF5 1.13.0
WORKDIR /opt/hdf5
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 | \
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.bz2 | \
tar -xvj && \
mkdir build && \
cd build && \
source /etc/profile && \
module load nvhpc && \
/opt/cmake/bin/cmake \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.12.0 \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.13.0 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -18,13 +18,13 @@ RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0
-DHDF5_BUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DHDF5_BUILD_TOOLS=OFF \
../hdf5-1.12.0 && \
../hdf5-1.13.0 && \
make -j$(grep -c '^processor' /proc/cpuinfo) install && \
cd .. && \
rm -rf hdf5-1.12.0 build
ENV PATH=/opt/hdf5/1.12.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.12.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.12.0:${CMAKE_PREFIX_PATH}
rm -rf hdf5-1.13.0 build
ENV PATH=/opt/hdf5/1.13.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.13.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.13.0:${CMAKE_PREFIX_PATH}

# Misc cleanup of unneeded files
RUN rm -rf /tmp/* && \
Expand Down
14 changes: 7 additions & 7 deletions scripts/ci/images/suse-nvhpcsdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM ornladios/adios2:ci-suse-nvhpcsdk-base

# Install HDF5
WORKDIR /opt/hdf5
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.tar.bz2 | \
RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.bz2 | \
tar -xvj && \
mkdir build && \
cd build && \
source /etc/profile && \
module load nvhpc-nompi && \
/opt/cmake/bin/cmake \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.12.0 \
-DCMAKE_INSTALL_PREFIX=/opt/hdf5/1.13.0 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -18,13 +18,13 @@ RUN curl -L https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0
-DHDF5_BUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DHDF5_BUILD_TOOLS=OFF \
../hdf5-1.12.0 && \
../hdf5-1.13.0 && \
make -j$(grep -c '^processor' /proc/cpuinfo) install && \
cd .. && \
rm -rf hdf5-1.12.0 build
ENV PATH=/opt/hdf5/1.12.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.12.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.12.0:${CMAKE_PREFIX_PATH}
rm -rf hdf5-1.13.0 build
ENV PATH=/opt/hdf5/1.13.0/bin:${PATH} \
LD_LIBRARY_PATH=/opt/hdf5/1.13.0/lib:${LD_LIBRARY_PATH} \
CMAKE_PREFIX_PATH=/opt/hdf5/1.13.0:${CMAKE_PREFIX_PATH}

# Misc cleanup of unneeded files
RUN rm -rf /tmp/* && \
Expand Down
17 changes: 11 additions & 6 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
add_subdirectory(adios2)
add_subdirectory(utils)

# HDF5 VOL requires a matching adios configuration
if(ADIOS2_HAVE_HDF5 AND HDF5_VERSION VERSION_GREATER_EQUAL 1.11 AND
(NOT HDF5_IS_PARALLEL OR (HDF5_IS_PARALLEL AND ADIOS2_USE_MPI)))
set(ADIOS2_HAVE_HDF5_VOL ON CACHE INTERNAL "" FORCE)
add_subdirectory(h5vol)
# HDF5 VOL requires 1.13+
if(ADIOS2_HAVE_HDF5)
if(HDF5_VERSION VERSION_LESS 1.13)
set(ADIOS2_HAVE_HDF5_VOL OFF CACHE INTERNAL "")
else()
set(ADIOS2_HAVE_HDF5_VOL ON CACHE INTERNAL "")
endif()
else()
set(ADIOS2_HAVE_HDF5_VOL OFF CACHE INTERNAL "" FORCE)
set(ADIOS2_HAVE_HDF5_VOL OFF CACHE INTERNAL "")
endif()
if(ADIOS2_HAVE_HDF5_VOL)
add_subdirectory(h5vol)
endif()
8 changes: 6 additions & 2 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,18 @@ if(ADIOS2_HAVE_HDF5)
set(adios2_hdf5_objs adios2_hdf5)
if(HDF5_IS_PARALLEL)
list(APPEND adios2_hdf5_objs adios2_hdf5_mpi)
set_property(SOURCE core/IOMPI.cpp APPEND PROPERTY COMPILE_DEFINITIONS ADIOS2_HAVE_HDF5_PARALLEL)
set_property(SOURCE core/IOMPI.cpp APPEND PROPERTY
COMPILE_DEFINITIONS ADIOS2_HAVE_HDF5_PARALLEL
)
add_library(adios2_hdf5_mpi OBJECT
toolkit/interop/hdf5/HDF5CommonMPI.cpp
)
target_compile_definitions(adios2_hdf5_mpi PRIVATE ADIOS2_USE_MPI)
target_link_libraries(adios2_core_mpi PRIVATE adios2_hdf5_mpi)
set_property(TARGET adios2_hdf5_mpi PROPERTY EXPORT_NAME hdf5_mpi)
set_property(TARGET adios2_hdf5_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_hdf5_mpi)
set_property(TARGET adios2_hdf5_mpi PROPERTY
OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_hdf5_mpi
)
endif()

foreach(lib IN LISTS adios2_hdf5_objs)
Expand Down
1 change: 1 addition & 0 deletions source/adios2/toolkit/interop/hdf5/HDF5Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace
HDF5Common::MPI_API const *GetHDF5Common_MPI_API()
{
std::lock_guard<std::mutex> guard(HDF5Common_MPI_API_Mutex);
(void)guard; // Workaround to silence compiler warning about unused variable
return HDF5Common_MPI_API;
}

Expand Down
20 changes: 11 additions & 9 deletions source/h5vol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

if(CMAKE_C_COMPILER_ID MATCHES "^(GNU)$")
# Silence a noisy warning in our log functions as the behavior is
# intentional
string(APPEND CMAKE_C_FLAGS " -Wno-format-zero-length")
endif()

add_library(adios2_h5vol
H5VolReadWrite.c
H5Vol.c
Expand All @@ -18,18 +24,14 @@ target_include_directories(adios2_h5vol PRIVATE ${HDF5_C_INCLUDE_DIRS})
target_link_libraries(adios2_h5vol PRIVATE
${HDF5_C_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
)
if(NOT HDF5_IS_PARALLEL)
target_link_libraries(adios2_h5vol PRIVATE adios2::c)
elseif(HDF5_IS_PARALLEL AND ADIOS2_HAVE_MPI)

if(ADIOS2_USE_MPI)
target_link_libraries(adios2_h5vol PRIVATE adios2::c_mpi MPI::MPI_C)
else() # HDF5_IS_PARALLEL AND NOT ADIOS2_HAVE_MPI
message(FATAL_ERROR "Invalid configuration: HDF5_IS_PARALLEL AND NOT ADIOS2_HAVE_MPI")
else()
target_link_libraries(adios2_h5vol PRIVATE adios2::c)
endif()

install(FILES H5Vol_def.h H5VolError.h H5Vol.h H5VolReadWrite.h H5VolUtil.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2/h5vol
COMPONENT adios2_h5vol
)
# VOL install should only contain the .so and no headers
install(TARGETS adios2_h5vol
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
Loading

0 comments on commit 716460c

Please sign in to comment.