check_mpi Subroutine

private subroutine check_mpi(ierr, where)

Internal utility to check MPI return codes and abort on failure.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ierr

The MPI return code.

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

Descriptive string of where the failure occurred.


Source Code

   subroutine check_mpi(ierr, where)
      integer, intent(in) :: ierr
      character(len=*), intent(in) :: where

      if (ierr /= MPI_SUCCESS) then
         write(error_unit,'(a,a)') 'profiler MPI failure: ', trim(where)
         error stop 1
      end if
   end subroutine check_mpi