eplf/src/finish.irp.f

36 lines
719 B
FortranFixed
Raw Normal View History

2009-09-29 13:42:56 +02:00
subroutine abrt (here,message)
implicit none
IRP_IF MPI
include 'mpif.h'
IRP_ENDIF
character*(*) :: here
character*(*) :: message
2009-11-06 00:27:24 +01:00
print *, ''
print *, '-------------------------'
print *, 'Error in '//trim(here)//':'
print *, '-------------------------'
print *, trim(message)//'.'
print *, '-------------------------'
2009-09-29 13:42:56 +02:00
IRP_IF MPI
integer :: ierr
call mpi_abort(MPI_COMM_WORLD,0,ierr)
ASSERT (ierr == MPI_SUCCESS)
IRP_ELSE
stop 1
IRP_ENDIF
end
subroutine finish ()
implicit none
IRP_IF MPI
include 'mpif.h'
integer :: ierr
call mpi_finalize(ierr)
if (ierr /= MPI_SUCCESS) then
call abrt(irp_here,"Unable to finalize MPI")
endif
IRP_ENDIF
end