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