m_io_backend Module

(ADaptive Input Output System v2) library. It acts as a translation layer converting generic I/O calls from the session interface into specific calls to the ADIOS2 API.

The adios2_reader_t and adios2_writer_t types defined here extend the abstract base types from m_io_base and implement required procedures

This backend leverages several key features of the underlying ADIOS2 library - engine abstraction - the same API can be used for different transport methods (e.g. BP4, BP5, HDF5) - Asynchronous I/O - by default ADIOS2 uses a deferred transport mode which can improve performance by overlapping computation and I/O - MPI integration - it is designed for large-scale parallel I/O and integrates with MPI, though serial operation is also supported

GPU-aware writes (built with WITH_ADIOS2_GPU_AWARE, which defines X3D2_ADIOS2_CUDA) hand device memory straight to ADIOS2: - the solver backend packs each field into a contiguous, unpadded device buffer (base_backend_t%export_field_to_device), so this module needs no knowledge of the backend's field layout or allocator types - one staging buffer belongs to the open file and is reused across fields and steps, so no device memory is allocated per write - puts are synchronous: ADIOS2 2.12's BP5 engine copies GPU buffers during Put whatever mode is requested, so the buffer is free again as soon as the put returns

Runtime options, read from the environment when the first writer starts: - X3D2_ADIOS2_GPU_WRITE_MODE=auto|gpu|host (default auto): host forces the device-to-host staged path even when GPU-aware writes are available - X3D2_ADIOS2_IO_BENCH=0|1 (default 0): time Put and EndStep per step and print a summary when the file closes, excluding the first bench_warmup_steps steps

Note

This is an internal backend module and should never be used directly. All user interaction must go through m_io_session.


Uses

  • module~~m_io_backend~2~~UsesGraph module~m_io_backend~2 m_io_backend adios2 adios2 module~m_io_backend~2->adios2 cudafor cudafor module~m_io_backend~2->cudafor iso_c_binding iso_c_binding module~m_io_backend~2->iso_c_binding iso_fortran_env iso_fortran_env module~m_io_backend~2->iso_fortran_env module~m_base_backend m_base_backend module~m_io_backend~2->module~m_base_backend module~m_common m_common module~m_io_backend~2->module~m_common module~m_field m_field module~m_io_backend~2->module~m_field module~m_io_base m_io_base module~m_io_backend~2->module~m_io_base module~m_mpi m_mpi module~m_io_backend~2->module~m_mpi module~m_nvtx m_nvtx module~m_io_backend~2->module~m_nvtx module~m_base_backend->iso_c_binding module~m_base_backend->module~m_common module~m_base_backend->module~m_field module~m_allocator m_allocator module~m_base_backend->module~m_allocator module~m_mesh m_mesh module~m_base_backend->module~m_mesh module~m_poisson_fft m_poisson_fft module~m_base_backend->module~m_poisson_fft module~m_tdsops m_tdsops module~m_base_backend->module~m_tdsops module~m_common->module~m_mpi module~m_field->module~m_common module~m_io_base->module~m_base_backend module~m_io_base->module~m_common module~m_io_base->module~m_field module~m_mpi->iso_fortran_env mpi mpi module~m_mpi->mpi module~m_nvtx->iso_c_binding module~m_allocator->iso_fortran_env module~m_allocator->module~m_common module~m_allocator->module~m_field module~m_mesh->iso_fortran_env module~m_mesh->module~m_common module~m_mesh->module~m_field module~m_mesh->module~m_mpi module~m_mesh_content m_mesh_content module~m_mesh->module~m_mesh_content module~m_poisson_fft->module~m_common module~m_poisson_fft->module~m_field module~m_poisson_fft->module~m_mesh module~m_poisson_fft->module~m_tdsops module~m_tdsops->iso_fortran_env module~m_tdsops->module~m_common module~m_mesh_content->module~m_common

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: IO_BACKEND_DUMMY = 0
integer, public, parameter :: IO_BACKEND_ADIOS2 = 1

Functions

public function get_default_backend() result(backend)

Arguments

None

Return Value integer


Subroutines

public subroutine allocate_io_reader(reader)

Arguments

Type IntentOptional Attributes Name
class(io_reader_t), intent(out), allocatable :: reader

public subroutine allocate_io_writer(writer)

Arguments

Type IntentOptional Attributes Name
class(io_writer_t), intent(out), allocatable :: writer