/[MITgcm]/MITgcm/pkg/exch2/exch2_recv_rx1.template
ViewVC logotype

Contents of /MITgcm/pkg/exch2/exch2_recv_rx1.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (show annotations) (download)
Fri Apr 23 20:21:07 2010 UTC (14 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint63, checkpoint62g, checkpoint62f, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.10: +3 -3 lines
fix propagating typo (& others) in variable description

1 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch2_recv_rx1.template,v 1.10 2009/05/30 21:18:59 jmc Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5 #include "W2_OPTIONS.h"
6
7 CBOP 0
8 C !ROUTINE: EXCH2_RECV_RX1
9
10 C !INTERFACE:
11 SUBROUTINE EXCH2_RECV_RX1(
12 I thisTile, nN,
13 I e2BufrRecSize,
14 I iBufr,
15 O e2Bufr1_RX,
16 I commSetting, myThid )
17
18 C !DESCRIPTION:
19 C Scalar field (1 component) Exchange:
20 C Receive into buffer exchanged data from the source Process.
21 C buffer data will be used to fill in the tile-edge overlap region.
22
23 C !USES:
24 IMPLICIT NONE
25
26 #include "SIZE.h"
27 #include "EEPARAMS.h"
28 #include "EESUPPORT.h"
29 #include "W2_EXCH2_SIZE.h"
30 #include "W2_EXCH2_TOPOLOGY.h"
31
32 C !INPUT/OUTPUT PARAMETERS:
33 C === Routine arguments ===
34 C thisTile :: receiving tile Id. number
35 C nN :: Neighbour entry that we are processing
36 C e2BufrRecSize :: Number of elements in each entry of e2Bufr1_RX
37 C iBufr :: number of buffer elements to transfer
38 C e2Bufr1_RX :: Data transport buffer array. This array is used in one of
39 C :: two ways. For PUT communication the entry in the buffer
40 C :: associated with the source for this receive (determined
41 C :: from the opposing_send index) is read.
42 C :: For MSG communication the entry in the buffer associated
43 C :: with this neighbor of this tile is used as a receive
44 C :: location for loading a linear stream of bytes.
45 C commSetting :: Mode of communication used to exchange with this neighbor
46 C myThid :: my Thread Id. number
47
48 INTEGER thisTile, nN
49 INTEGER e2BufrRecSize
50 INTEGER iBufr
51 _RX e2Bufr1_RX( e2BufrRecSize )
52 CHARACTER commSetting
53 INTEGER myThid
54 CEOP
55
56 #ifdef ALLOW_USE_MPI
57 C !LOCAL VARIABLES:
58 C == Local variables ==
59 C soT :: Source tile Id. number
60 C oNb :: Opposing send record number
61 INTEGER soT
62 INTEGER oNb
63
64 C MPI setup
65 INTEGER theTag, theType
66 INTEGER sProc, tProc
67 INTEGER mpiStatus(MPI_STATUS_SIZE), mpiRc
68 #ifdef W2_E2_DEBUG_ON
69 CHARACTER*(MAX_LEN_MBUF) msgBuf
70 #endif
71
72 soT = exch2_neighbourId(nN, thisTile )
73 oNb = exch2_opposingSend(nN, thisTile )
74
75 C Handle receive end data transport according to communication mechanism
76 C between source and target tile
77 IF ( commSetting .EQ. 'M' ) THEN
78 C Setup MPI stuff here
79 theTag = (soT-1)*W2_maxNeighbours + oNb
80 tProc = exch2_tProc(thisTile)-1
81 sProc = exch2_tProc(soT)-1
82 theType = _MPI_TYPE_RX
83 CALL MPI_Recv( e2Bufr1_RX, iBufr, theType, sProc,
84 & theTag, MPI_COMM_MODEL, mpiStatus, mpiRc )
85 #ifdef W2_E2_DEBUG_ON
86 WRITE(msgBuf,'(A,I4,A,I4,A)')
87 & ' RECV FROM TILE=', soT, ' (proc = ',sProc,')'
88 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
89 I SQUEEZE_RIGHT, myThid )
90 WRITE(msgBuf,'(A,I4,A,I4,A)')
91 & ' INTO TILE=', thisTile, ' (proc = ',tProc,')'
92 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
93 I SQUEEZE_RIGHT, myThid )
94 WRITE(msgBuf,'(A,I10)') ' TAG=', theTag
95 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
96 I SQUEEZE_RIGHT, myThid )
97 WRITE(msgBuf,'(A,I4)') ' NEL=', iBufr
98 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
99 I SQUEEZE_RIGHT, myThid )
100 #endif /* W2_E2_DEBUG_ON */
101 ENDIF
102 #endif /* ALLOW_USE_MPI */
103
104 RETURN
105 END
106
107 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
108
109 CEH3 ;;; Local Variables: ***
110 CEH3 ;;; mode:fortran ***
111 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22