adios2_writer_t Derived Type

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

ADIOS2 writer type


Inherits

type~~adios2_writer_t~~InheritsGraph type~adios2_writer_t adios2_writer_t type~base_adios2_t base_adios2_t type~adios2_writer_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

Inherited by

type~~adios2_writer_t~~InheritedByGraph type~adios2_writer_t adios2_writer_t type~checkpoint_manager_adios2_t checkpoint_manager_adios2_t type~checkpoint_manager_adios2_t->type~adios2_writer_t adios2_writer type~checkpoint_manager_t checkpoint_manager_t type~checkpoint_manager_t->type~checkpoint_manager_adios2_t impl type~base_case_t base_case_t type~base_case_t->type~checkpoint_manager_t checkpoint_mgr type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t

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_writer

  • private subroutine begin_step_writer(self, file)

    Begin a step for ADIOS2 writer type

    Arguments

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

generic, public :: write_data => write_scalar_int, write_scalar_real, write_array_1d_real, write_array_2d_real, write_array_3d_real, write_array_1d_int, write_array_4d_real

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

    Write scalar integer data

    Arguments

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

    Write scalar real data

    Arguments

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

    Write 1d array real data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(in), dimension(:) :: data
    type(adios2_file_t), intent(inout) :: file
    integer(kind=i8), intent(in), optional, dimension(1) :: shape_dims
    integer(kind=i8), intent(in), optional, dimension(1) :: start_dims
    integer(kind=i8), intent(in), optional, dimension(1) :: count_dims
  • private subroutine write_array_2d_real(self, name, data, file, shape_dims, start_dims, count_dims)

    Write 2d array real data

    Arguments

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

    Write 3d array real data

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(in), dimension(:, :, :) :: data
    type(adios2_file_t), intent(inout) :: file
    integer(kind=i8), intent(in), dimension(3) :: shape_dims
    integer(kind=i8), intent(in), dimension(3) :: start_dims
    integer(kind=i8), intent(in), dimension(3) :: count_dims
  • private subroutine write_array_1d_int(self, name, data, file, shape_dims, start_dims, count_dims)

    Write 1d array integer data

    Arguments

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

    unique variable identifier within io

    integer, intent(in), dimension(:) :: data

    scalar real data

    type(adios2_file_t), intent(inout) :: file
    integer(kind=i8), intent(in), optional, dimension(:) :: shape_dims

    Global shape Local offset Local size

    integer(kind=i8), intent(in), optional, dimension(:) :: start_dims

    Global shape Local offset Local size

    integer(kind=i8), intent(in), optional, dimension(:) :: count_dims

    Global shape Local offset Local size

  • private subroutine write_array_4d_real(self, name, data, file, shape_dims, start_dims, count_dims)

    Write 4d array real data

    Arguments

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

generic, public :: write_attribute => write_attribute_string, write_attribute_array_1d_real

  • private subroutine write_attribute_string(self, name, value, file)

    Write string attribute for Paraview

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    character(len=*), intent(in) :: value
    type(adios2_file_t), intent(inout) :: file
  • private subroutine write_attribute_array_1d_real(self, name, data, file)

    Write 1D array attribute for Paraview

    Arguments

    Type IntentOptional Attributes Name
    class(adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: name
    real(kind=dp), intent(in), dimension(:) :: data
    type(adios2_file_t), intent(inout) :: file