Docs · I/O adapters
Install the I/O adapters.
Each adapter is a CMake option of a source build, and all of them except POSIX are off by default. The interceptors also need ELF support, which is off by default too, so a default build contains no adapter at all.
- Install method
- Spack or a CMake source build
- Interceptors
- Linux, CLIO_CORE_ENABLE_ELF=ON
- HDF5
- 1.14 or newer
- Output
- build/bin, installed to lib/
The interceptors (POSIX, STDIO, MPI-IO), the HDF5 VFD and the GPUDirect Storage adapter are not in pip install iowarp-core, the conda packages, the Docker image, or the .deb, .rpm, AppImage and Windows packages. The Docker image, iowarp/deploy-cpu, does include the HDF5 VOL connector and the ADIOS2 engine. Spack builds the interceptors and both HDF5 connectors by default (+posix +stdio +mpiio +vol +vfd) and adds +adios2 and +gds on request. For a source build, use the options on this page: INSTALL.md lists the platform prerequisites, and the install matrix on the home page writes the configure command.
Options at a glance
| Adapter | CMake options | Default | Also needs | Library (build tree) |
|---|---|---|---|---|
| POSIX | CLIO_CTE_ENABLE_POSIX_ADAPTER=ON and CLIO_CORE_ENABLE_ELF=ON | ON, but inert while ELF is OFF | libelf (pkg-config libelf), Linux | build/bin/libclio_cte_posix.so |
| STDIO | CLIO_CTE_ENABLE_STDIO_ADAPTER=ON and CLIO_CORE_ENABLE_ELF=ON | OFF | libelf, Linux | build/bin/libclio_cte_stdio.so |
| MPI-IO | CLIO_CTE_ENABLE_MPIIO_ADAPTER=ON and CLIO_CORE_ENABLE_ELF=ON | OFF | libelf, Linux, an MPI (OpenMPI or MPICH) | build/bin/libclio_cte_mpiio.so |
| HDF5 VOL | CLIO_CTE_ENABLE_HDF5_VOL=ON | OFF | HDF5 1.14 or newer | build/bin/libclio_hdf5_vol.so |
| HDF5 VFD | CLIO_CTE_ENABLE_VFD=ON | OFF | HDF5 1.14 or newer | build/bin/libclio_vfd.so |
| ADIOS2 | CLIO_CTE_ENABLE_ADIOS2_ADAPTER=ON | OFF | ADIOS2; MPI optional | build/bin/libiowarp_engine.so |
All adapter libraries are written to the build tree's bin/ directory and installed to <prefix>/lib by cmake --install. The options are defined in the top-level CMakeLists.txt; which subdirectory each one builds is decided in context-transfer-engine/adapter/CMakeLists.txt.
Build everything
One configure line for all six adapters on Linux, with MPI and the tests:
$ git clone --recurse-submodules https://github.com/iowarp/clio-core.git
$ cd clio-core
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCLIO_CORE_ENABLE_ELF=ON \
-DCLIO_CTE_ENABLE_POSIX_ADAPTER=ON \
-DCLIO_CTE_ENABLE_STDIO_ADAPTER=ON \
-DCLIO_CTE_ENABLE_MPIIO_ADAPTER=ON -DCLIO_CORE_ENABLE_MPI=ON \
-DCLIO_CTE_ENABLE_HDF5_VOL=ON \
-DCLIO_CTE_ENABLE_VFD=ON \
-DCLIO_CTE_ENABLE_ADIOS2_ADAPTER=ON \
-DHDF5_ROOT=/path/to/the/hdf5/your/application/uses \
-DCLIO_CORE_ENABLE_TESTS=ON
$ cmake --build build -j"$(nproc)"
$ ls build/bin/lib{clio_cte_posix,clio_cte_stdio,clio_cte_mpiio,clio_hdf5_vol,clio_vfd,iowarp_engine}.so
$ cmake --install build --prefix "$HOME/clio" # optional: copies them to $HOME/clio/libLeave out the options for adapters you do not need; each one only adds its own dependency. Two presets in CMakePresets.json cover common subsets:
vfd: a Debug build intobuild-vfdwith ELF, the POSIX and STDIO interceptors and the HDF5 VFD, and tests on.cmake --preset vfd && cmake --build build-vfd -j.release-adapter: a Release build with the HDF5 VOL connector, the ADIOS2 engine and the FUSE daemon, MPI on and ELF off, so no interceptors.
Per-adapter notes
POSIX, STDIO and MPI-IO interceptors
- ELF is required. The interceptors find the real C library and MPI functions by walking the loaded ELF objects, so they are only built when
CLIO_CORE_ENABLE_ELF=ON. That option needs libelf, found through pkg-config (sudo apt install libelf-dev pkg-configon Debian and Ubuntu). Without it, configure printsCTE Adapters: DISABLED (ELF support not enabled)and builds none of the three. They are Linux only. - The filesystem module comes with them. Enabling any interceptor (or the VFD or FUSE) forces
CLIO_CTE_ENABLE_FILESYSTEM=ON, theclio_cte_filesystemmodule the interceptors write through. It in turn needs the stream module,CLIO_CTE_ENABLE_STREAM, which is on by default; do not turn it off. - MPI-IO detects the MPI flavor. The MPI-IO interceptor reads implementation-specific
MPI_Statusfields, so configure asksmpiccwhether it is OpenMPI or MPICH and stops with an error if it cannot tell. Force the answer with-DCLIO_CTE_OPENMPI=ONor-DCLIO_CTE_MPICH=ON. Its unit test is only registered whenCLIO_CORE_ENABLE_MPI=ON.
HDF5 VOL connector and VFD
- HDF5 1.14 or newer, and the same one as the application. HDF5 loads the connectors with
dlopen, so they must link the samelibhdf5as the program that loads them. Point CMake at it with-DHDF5_ROOT=<prefix>(orCMAKE_PREFIX_PATH) and check afterwards withldd build/bin/libclio_hdf5_vol.so | grep hdf5. A mismatch shows up later as anH5Fopenthat fails without naming the library it could not load. - The two fail differently when HDF5 is missing. The VFD requires HDF5 and configure stops with an error if it is absent or older than 1.14. The VOL connector only prints a warning (
HDF5 not found. HDF5 VOL adapter will not be built.) and the build continues without it, so check thatlibclio_hdf5_vol.soexists before you rely on it. - No ELF needed. Both connectors are HDF5 plugins rather than interceptors, so they do not depend on
CLIO_CORE_ENABLE_ELFand are not limited to Linux. - CAE HDF5 is a different option.
CLIO_CORE_ENABLE_HDF5=ONenables HDF5 support in the Context Assimilation Engine only. It does not build either connector. - The VFD's public header
H5FDclio.his installed toinclude/adapter/vfd/for applications that select the driver in code.
ADIOS2 engine
- ADIOS2 is required once the option is on. The top-level CMake calls
find_package(ADIOS2 REQUIRED), so configure fails if ADIOS2 cannot be found. Add its prefix toCMAKE_PREFIX_PATH. - MPI is optional. When an MPI C++ compiler is found, the engine links it and configure prints
ADIOS2 adapter: MPI support enabled. - The engine is compiled as C++17, because some ADIOS2 headers do not parse as C++20 with GCC 11.
Check the build
With CLIO_CORE_ENABLE_TESTS=ON, each adapter registers its own tests. They start a runtime in-process with a test configuration, so no clio-run needs to be running:
$ ctest --test-dir build -R 'clio_cte_(posix|stdio|mpiio)_unit_tests' --output-on-failure
$ ctest --test-dir build -R 'clio_cte_vfd_unit_tests|cte_hdf5_vol' --output-on-failure
$ ctest --test-dir build -L adios2 --output-on-failurecte_hdf5_vol_compat_suite and cte_hdf5_vfd_compat_suite run the HDF5 differential compatibility suite against native HDF5. They need Python, h5py and the HDF5 command-line tools (h5diff, h5dump and others), and report "Not Run" when those are missing. For the HDF5 connectors, scripts/clio-hdf5-doctor --bin build/bin checks an environment and prints the fix for each problem it finds; add --smoke to round-trip a file through the VOL connector.