The TELEMAC-MASCARET system  trunk
p_sync.F
Go to the documentation of this file.
1 ! *****************
2  SUBROUTINE p_sync
3 ! *****************
4 !
5 !
6 !***********************************************************************
7 ! PARALLEL V6P1 21/08/2010
8 !***********************************************************************
9 !
10 !brief SYNCHRONISES ALL THE PROCESSORS.
11 !
12 !warning THIS ROUTINE MUST BE CALLED BY ALL THE NODES/PROCESSORS,
13 !+ OTHERWISE THE PROGRAM WILL "HANG"
14 !
15 !history REINHARD HINKELMANN (HANOVER)
16 !+ 08/06/1996
17 !+
18 !+ MODIFIED
19 !
20 !history J-M HERVOUET (LNH)
21 !+ 17/12/1996
22 !+
23 !+ MODIFIED
24 !
25 !history RAINER JOHANNI (SGI MUNICH)
26 !+ **/10/1999
27 !+
28 !+ ADAPTED FOR MPI
29 !
30 !history J.A. JANKOWSKI (BAW KARLSRUHE)
31 !+ 28/12/1999
32 !+
33 !+ RELEASE 5.0 MODIFIED
34 !
35 !history HANS HERRMANN (HANOVER)
36 !+ 23/06/2008
37 !+ V5P9
38 !+
39 !
40 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
41 !+ 13/07/2010
42 !+ V6P0
43 !+ Translation of French comments within the FORTRAN sources into
44 !+ English comments
45 !
46 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
47 !+ 21/08/2010
48 !+ V6P0
49 !+ Creation of DOXYGEN tags for automated documentation and
50 !+ cross-referencing of the FORTRAN sources
51 !
52 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54 !
57  IMPLICIT NONE
58 !
59  INTEGER IER
60 !
61 !-----------------------------------------------------------------------
62 !
63  ier = 0
64 #if defined HAVE_MPI
65  CALL mpi_barrier(comm,ier)
66 !
67  IF(ier.NE.0) THEN
68  WRITE(lu,*) 'P_SYNC: ERROR IN MPI_BARRIER'
69  WRITE(lu,*) 'MPI ERROR ',ier
70  CALL plante(1)
71  stop
72  ENDIF
73  RETURN
74 #else
75  WRITE(lu,*) 'CALL OF P_SYNC IN ITS VOID VERSION'
76  stop
77 #endif
78 !
79 !-----------------------------------------------------------------------
80 !
81  END
subroutine p_sync
Definition: p_sync.F:4