source: codes/icosagcm/trunk/src/base/abort.F90 @ 947

Last change on this file since 947 was 901, checked in by adurocher, 5 years ago

trunk : Fixed compilation with --std=f2008 with gfortran

Added dynamico_abort() to replace non standard ABORT() intrinsic
Other modifications to respect the fortran standard

File size: 385 bytes
Line 
1module abort_mod
2  implicit none
3
4  contains
5 
6  !!!Abort execution
7  subroutine dynamico_abort( message )
8    use mpi_mod
9    implicit none
10    character(len=*), optional :: message
11    integer :: ierr
12   
13    !$omp single
14    print *, "Abort !"
15    if(present(message)) print *, message
16    call MPI_Abort(MPI_COMM_WORLD, -1, ierr)
17    !$omp end single
18  end subroutine
19end module
Note: See TracBrowser for help on using the repository browser.