Skip to content

Commit 8cace7e

Browse files
ADIOS2: Require v2.9 as minimum (#1711)
* CMake: Require ADIOS2 v2.9 * Remove openPMD_HAS_ADIOS_2_8 macro * Remove openPMD_HAS_ADIOS_2_9 macro * Fixes * Update ADIOS2 in the CI * Only ADIOS2 v2.9 on Spack? * Revert "Only ADIOS2 v2.9 on Spack?" This reverts commit 1740136. * Update spack * Only specify major ADIOS2 versions * Fixes: Mgard, /usr/bin/cmake * Try ADIOS2 v2.10 for failing runs * Take mgard out of clang7_nopy_ompi_h5_ad2_libcpp run * Take blosc2 out of failing runs * Update documentation * Reimplement "modifiable_attributes" parameter * Revert "Reimplement "modifiable_attributes" parameter" This reverts commit f3efc99.
1 parent df6cc71 commit 8cace7e

File tree

25 files changed

+54
-195
lines changed

25 files changed

+54
-195
lines changed

Diff for: .github/ci/spack-envs/clang14_py311_nompi_h5_ad2/spack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spack:
1313
hdf5:
1414
variants: ~mpi
1515
adios2:
16-
variants: ~mpi ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
16+
variants: ~mpi ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~mgard
1717
cmake:
1818
externals:
1919

Diff for: .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spack:
1212

1313
packages:
1414
adios2:
15-
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
15+
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~blosc2
1616
cmake:
1717
externals:
1818

Diff for: .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/spack.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#
77
spack:
88
specs:
9-
- adios2
9+
- adios2@2.10
1010
- hdf5
1111
- openmpi
1212

1313
packages:
1414
adios2:
15-
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
15+
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~mgard ~blosc2
1616
cmake:
1717
externals:
1818

Diff for: .github/ci/spack-envs/clang8_py38_mpich_h5_ad2/spack.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#
77
spack:
88
specs:
9-
- adios2@2.7.1
9+
- adios2@2.10
1010
- hdf5
1111
- mpich
1212

1313
packages:
1414
adios2:
15-
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2
15+
variants: ~zfp ~sz ~png ~dataman ~python ~fortran ~ssc ~shared ~bzip2 ~blosc2
1616
cmake:
1717
externals:
1818

Diff for: .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/spack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
spack:
88
specs:
9-
- adios2
9+
- adios2@2.10
1010
- hdf5
1111
- openmpi
1212

Diff for: .github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/spack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
spack:
88
specs:
9-
- adios2
9+
- adios2@2.10
1010
- hdf5
1111
- openmpi
1212

Diff for: .github/workflows/dependencies/install_spack

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set -eu -o pipefail
55

6-
spack_ver="0.17.1"
6+
spack_ver="0.22.3"
77

88
cd /opt
99
if [[ -d spack && ! -f spack_${spack_ver} ]]

Diff for: .github/workflows/linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
mpiexec --version
6464
perl --version
6565
python --version
66+
sudo ln -s "$(which cmake)" /usr/bin/cmake
6667
eval $(spack env activate --sh .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2_libcpp/)
6768
spack install
6869
@@ -99,6 +100,7 @@ jobs:
99100
- name: Build
100101
env: {CC: clang-7, CXX: clang++-7, CXXFLAGS: -Werror}
101102
run: |
103+
sudo ln -s "$(which cmake)" /usr/bin/cmake
102104
eval $(spack env activate --sh .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/)
103105
spack install
104106
@@ -178,6 +180,7 @@ jobs:
178180
mpiexec --version
179181
perl --version
180182
python --version
183+
sudo ln -s "$(which cmake)" /usr/bin/cmake
181184
eval $(spack env activate --sh .github/ci/spack-envs/clang8_py38_mpich_h5_ad2/)
182185
spack install
183186
@@ -229,6 +232,7 @@ jobs:
229232
- name: Build
230233
env: {CC: gcc-7, CXX: g++-7, CXXFLAGS: -Werror}
231234
run: |
235+
sudo ln -s "$(which cmake)" /usr/bin/cmake
232236
eval $(spack env activate --sh .github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/)
233237
spack install
234238

Diff for: .github/workflows/tooling.yml

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Build
2525
env: {CC: clang, CXX: clang++}
2626
run: |
27+
sudo ln -s "$(which cmake)" /usr/bin/cmake
2728
eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/)
2829
spack install
2930
@@ -54,6 +55,7 @@ jobs:
5455
- name: Build
5556
env: {CC: mpicc, CXX: mpic++, OMPI_CC: clang-10, OMPI_CXX: clang++-10, CXXFLAGS: -Werror, OPENPMD_HDF5_CHUNKS: none, OPENPMD_TEST_NFILES_MAX: 100}
5657
run: |
58+
sudo ln -s "$(which cmake)" /usr/bin/cmake
5759
eval $(spack env activate --sh .github/ci/spack-envs/clangtidy_nopy_ompi_h5_ad2/)
5860
spack install
5961
SOURCEPATH="$(pwd)"

Diff for: CHANGELOG.rst

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Changelog
44
=========
55

6+
0.16.0
7+
------
8+
9+
Changes to "0.15.0"
10+
^^^^^^^^^^^^^^^^^^^
11+
12+
Other
13+
"""""
14+
15+
- ADIOS2: require version 2.9.0 #1711
16+
617
0.16.0
718
------
819
**Date:** 2024-10-07

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ if(openPMD_HAVE_MPI)
365365
list(APPEND openPMD_REQUIRED_ADIOS2_COMPONENTS MPI)
366366
endif()
367367
if(openPMD_USE_ADIOS2 STREQUAL AUTO)
368-
find_package(ADIOS2 2.7.0 CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
368+
find_package(ADIOS2 2.9.0 CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
369369
if(ADIOS2_FOUND)
370370
set(openPMD_HAVE_ADIOS2 TRUE)
371371
else()
372372
set(openPMD_HAVE_ADIOS2 FALSE)
373373
endif()
374374
elseif(openPMD_USE_ADIOS2)
375-
find_package(ADIOS2 2.7.0 REQUIRED CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
375+
find_package(ADIOS2 2.9.0 REQUIRED CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
376376
set(openPMD_HAVE_ADIOS2 TRUE)
377377
else()
378378
set(openPMD_HAVE_ADIOS2 FALSE)

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RUN curl -sLo c-blosc-1.15.0.tar.gz https://github.com/Blosc/c-blosc/arch
5656
&& make \
5757
&& make install
5858

59-
RUN curl -sLo adios2-2.7.1.tar.gz https://github.com/ornladios/ADIOS2/archive/v2.7.1.tar.gz \
59+
RUN curl -sLo adios2-2.9.2.tar.gz https://github.com/ornladios/ADIOS2/archive/v2.9.2.tar.gz \
6060
&& file adios2*.tar.gz \
6161
&& tar -xzf adios2*.tar.gz \
6262
&& rm adios2*.tar.gz \

Diff for: NEWS.rst

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Upgrade Guide
44
=============
55

6+
0.17.0
7+
------
8+
9+
ADIOS 2.9.0 is now the minimally supported version for ADIOS2 support.
10+
611
0.16.0
712
------
813

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Shipped internally (downloaded by CMake unless `openPMD_SUPERBUILD=OFF` is set):
108108
I/O backends:
109109
* [JSON](https://en.wikipedia.org/wiki/JSON)
110110
* [HDF5](https://support.hdfgroup.org/HDF5) 1.8.13+ (optional)
111-
* [ADIOS2](https://github.com/ornladios/ADIOS2) 2.7.0+ (optional)
111+
* [ADIOS2](https://github.com/ornladios/ADIOS2) 2.9.0+ (optional)
112112

113113
while those can be built either with or without:
114114
* MPI 2.1+, e.g. OpenMPI 1.6.5+ or MPICH2

Diff for: docs/source/backends/adios2.rst

-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ Steps
5858
ADIOS2 is optimized towards organizing the process of reading/writing data into IO steps.
5959
In order to activate steps, it is imperative to use the :ref:`Streaming API <usage-streaming>` (which can be used for either file-based or streaming-based workflows).
6060

61-
ADIOS2 release 2.6.0 contained a bug (fixed in ADIOS 2.7.0, see `PR #2348 <https://github.com/ornladios/ADIOS2/pull/2348>`_) that disallows random-accessing steps in file-based engines.
62-
With this ADIOS2 release, files written with steps may only be read using the streaming API.
63-
6461
Upon reading a file, the ADIOS2 backend will automatically recognize whether it has been written with or without steps, ignoring the JSON option mentioned above.
6562
Steps are mandatory for streaming-based engines and trying to switch them off will result in a runtime error.
6663

Diff for: docs/source/dev/dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Optional: I/O backends
2727

2828
* `JSON <https://en.wikipedia.org/wiki/JSON>`_
2929
* `HDF5 <https://support.hdfgroup.org/HDF5>`_ 1.8.13+
30-
* `ADIOS2 <https://github.com/ornladios/ADIOS2>`_ 2.7.0+
30+
* `ADIOS2 <https://github.com/ornladios/ADIOS2>`_ 2.9.0+
3131

3232
while those can be build either with or without:
3333

Diff for: include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,7 @@ namespace detail
198198
case adios2::Mode::Write:
199199
return false;
200200
case adios2::Mode::Read:
201-
#if openPMD_HAS_ADIOS_2_8
202201
case adios2::Mode::ReadRandomAccess:
203-
#endif
204202
return true;
205203
case adios2::Mode::Undefined:
206204
case adios2::Mode::Sync:
@@ -217,9 +215,7 @@ namespace detail
217215
case adios2::Mode::Write:
218216
return true;
219217
case adios2::Mode::Read:
220-
#if openPMD_HAS_ADIOS_2_8
221218
case adios2::Mode::ReadRandomAccess:
222-
#endif
223219
return false;
224220
case adios2::Mode::Undefined:
225221
case adios2::Mode::Sync:

Diff for: include/openPMD/IO/ADIOS/macros.hpp

-13
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@
66

77
#include <adios2.h>
88

9-
/*
10-
* ADIOS2 v2.8 brings mode::ReadRandomAccess
11-
*/
12-
#define openPMD_HAS_ADIOS_2_8 \
13-
(ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 208)
14-
/*
15-
* ADIOS2 v2.9 brings modifiable attributes (technically already in v2.8, but
16-
* there are too many bugs, so we only support it beginning with v2.9).
17-
* Group table feature requires ADIOS2 v2.9.
18-
*/
19-
#define openPMD_HAS_ADIOS_2_9 \
20-
(ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 209)
21-
229
#define openPMD_HAS_ADIOS_2_10 \
2310
(ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 210)
2411

Diff for: src/IO/ADIOS/ADIOS2File.cpp

+1-22
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,6 @@ void ADIOS2File::configure_IO()
428428
// these properties are inferred from the opened dataset in read mode
429429
if (writeOnly(m_mode))
430430
{
431-
432-
#if openPMD_HAS_ADIOS_2_9
433431
if (!m_impl->m_useGroupTable.has_value())
434432
{
435433
switch (m_impl->m_handler->m_encoding)
@@ -456,15 +454,6 @@ void ADIOS2File::configure_IO()
456454
? ADIOS2IOHandlerImpl::ModifiableAttributes::Yes
457455
: ADIOS2IOHandlerImpl::ModifiableAttributes::No;
458456
}
459-
#else
460-
if (!m_impl->m_useGroupTable.has_value())
461-
{
462-
m_impl->m_useGroupTable = UseGroupTable::No;
463-
}
464-
465-
m_impl->m_modifiableAttributes =
466-
ADIOS2IOHandlerImpl::ModifiableAttributes::No;
467-
#endif
468457
}
469458

470459
// set engine type
@@ -764,9 +753,7 @@ adios2::Engine &ADIOS2File::getEngine()
764753
streamStatus = StreamStatus::DuringStep;
765754
break;
766755
}
767-
#if openPMD_HAS_ADIOS_2_8
768756
case adios2::Mode::ReadRandomAccess:
769-
#endif
770757
case adios2::Mode::Read: {
771758
m_engine =
772759
std::make_optional(adios2::Engine(m_IO.Open(m_file, m_mode)));
@@ -1320,9 +1307,7 @@ void ADIOS2File::markActive(Writable *writable)
13201307
{
13211308
case UseGroupTable::No:
13221309
break;
1323-
case UseGroupTable::Yes:
1324-
#if openPMD_HAS_ADIOS_2_9
1325-
{
1310+
case UseGroupTable::Yes: {
13261311
if (writeOnly(m_mode) && m_impl->m_writeAttributesFromThisRank)
13271312
{
13281313
auto currentStepBuffered = currentStep();
@@ -1346,12 +1331,6 @@ void ADIOS2File::markActive(Writable *writable)
13461331
m_pathsMarkedAsActive.end());
13471332
}
13481333
}
1349-
#else
1350-
(void)writable;
1351-
throw error::OperationUnsupportedInBackend(
1352-
m_impl->m_handler->backendName(),
1353-
"Group table feature requires ADIOS2 >= v2.9.");
1354-
#endif
13551334
break;
13561335
}
13571336
}

0 commit comments

Comments
 (0)