check_mpi_error Subroutine

public subroutine check_mpi_error(iError, event_string)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iError
character(len=*), intent(in) :: event_string

Source Code

  subroutine check_mpi_error( iError, event_string )
    integer, intent(in) :: iError
    character(len=*), intent(in) :: event_string

    character(len=100) :: IOError
    integer :: resultlen = 100
    integer :: ErrErr

    if (iError /= MPI_SUCCESS) then
      call MPI_ERROR_STRING(iError, IOError, resultlen, ErrErr)
      write(logUnit(0),*) 'MPI Error when '//trim(event_string),': ' &
        &                 //trim(IOError)
      call tem_abort()
    end if
  end subroutine check_mpi_error