The TELEMAC-MASCARET system  trunk
p_mpi_address.F
Go to the documentation of this file.
1 ! ************************
2  SUBROUTINE p_mpi_address
3 ! ************************
4 !
5  &(location,address,ier)
6 !
7 !***********************************************************************
8 ! PARALLEL V6P2 21/08/2010
9 !***********************************************************************
10 !
11 !brief CALLS FUNCTION MPI_ADDRESS.
12 !
13 !history J.-M. HERVOUET (LNHE)
14 !+ 23/06/2008
15 !+ V5P9
16 !+
17 !
18 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
19 !+ 13/07/2010
20 !+ V6P0
21 !+ Translation of French comments within the FORTRAN sources into
22 !+ English comments
23 !
24 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
25 !+ 21/08/2010
26 !+ V6P0
27 !+ Creation of DOXYGEN tags for automated documentation and
28 !+ cross-referencing of the FORTRAN sources
29 !
30 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 !| ADDRESS |-->| LOCATION IN CALLER MEMORY
32 !| IER |<--| ERROR VALUE
33 !| LOCATION |<--| ADDRESS OF LOCATION
34 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 !
38  IMPLICIT NONE
39 !
40 !
41 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 !
43  INTEGER, INTENT(IN) :: LOCATION
44  INTEGER, INTENT(OUT) :: IER
45  INTEGER(KIND=MY_ADDRESS_KIND), INTENT(OUT) :: ADDRESS
46 !
47 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48 !
49 #if defined HAVE_MPI
50  CALL mpi_get_address(location,address,ier)
51 !
52  IF(ier.NE.0) THEN
53  WRITE(lu,*) 'P_MPI_ADDRESS:'
54  WRITE(lu,*) 'MPI ERROR ',ier
55  CALL plante(1)
56  stop
57  ENDIF
58 #else
59  ier=0
60  address=0
61  WRITE(lu,*) 'CALL OF P_MPI_ADDRESS VOID VERSION'
62 #endif
63 !
64 !----------------------------------------------------------------------
65 !
66  RETURN
67  END
subroutine p_mpi_address(LOCATION, ADDRESS, IER)
Definition: p_mpi_address.F:7