Subroutine to gracefully stop the execution with an optional error message.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parallel_obj), | intent(inout) | :: | this |
Parallel object |
||
| character(len=*), | intent(in), | optional | :: | msg |
Error message |
impure subroutine parallel_obj_Stop(this,msg) !> Subroutine to gracefully stop the execution with an optional error ! message. implicit none class(parallel_obj), intent(inout) :: this !! Parallel object character(len=*), intent(in), & optional :: msg !! Error message ! Work variable integer :: ierr ! Specify who sends the abort signal and what it means if (present(msg)) then write(stderr,'(a,i0,2a)') 'LEAP: termination signal received on rank: ',this%rank%mine,'. Reason: ',trim(msg) else write(stderr,'(a,i0)' ) 'LEAP: termination signal received on rank: ',this%rank%mine end if ! Call general abort call MPI_ABORT(this%comm%w,0,ierr) return end subroutine parallel_obj_Stop