tem_restart_readData_single Subroutine

public subroutine tem_restart_readData_single(restart, chunk, offset)

subroutine which reads data from restart file corresponding to the input variable system

Arguments

Type IntentOptional Attributes Name
type(tem_restart_type), intent(inout) :: restart

Restart object to read the data from

real(kind=rk), intent(out) :: chunk(:)

Memory to chunk to put the data into

integer, intent(in) :: offset

Offset of the chunk of data to get in the global data


Source Code

  subroutine tem_restart_readData_single( restart, chunk, offset )
    ! -------------------------------------------------------------------- !
    !> Restart object to read the data from
    type(tem_restart_type), intent(inout) :: restart
    !> Memory to chunk to put the data into
    real(kind=rk), intent(out)            :: chunk(:)
    !> Offset of the chunk of data to get in the global data
    integer, intent(in)                   :: offset
    ! -------------------------------------------------------------------- !
    ! defining local variables
    integer :: iostatus( MPI_STATUS_SIZE )
    integer :: iError
    ! -------------------------------------------------------------------- !

    ! MPI_FILE_READ_ALL(fh, buf, count, datatype, status)
    call mpi_file_read_all( restart%binaryUnit, chunk(offset), &
      &                     restart%nChunkElems,               &
      &                     restart%read_file%vectype,         &
      &                     iostatus, iError                   )

    call check_mpi_error( iError,'File write all in tem_restart_readData_single')

  end subroutine tem_restart_readData_single