# ADIOS2: adaptable I/O for HPC (BP files, HDF5 engine). Built serial and for # Open MPI (Fedora MPI layout). Consumers: fenics-dolfinx (DOLFINX_ENABLE_ADIOS2, # VTX/BP output for ParaView), and mfem (MFEM_USE_ADIOS2, C++ bindings). # Every optional feature is set explicitly so the result does not depend on # what happens to be in the buildroot. Streaming/staging engines (SST, DataMan), # remote access, Fortran and the research compressors are off for now. %bcond openmpi 1 Name: adios2 Version: 2.12.1 Release: 1%{?dist} Summary: The Adaptable Input/Output System, version 2 # ADIOS2 is Apache-2.0; bundled and built in: KWSys (adios2sys, internal), # ATL, DILL, FFS and EVPath (Georgia Tech) are BSD-3-Clause, ENet is MIT. License: Apache-2.0 AND BSD-3-Clause AND MIT URL: https://adios2.readthedocs.io/ Source: https://github.com/ornladios/ADIOS2/archive/v%{version}/ADIOS2-%{version}.tar.gz BuildRequires: cmake >= 3.14 BuildRequires: gcc-c++ BuildRequires: make BuildRequires: cmake(nlohmann_json) BuildRequires: cmake(pugixml) BuildRequires: cmake(yaml-cpp) BuildRequires: cmake(Blosc2) BuildRequires: cmake(zfp) BuildRequires: bzip2-devel BuildRequires: libpng-devel BuildRequires: hdf5-devel BuildRequires: python3-devel BuildRequires: python3-numpy BuildRequires: python3-nanobind BuildRequires: patchelf # The bundled DILL generates its code-generation backend from *.ops with Perl; # without Perl it copies pre-generated sources, and 2.12.1 ships none for arm64 # (all aarch64 chroots: "Error copying file .../pregen-source/dill_arm64.c"). BuildRequires: perl-interpreter %if %{with openmpi} BuildRequires: openmpi-devel BuildRequires: hdf5-openmpi-devel BuildRequires: python3-mpi4py-openmpi %endif Provides: bundled(kwsys) # Built as libadios2_{atl,dill,ffs,evpath,enet} even with SST off Provides: bundled(atl) = 2.3.2 Provides: bundled(dill) = 3.4.1 Provides: bundled(ffs) = 3.2.1 Provides: bundled(evpath) = 5.1.0 Provides: bundled(enet) = 1.3.14 %global _description %{expand: ADIOS2 (The Adaptable Input/Output System) is a framework for scientific data I/O: it writes and reads self-describing, step-based data (the BP format and an HDF5 engine) from C, C++ and Python, serially or in parallel with MPI, with optional compression (Blosc2, BZip2, ZFP, PNG). ParaView and VisIt read its BP output; DOLFINx uses it for VTX output.} %description %_description %package devel Summary: Development files for ADIOS2 (serial) Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Headers, CMake configuration and library links for the serial ADIOS2. %package -n python3-%{name} Summary: Python bindings for ADIOS2 (serial) Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python3-numpy %description -n python3-%{name} Python bindings (the adios2 module) for the serial ADIOS2. %if %{with openmpi} %package openmpi Summary: ADIOS2 built against Open MPI Requires: openmpi%{?_isa} Requires: hdf5-openmpi%{?_isa} %description openmpi %_description This package contains the Open MPI build. %package openmpi-devel Summary: Development files for ADIOS2 (Open MPI) Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: openmpi-devel%{?_isa} %description openmpi-devel Headers, CMake configuration and library links for ADIOS2 built against Open MPI (find_package(ADIOS2) after `module load mpi/openmpi-%{_arch}`). %package -n python3-%{name}-openmpi Summary: Python bindings for ADIOS2 (Open MPI) Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: python3-mpi4py-openmpi Requires: python3-numpy %description -n python3-%{name}-openmpi Python bindings (the adios2 module) for ADIOS2 built against Open MPI, installed in the Open MPI Python path. %endif %prep %autosetup -n ADIOS2-%{version} # Licence texts of the bundled libraries, under distinct names for %%license for d in atl dill ffs EVPath enet; do cp -p thirdparty/$d/$d/LICENSE LICENSE.$d done %build # Fedora ships nanobind's CMake package inside the Python module # (python3-nanobind: %%{python3_sitelib}/nanobind/cmake), off CMake's search path. test -f %{python3_sitelib}/nanobind/cmake/nanobind-config.cmake OPTIONS=( -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DADIOS2_BUILD_EXAMPLES=OFF -DADIOS2_RUN_INSTALL_TEST=OFF -DADIOS2_INSTALL_GENERATE_CONFIG=OFF -DADIOS2_USE_EXTERNAL_DEPENDENCIES=OFF -DADIOS2_USE_EXTERNAL_NLOHMANN_JSON=ON -DADIOS2_USE_EXTERNAL_PUGIXML=ON -DADIOS2_USE_EXTERNAL_YAMLCPP=ON -DADIOS2_USE_EXTERNAL_NANOBIND=ON -Dnanobind_DIR=%{python3_sitelib}/nanobind/cmake -DADIOS2_USE_HDF5=ON -DADIOS2_USE_Python=ON -DADIOS2_USE_Blosc2=ON -DADIOS2_USE_BZip2=ON -DADIOS2_USE_ZFP=ON -DADIOS2_USE_PNG=ON -DADIOS2_USE_SysVShMem=ON -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_SST=OFF -DADIOS2_USE_DataMan=OFF -DADIOS2_USE_ZeroMQ=OFF -DADIOS2_USE_HDF5_VOL=OFF -DADIOS2_USE_SZ=OFF -DADIOS2_USE_SZ3=OFF -DADIOS2_USE_MGARD=OFF -DADIOS2_USE_LIBPRESSIO=OFF -DADIOS2_USE_BigWhoop=OFF -DADIOS2_USE_PRODM=OFF -DADIOS2_USE_Caliper=OFF -DADIOS2_USE_CUDA=OFF -DADIOS2_USE_Kokkos=OFF -DADIOS2_USE_DAOS=OFF -DADIOS2_USE_DataSpaces=OFF -DADIOS2_USE_MHS=OFF -DADIOS2_USE_IME=OFF -DADIOS2_USE_UCX=OFF -DADIOS2_USE_Profiling=OFF -DADIOS2_USE_Sodium=OFF -DADIOS2_USE_Catalyst=OFF -DADIOS2_USE_Campaign=OFF -DADIOS2_USE_OpenSSL=OFF -DADIOS2_USE_AWSSDK=OFF -DADIOS2_USE_XRootD=OFF -DADIOS2_USE_CURL=OFF -DADIOS2_USE_Derived_Variable=OFF -DADIOS2_USE_KVCACHE=OFF ) %global _vpath_builddir %{_target_platform}-serial %cmake ${OPTIONS[@]} -DADIOS2_USE_MPI=OFF \ -DCMAKE_INSTALL_PYTHONDIR=%{python3_sitearch} %cmake_build %if %{with openmpi} %{_openmpi_load} %global _vpath_builddir %{_target_platform}-openmpi # The MPI prefix is not on the default loader path, so libraries and the Python # extension record it as RPATH (as fenics-dolfinx does). %cmake ${OPTIONS[@]} -DADIOS2_USE_MPI=ON \ -DCMAKE_INSTALL_PREFIX=${MPI_HOME} \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE} \ -DCMAKE_INSTALL_PYTHONDIR=%{python3_sitearch}/openmpi \ -DCMAKE_SKIP_INSTALL_RPATH=OFF \ -DCMAKE_INSTALL_RPATH=${MPI_LIB} %cmake_build %{_openmpi_unload} %endif %install %global _vpath_builddir %{_target_platform}-serial %cmake_install %if %{with openmpi} %{_openmpi_load} DESTDIR=%{buildroot} cmake --install %{_target_platform}-openmpi %{_openmpi_unload} %endif # The Python bindings get an $ORIGIN/../../../../../../lib64 RUNPATH, which # check-rpaths rejects (0x0020, 11207147). The serial library is on the default # path, so drop it there; the Open MPI one needs ${MPI_LIB}. for so in $(find %{buildroot}%{python3_sitearch}/adios2 -name '*.so'); do patchelf --remove-rpath "$so" done %if %{with openmpi} for so in $(find %{buildroot}%{python3_sitearch}/openmpi/adios2 -name '*.so'); do patchelf --set-rpath %{_libdir}/openmpi/lib "$so" done %endif # No generated adios2-config (ADIOS2_INSTALL_GENERATE_CONFIG=OFF): it is made at # install time by compiling a dummy project against the DESTDIR tree and kept # build-tree paths even after stripping the buildroot (11207024, 11207121). # CMake users (find_package(ADIOS2)) are unaffected. # Nothing here should point back into the build tree; show what does. if grep -rIl "%{_builddir}" %{buildroot}; then grep -rIn "%{_builddir}" %{buildroot} | cut -c1-300 | head -20 exit 1 fi %check cat > rt.py <<'PY' # Write a distributed 1-D array in two steps, read it back, compare. import sys import numpy as np import adios2 comm = None if len(sys.argv) > 1: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.rank if comm else 0 size = comm.size if comm else 1 n = 8 with adios2.Stream("rt.bp", "w", comm) if comm else adios2.Stream("rt.bp", "w") as s: for step in range(2): s.begin_step() s.write("x", np.arange(n, dtype=np.float64) + rank * n + 100 * step, [size * n], [rank * n], [n]) s.end_step() if comm: comm.Barrier() if rank == 0: with adios2.Stream("rt.bp", "r") as s: got = [s.read("x") for _ in s.steps()] assert len(got) == 2, len(got) for step, x in enumerate(got): assert np.array_equal(x, np.arange(size * n, dtype=np.float64) + 100 * step), (step, x) print("adios2", adios2.__version__, "round trip OK on", size, "rank(s)") PY PYTHONPATH=%{buildroot}%{python3_sitearch} LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{python3} rt.py LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/bpls -l rt.bp | tee bpls.out # serial: one rank writes n = 8 per step, two steps grep -q "double *x *2\*{8}" bpls.out %if %{with openmpi} %{_openmpi_load} rm -rf rt.bp export OMPI_MCA_rmaps_base_oversubscribe=1 export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi:${PYTHONPATH} LD_LIBRARY_PATH=%{buildroot}${MPI_LIB} \ mpiexec -n 2 %{python3} rt.py mpi LD_LIBRARY_PATH=%{buildroot}${MPI_LIB} %{buildroot}${MPI_BIN}/bpls -l rt.bp | tee bpls-mpi.out grep -q "double *x *2\*{16}" bpls-mpi.out %{_openmpi_unload} %endif %files %license LICENSE thirdparty/KWSys/adios2sys/Copyright.txt LICENSE.atl LICENSE.dill LICENSE.ffs LICENSE.EVPath LICENSE.enet %doc ReadMe.md %{_bindir}/* %{_libdir}/libadios2*.so.* %files devel %{_includedir}/adios2* %{_libdir}/libadios2*.so %{_libdir}/cmake/adios2/ %files -n python3-%{name} %{python3_sitearch}/adios2/ %if %{with openmpi} %files openmpi %license LICENSE thirdparty/KWSys/adios2sys/Copyright.txt LICENSE.atl LICENSE.dill LICENSE.ffs LICENSE.EVPath LICENSE.enet %{_libdir}/openmpi/bin/* %{_libdir}/openmpi/lib/libadios2*.so.* # input files for adios2_iotest %{_libdir}/openmpi/share/iotest-config/ %files openmpi-devel %{_includedir}/openmpi-%{_arch}/adios2* %{_libdir}/openmpi/lib/libadios2*.so %{_libdir}/openmpi/lib/cmake/adios2/ %files -n python3-%{name}-openmpi %{python3_sitearch}/openmpi/adios2/ %endif %changelog * Sun Oct 25 2026 Morgan Hough - 2.12.1-1 - New package: ADIOS2 2.12.1, serial and Open MPI, C/C++ and Python, HDF5 engine and Blosc2/BZip2/ZFP/PNG operators; system nlohmann_json, pugixml, yaml-cpp and nanobind. %%check round-trips a distributed array through a BP file (Python, serial and 2 ranks) and lists it with bpls.