The TELEMAC-MASCARET system
trunk
sources
utils
parallel
p_exit.F
Go to the documentation of this file.
1
! *****************
2
SUBROUTINE
p_exit
3
! *****************
4
!
5
!
6
!***********************************************************************
7
! PARALLEL V6P1 21/08/2010
8
!***********************************************************************
9
!
10
!brief END OF MPI.
11
!
12
!history RAINER JOHANNI (SGI MUNICH)
13
!+ **/10/1999
14
!+
15
!+ ADAPTED FOR MPI
16
!
17
!history J.A. JANKOWSKI (BAW KARLSRUHE)
18
!+ 28/12/1999
19
!+
20
!+ RELEASE 5.0 MODIFIED
21
!
22
!history J-M HERVOUET (LNHE)
23
!+ 16/06/2009
24
!+ V6P0
25
!+
26
!
27
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
28
!+ 13/07/2010
29
!+ V6P0
30
!+ Translation of French comments within the FORTRAN sources into
31
!+ English comments
32
!
33
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
34
!+ 21/08/2010
35
!+ V6P0
36
!+ Creation of DOXYGEN tags for automated documentation and
37
!+ cross-referencing of the FORTRAN sources
38
!
39
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
!
42
USE
declarations_parallel
43
USE
declarations_special
44
IMPLICIT NONE
45
!
46
#if defined HAVE_MPI
47
INTEGER
IER
48
!
49
!-----------------------------------------------------------------------
50
!
51
WRITE
(
lu
,*)
' '
52
WRITE
(
lu
,*)
'EXITING MPI'
53
WRITE
(
lu
,*)
' '
54
!
55
! AVOIDS EXITING BEFORE EVERYTHING IS DONE IN OTHER PROCESSORS
56
!
57
CALL
mpi_barrier(
comm
,ier)
58
!
59
! EXITS
60
!
61
# ifdef COMPAD
62
CALL
ampi_finalize(ier)
63
# else
64
CALL
mpi_finalize(ier)
65
# endif
66
IF
(ier.NE.0)
THEN
67
WRITE
(
lu
,*)
'P_EXIT: ERROR IN MPI_FINALIZE'
68
WRITE
(
lu
,*)
'MPI ERROR '
,ier
69
CALL
plante(1)
70
stop
71
ENDIF
72
#else
73
WRITE
(
lu
,*)
'CALL OF P_EXIT IN ITS VOID VERSION'
74
#endif
75
!
76
!-----------------------------------------------------------------------
77
!
78
RETURN
79
END
declarations_special
Definition:
declarations_special.F:3
p_exit
subroutine p_exit
Definition:
p_exit.F:4
declarations_parallel::comm
integer comm
Definition:
declarations_parallel.F:53
declarations_special::lu
integer lu
Definition:
declarations_special.F:45
declarations_parallel
Definition:
declarations_parallel.F:3