Docs · I/O adapters
I/O adapters.
The I/O adapters let an application that uses POSIX, STDIO, MPI-IO, HDF5 or ADIOS2 store its data in the Context Transfer Engine without changing its I/O code. They come from source builds, with Spack or CMake; the pip wheel and conda do not include them, and the Docker image has only the HDF5 VOL connector and the ADIOS2 engine.
- Adapters
- POSIX, STDIO, MPI-IO, HDF5 VOL, HDF5 VFD, ADIOS2
- Source
- context-transfer-engine/adapter/
- Install
- Spack or a CMake source build
- Needs
- A running clio-run runtime
The adapters
| Adapter | Mechanism | Where the data lives | Library | CMake option |
|---|---|---|---|---|
| POSIX | LD_PRELOAD interception of open, read, write, stat and friends | Only in the CTE (clio-fs) | libclio_cte_posix.so | CLIO_CTE_ENABLE_POSIX_ADAPTER + CLIO_CORE_ENABLE_ELF |
| STDIO | LD_PRELOAD interception of fopen, fread, fwrite and friends | Only in the CTE (clio-fs) | libclio_cte_stdio.so | CLIO_CTE_ENABLE_STDIO_ADAPTER + CLIO_CORE_ENABLE_ELF |
| MPI-IO | LD_PRELOAD interception of MPI_File_* | Only in the CTE (clio-fs) | libclio_cte_mpiio.so | CLIO_CTE_ENABLE_MPIIO_ADAPTER + CLIO_CORE_ENABLE_ELF |
| HDF5 VOL | HDF5 VOL connector clio, above the HDF5 library | Native file first; dataset images cached in the CTE | libclio_hdf5_vol.so | CLIO_CTE_ENABLE_HDF5_VOL |
| HDF5 VFD | HDF5 virtual file driver clio_vfd, below the HDF5 library | Native file first; byte ranges optionally cached in the CTE | libclio_vfd.so | CLIO_CTE_ENABLE_VFD |
| ADIOS2 | ADIOS2 plugin engine | Only in the CTE: one blob per variable, step and rank | libiowarp_engine.so | CLIO_CTE_ENABLE_ADIOS2_ADAPTER |
The install page has the exact configure lines, dependencies and output paths.
pip install iowarp-core, the conda packages and the .deb/.rpm/AppImage/Windows packages contain none of these libraries, and the Docker image has only the HDF5 VOL connector and the ADIOS2 engine. Build CLIO Core from source with Spack (each adapter is a variant) or with CMake and the options above; see Install.
Two designs
The adapters fall into two groups that treat the CTE very differently.
- The CTE is the only home of the data. The POSIX, STDIO and MPI-IO interceptors hand a file to the filesystem module (
clio_cte_filesystem), the same module behind Context FS. Nothing is written to the path on the host's own filesystem. The ADIOS2 engine writes blobs straight into a CTE tag. How durable the data is depends on the tiers the runtime composes. - The CTE is a cache. The HDF5 VOL connector and VFD write every byte to an ordinary HDF5 file first, synchronously.
h5dump,h5pyand every other tool read that file with or without CLIO. The cache can be lost or dropped at any time without losing data.
The clio:: path marker
The three interceptors take over a file only when its path contains a component that starts with clio::. The marker is removed, and the rest is the file's path in the clio-fs namespace:
| The application opens | Intercepted? | clio-fs path |
|---|---|---|
clio::/data/run1/out.bin | Yes | /data/run1/out.bin |
/scratch/clio::run1/out.bin | Yes | /scratch/run1/out.bin |
/scratch/run1/out.bin | No: passed to the real library | none |
So the interceptors need a path you can choose: a command-line argument, an input deck, an environment variable. The HDF5 VFD is the opposite: it takes plain paths and refuses clio:: names. The VOL connector and ADIOS2 engine do not look at the marker.
What every adapter needs at run time
A runtime
Start one with
clio-run start. The adapters attach to it as clients; the runtime readsCLIO_SERVER_CONF(default~/.clio/clio.yaml), and so does every client.The right pools
The interceptors need a
clio_cte_filesystempool, which the default configuration composes at560.0. The HDF5 connectors and the ADIOS2 engine need aclio_cte_corepool; the HDF5 quickstart config names itclio_cte_core, the name clients look it up by. See the configuration reference.The adapter loaded
LD_PRELOADfor an interceptor,HDF5_PLUGIN_PATHplus a selector for HDF5,ADIOS2_PLUGIN_PATHplus the plugin engine for ADIOS2. Each adapter page shows the exact lines.
Other adapters in the tree
The adapter directory holds a few more components. They are documented elsewhere or are not general-purpose I/O adapters:
- FUSE (
adapter/libfuse, optionCLIO_CTE_ENABLE_FUSE_ADAPTER): theclio_cte_fusedaemon that mounts the clio-fs namespace as a directory. See Context FS. - Paged vectors (
adapter/cpu_vector,adapter/gpu_vector): arrays larger than host or GPU memory whose pages are CTE blobs. See Memory expansion. - cuFile (GDS) interceptor (
adapter/nvidia_gds, optionCLIO_CTE_ENABLE_NVIDIA_GDS_ADAPTER, needsCLIO_CORE_ENABLE_CUDA=ONand ELF):libclio_cte_nvidia_gds.soreplacescuFileReadandcuFileWritewith a copy through a host buffer andpread/pwrite, so that with the POSIX interceptor also preloaded aclio::path reaches the CTE. It is a compatibility shim, not GPU-direct I/O. Batch I/O goes to the real cuFile library unchanged. - kvhdf5 (
adapter/kvhdf5, built whenCLIO_CORE_ENABLE_CUDA=ON): a header-only, HDF5-like dataset API for CUDA kernels over the CTE. It is a GPU programming interface, not an adapter for existing HDF5 code. - mapper: an internal header used by the adapters, with no user-facing interface.
Where to go next
- Install: build options, dependencies and library paths.
- One walkthrough per adapter: POSIX, STDIO, MPI-IO, HDF5 VOL, HDF5 VFD, ADIOS2.
- Configuration reference: every environment variable and C entry point the adapters read.
- Adapter design: interception, the descriptor layer and the HDF5 caches in depth.