adios2_reader_t Derived Type

type, public, extends(../../../base_adios2_t) :: adios2_reader_t

ADIOS2 reader type


Inherits

type~~adios2_reader_t~~InheritsGraph type~adios2_reader_t adios2_reader_t type~base_adios2_t base_adios2_t type~adios2_reader_t->type~base_adios2_t adios2_adios adios2_adios type~base_adios2_t->adios2_adios adios adios2_engine adios2_engine type~base_adios2_t->adios2_engine engine adios2_io adios2_io type~base_adios2_t->adios2_io io

Type-Bound Procedures

procedure, public :: init

Initialises ADIOS2 handler

  • private subroutine init(self, comm, io_name)

    Initialises ADIOS2 self: Instance of base_adios2_t comm: MPI communicator (use MPI_COMM_WORLD for parallel runs) io_name: unique name associated with IO component inside ADIOS2

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self
    integer, intent(in) :: comm
    character(len=*), intent(in) :: io_name

    io that spawns an engine based on its configuration

procedure, public :: open

Opens an ADIOS2 engine

  • private function open(self, filename, mode, comm) result(file)

    Opens an ADIOS2 engine filename: Unique engine identifier within io mode: Opening mode (write, append, read)

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self
    character(len=*), intent(in) :: filename

    Unique engine identifier within io

    integer, intent(in) :: mode

    Opening mode (write, append, read)

    integer, intent(in), optional :: comm

    MPI communicator (optional)

    Return Value type(adios2_file_t)

    ADIOS2 file object

procedure, public :: close

Closes the ADIOS2 session

  • private subroutine close(self, file)

    Closes ADIOS2 session

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self
    type(adios2_file_t), intent(inout) :: file

procedure, public :: end_step

Ends a step in the ADIOS2 engine

  • private subroutine end_step(self, file)

    Ends a step in the ADIOS2 engine

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self
    type(adios2_file_t), intent(inout) :: file

procedure, public :: handle_error

Error handling for ADIOS2 operations

  • private subroutine handle_error(self, ierr, message)

    Handles ADIOS2 errors

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self
    integer, intent(in) :: ierr

    Error code from ADIOS2 operations

    character(len=*), intent(in) :: message

    Error message to display

procedure, public :: finalise

Finalises ADIOS2 handler

  • private subroutine finalise(self)

    Finalises ADIOS2 handler

    Arguments

    Type IntentOptional Attributes Name
    class(base_adios2_t), intent(inout) :: self

procedure, public :: begin_step => begin_step_reader

  • private subroutine begin_step_reader(self, file)

    Begin a step for ADIOS2 reader type

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    type(adios2_file_t), intent(inout) :: file

generic, public :: read_data => read_scalar_integer, read_scalar_i8, read_scalar_real, read_array_2d_real, read_array_3d_real

  • private subroutine read_scalar_integer(self, name, data, file)

    Read scalar integer data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    integer, intent(out) :: data
    type(adios2_file_t), intent(inout) :: file
  • private subroutine read_scalar_i8(self, name, data, file)

    Read scalar long integer data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    integer(kind=i8), intent(out) :: data
    type(adios2_file_t), intent(inout) :: file
  • private subroutine read_scalar_real(self, name, data, file)

    Read scalar real data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(out) :: data
    type(adios2_file_t), intent(inout) :: file
  • private subroutine read_array_2d_real(self, name, data, file, start_dims, count_dims)

    Read 2d array real data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(out), dimension(:, :), allocatable :: data
    type(adios2_file_t), intent(inout) :: file
    integer(kind=i8), intent(in), dimension(2) :: start_dims
    integer(kind=i8), intent(in), dimension(2) :: count_dims
  • private subroutine read_array_3d_real(self, name, data, file, start_dims, count_dims)

    Read 3d array real data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_reader_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(out), dimension(:, :, :), allocatable :: data
    type(adios2_file_t), intent(inout) :: file
    integer(kind=i8), intent(in), dimension(3) :: start_dims
    integer(kind=i8), intent(in), dimension(3) :: count_dims