tem_restart_closeRead Subroutine

public subroutine tem_restart_closeRead(me)

This subroutine closes the restart dump file and writes the last header.

Arguments

Type IntentOptional Attributes Name
type(tem_restart_type) :: me

the restart information


Calls

proc~~tem_restart_closeread~~CallsGraph proc~tem_restart_closeread tem_restart_closeRead proc~tem_restart_closeread_single tem_restart_closeRead_single proc~tem_restart_closeread->proc~tem_restart_closeread_single proc~tem_restart_readdata tem_restart_readData proc~tem_restart_closeread->proc~tem_restart_readdata mpi_file_close mpi_file_close proc~tem_restart_closeread_single->mpi_file_close proc~check_mpi_error check_mpi_error proc~tem_restart_closeread_single->proc~check_mpi_error proc~tem_restart_readdata_single tem_restart_readData_single proc~tem_restart_readdata->proc~tem_restart_readdata_single mpi_error_string mpi_error_string proc~check_mpi_error->mpi_error_string proc~tem_abort tem_abort proc~check_mpi_error->proc~tem_abort proc~tem_restart_readdata_single->proc~check_mpi_error mpi_file_read_all mpi_file_read_all proc~tem_restart_readdata_single->mpi_file_read_all mpi_abort mpi_abort proc~tem_abort->mpi_abort

Source Code

  subroutine tem_restart_closeRead( me )
    ! -------------------------------------------------------------------- !
    !> the restart information
    type(tem_restart_type) :: me
    ! -------------------------------------------------------------------- !
    ! temporary buffer array for empty reads
    real(kind=rk) :: chunk(1)
    integer :: iChunk
    ! -------------------------------------------------------------------- !

    ! If local process has performed less reads than global maximum required,
    ! we need to complete as many empty reads as the difference to maxnChunks
    ! to satisfy collective MPI-IO operations.
    me%nChunkElems = 0
    do iChunk = me%read_file%nChunks+1, me%read_file%maxnChunks
      call tem_restart_readData(restart = me, chunk = chunk)
    end do

    ! Invoke the routine to close current variable system file
    call tem_restart_closeRead_single(me)

    write(logUnit(1),*)' Closed Read.'

  end subroutine tem_restart_closeRead