/[MITgcm]/MITgcm/eesupp/inc/EXCH.h
ViewVC logotype

Annotation of /MITgcm/eesupp/inc/EXCH.h

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


Revision 1.4 - (hide annotations) (download)
Fri Sep 21 03:54:35 2001 UTC (22 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint52l_pre, checkpoint44e_post, hrcube4, hrcube5, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint50c_post, checkpoint46f_post, checkpoint52d_pre, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint52j_pre, checkpoint43a-release1mods, checkpoint51o_pre, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, release1_p13, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, checkpoint52l_post, checkpoint52k_post, chkpt44d_post, checkpoint51, checkpoint50, checkpoint52, release1_p8, release1_p9, checkpoint50d_post, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint52f_post, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, release1_b1, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint48b_post, checkpoint43, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint51n_post, release1_chkpt44d_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint52e_pre, release1_p11, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint48f_post, checkpoint45d_post, checkpoint52b_pre, checkpoint46j_pre, checkpoint51l_pre, chkpt44a_post, checkpoint44h_pre, checkpoint48h_post, checkpoint51q_post, ecco_c50_e29, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, ecco_c50_e28, chkpt44c_pre, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52f_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47j_post, ecco_c50_e33a, branch-exfmods-tag, checkpoint44g_post, branchpoint-genmake2, checkpoint46e_pre, checkpoint51r_post, checkpoint48c_post, checkpoint45b_post, checkpoint46b_pre, checkpoint51i_post, release1-branch-end, release1_final_v1, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint44b_post, ecco_c51_e34, checkpoint46h_pre, checkpoint52d_post, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, checkpoint52a_pre, ecco_c44_e22, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, ecco_c44_e25, checkpoint51i_pre, checkpoint52h_pre, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, branch-netcdf, checkpoint50d_pre, checkpoint46e_post, release1_beta1, checkpoint51e_post, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51o_post, checkpoint51f_pre, chkpt44c_post, checkpoint48g_post, checkpoint47h_post, checkpoint52a_post, checkpoint44f_pre, checkpoint51g_post, ecco_c52_e35, checkpoint46d_post, checkpoint50b_post, release1-branch_branchpoint, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: c24_e25_ice, branch-exfmods-curt, release1_final, release1-branch, branch-genmake2, release1, branch-nonh, tg2-branch, ecco-branch, release1_50yr, netcdf-sm0, icebear, checkpoint51n_branch, release1_coupled
Changes since 1.3: +15 -8 lines
File MIME type: text/plain
Starting to bring comments up to date and format comments
for document extraction of "prototypes".

1 cnh 1.4 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/inc/EXCH.h,v 1.3 2001/02/04 14:38:41 cnh Exp $
2     C $Name: $
3 cnh 1.1 C
4 cnh 1.4 CBOP
5     C !ROUTINE: EXCH.h
6     C !INTERFACE:
7     C include "EXCH.h"
8     C
9     C !DESCRIPTION:
10     C *==========================================================*
11     C | EXCH.h
12     C *==========================================================*
13     C | Support data structures for the MITgcm UV "exchange
14     C | routines" code. This data should be private to the
15 cnh 1.1 C | execution environment routines.
16 cnh 1.4 C *==========================================================*
17     CEOP
18 cnh 1.1
19     #ifndef _RL
20     #define _RL Real*8
21     #endif
22    
23     #ifndef _RS
24     #define _RS Real*4
25     #endif
26    
27     #ifndef _tileCommModeW
28     #define _tileCommModeW(a,b) tileCommModeW(a,b)
29     #endif
30    
31     #ifndef _tileCommModeE
32     #define _tileCommModeE(a,b) tileCommModeE(a,b)
33     #endif
34    
35     #ifndef _tileBiE
36     #define _tileBiE(a,b) tileBiE(a,b)
37     #endif
38    
39     #ifndef _tileBiW
40     #define _tileBiW(a,b) tileBiW(a,b)
41     #endif
42    
43     #ifndef _tileBjE
44     #define _tileBjE(a,b) tileBjE(a,b)
45     #endif
46    
47     #ifndef _tileBjW
48     #define _tileBjW(a,b) tileBjW(a,b)
49     #endif
50    
51     #ifndef _mpiPidW
52     #define _mpiPidW(a,b) pidW(a,b)
53     #endif
54    
55     #ifndef _mpiIdE
56     #define _mpiIdE(a,b) pidE(a,b)
57     #endif
58    
59     #ifndef _tileTagSendW
60     #define _tileTagSendW(a,b) tileTagSendW(a,b)
61     #endif
62    
63     #ifndef _tileTagSendE
64     #define _tileTagSendE(a,b) tileTagSendE(a,b)
65     #endif
66    
67     #ifndef _tileTagRecvW
68     #define _tileTagRecvW(a,b) tileTagRecvW(a,b)
69     #endif
70    
71     #ifndef _tileTagRecvE
72     #define _tileTagRecvE(a,b) tileTagRecvE(a,b)
73     #endif
74    
75     #ifndef _tileCommModeS
76     #define _tileCommModeS(a,b) tileCommModeS(a,b)
77     #endif
78    
79     #ifndef _tileCommModeN
80     #define _tileCommModeN(a,b) tileCommModeN(a,b)
81     #endif
82    
83     #ifndef _tileBiN
84     #define _tileBiN(a,b) tileBiN(a,b)
85     #endif
86    
87     #ifndef _tileBiS
88     #define _tileBiS(a,b) tileBiS(a,b)
89     #endif
90    
91     #ifndef _tileBjN
92     #define _tileBjN(a,b) tileBjN(a,b)
93     #endif
94    
95     #ifndef _tileBjS
96     #define _tileBjS(a,b) tileBjS(a,b)
97     #endif
98    
99     #ifndef _mpiPidS
100     #define _mpiPidS(a,b) pidS(a,b)
101     #endif
102    
103     #ifndef _mpiIdN
104     #define _mpiIdN(a,b) pidN(a,b)
105     #endif
106    
107     #ifndef _tileTagSendS
108     #define _tileTagSendS(a,b) tileTagSendS(a,b)
109     #endif
110    
111     #ifndef _tileTagSendN
112     #define _tileTagSendN(a,b) tileTagSendN(a,b)
113     #endif
114    
115     #ifndef _tileTagRecvS
116     #define _tileTagRecvS(a,b) tileTagRecvS(a,b)
117     #endif
118    
119     #ifndef _tileTagRecvN
120     #define _tileTagRecvN(a,b) tileTagRecvN(a,b)
121     #endif
122    
123     #ifndef _theSimulationMode
124     #define _theSimulationMode theSimulationMode
125     #endif
126    
127     #ifndef _EXCH_SPIN_LIMIT
128     #define _EXCH_SPIN_LIMIT EXCH_SPIN_LIMIT
129     #endif
130    
131     C MAX_OLX_EXCH - Maximum overlap region allowed in X
132     C MAX_OLY_EXCH - Maximum overlap region allowed in Y
133     C MAX_NR_EXCH - Maximum number of vertical levels allowed
134     C NUMBER_OF_BUFFER_LEVELS - Number of levels of buffer allowed.
135     C EXCH_SPIN_LIMIT - Error trapping threshold for deadlocked exchange
136     INTEGER MAX_OLX_EXCH
137     PARAMETER ( MAX_OLX_EXCH = MAX_OLX )
138     INTEGER MAX_OLY_EXCH
139     PARAMETER ( MAX_OLY_EXCH = MAX_OLY )
140     INTEGER MAX_NR_EXCH
141     PARAMETER ( MAX_NR_EXCH = nR + 1 )
142     INTEGER NUMBER_OF_BUFFER_LEVELS
143 adcroft 1.2 PARAMETER ( NUMBER_OF_BUFFER_LEVELS = 1 )
144 cnh 1.1 INTEGER EXCH_SPIN_LIMIT
145     PARAMETER ( EXCH_SPIN_LIMIT = 100000000 )
146    
147     C
148     C L_BUFFER[XY] - Maximum size for exchange buffer in
149     C L_WBUFFER west,
150     C L_EBUFFER east,
151     C L_SBUFFER south,
152     C L_NBUFFER north.
153     INTEGER L_BUFFERX
154     PARAMETER ( L_BUFFERX =
155     & (sNy+2*MAX_OLY_EXCH)*MAX_OLX_EXCH*MAX_NR_EXCH )
156     INTEGER L_BUFFERY
157     PARAMETER ( L_BUFFERY =
158     & (sNx+2*MAX_OLX_EXCH)*MAX_OLY_EXCH*MAX_NR_EXCH )
159     INTEGER L_WBUFFER
160     INTEGER L_EBUFFER
161     INTEGER L_SBUFFER
162     INTEGER L_NBUFFER
163     PARAMETER ( L_WBUFFER = L_BUFFERX,
164     & L_EBUFFER = L_BUFFERX,
165     & L_SBUFFER = L_BUFFERY,
166     & L_NBUFFER = L_BUFFERY )
167    
168     C-- COMMON / EXCH_L / LOGICAL number common arrays for exchanges
169     C exchNeedsMemSync - TRUE if memory sync. required to ensure
170     C memory consistency during exchange
171     C exchUsesBarrier - TRUE if we use a call to BAR to do sync.
172     C between processes. On some machines we wont
173     C spin on the Ack setting ( the T90 ),
174     C instead we will use s system barrier.
175     C On the T90 the system barrier is very fast and
176     C switches out the thread while it waits. On most
177     C machines the system barrier is much too slow and if
178     C we own the machine and have one thread per process
179     C preemption is not a problem.
180     C exchCollectStatistics - Turns exchange statistics collecting on and off.
181    
182     COMMON / EXCH_L / exchNeedsMemSync, exchUsesBarrier,
183     & exchCollectStatistics
184     LOGICAL exchNeedsMemSync
185     LOGICAL exchUsesBarrier
186     LOGICAL exchCollectStatistics
187    
188     C-- COMMON / EXCH_R / REAL number common arrays for exchanges
189     C xxxxSendBuf - Buffer used for sending data to another tile.
190     C xxxxRecvBuf - Buffer used for receiving data from another tile.
191     COMMON / EXCH_R /
192     & westSendBuf_RL, eastSendBuf_RL,
193     & southSendBuf_RL, northSendBuf_RL,
194     & westRecvBuf_RL, eastRecvBuf_RL,
195     & southRecvBuf_RL, northRecvBuf_RL,
196     & westSendBuf_RS, eastSendBuf_RS,
197     & southSendBuf_RS, northSendBuf_RS,
198     & westRecvBuf_RS, eastRecvBuf_RS,
199     & southRecvBuf_RS, northRecvBuf_RS
200     _RL westSendBuf_RL( L_WBUFFER, NUMBER_OF_BUFFER_LEVELS,
201     & nSx, nSy )
202     _RL eastSendBuf_RL( L_EBUFFER, NUMBER_OF_BUFFER_LEVELS,
203     & nSx, nSy )
204     _RL southSendBuf_RL( L_SBUFFER, NUMBER_OF_BUFFER_LEVELS,
205     & nSx, nSy )
206     _RL northSendBuf_RL( L_NBUFFER, NUMBER_OF_BUFFER_LEVELS,
207     & nSx, nSy )
208     _RL westRecvBuf_RL( L_WBUFFER, NUMBER_OF_BUFFER_LEVELS,
209     & nSx, nSy )
210     _RL eastRecvBuf_RL( L_EBUFFER, NUMBER_OF_BUFFER_LEVELS,
211     & nSx, nSy )
212     _RL southRecvBuf_RL( L_SBUFFER, NUMBER_OF_BUFFER_LEVELS,
213     & nSx, nSy )
214     _RL northRecvBuf_RL( L_NBUFFER, NUMBER_OF_BUFFER_LEVELS,
215     & nSx, nSy )
216     _RS westSendBuf_RS( L_WBUFFER, NUMBER_OF_BUFFER_LEVELS,
217     & nSx, nSy )
218     _RS eastSendBuf_RS( L_EBUFFER, NUMBER_OF_BUFFER_LEVELS,
219     & nSx, nSy )
220     _RS southSendBuf_RS( L_SBUFFER, NUMBER_OF_BUFFER_LEVELS,
221     & nSx, nSy )
222     _RS northSendBuf_RS( L_NBUFFER, NUMBER_OF_BUFFER_LEVELS,
223     & nSx, nSy )
224     _RS westRecvBuf_RS( L_WBUFFER, NUMBER_OF_BUFFER_LEVELS,
225     & nSx, nSy )
226     _RS eastRecvBuf_RS( L_EBUFFER, NUMBER_OF_BUFFER_LEVELS,
227     & nSx, nSy )
228     _RS southRecvBuf_RS( L_SBUFFER, NUMBER_OF_BUFFER_LEVELS,
229     & nSx, nSy )
230     _RS northRecvBuf_RS( L_NBUFFER, NUMBER_OF_BUFFER_LEVELS,
231     & nSx, nSy )
232    
233     C-- COMMON / EXCH_I / INTEGER common arrays for exchanges
234     C xxxxSendAck - Flag indicating ready to send data.
235     C xxxxRecvAck - Falg indicating receive data is ready.
236     C exchBufferLevel - Current cyclic buffer level.
237     C exchNReqsX, exchNReqsY - Pending message counts
238     C exchReqIdX, exchReqIdY -Pending message identifiers
239     C *Spin* - Exchange statistics holder
240     C Count - No. spins for each thread
241     C Max - Maximum spins for an exchange
242     C Min - Minimum spins for an exchange
243     COMMON / EXCH_I /
244     & westSendAck, eastSendAck, southSendAck, northSendAck,
245     & westRecvAck, eastRecvAck, southRecvAck, northRecvAck,
246     & exchangeBufLevel,
247     & exchNReqsX, exchNReqsY, exchReqIdX, exchReqIdY,
248     & exchRecvXSpinCount, exchRecvXSpinMax, exchRecvXSpinMin,
249     & exchRecvXExchCount,
250     & exchRecvYSpinCount, exchRecvYSpinMax, exchRecvYSpinMin,
251     & exchRecvYExchCount
252     INTEGER westSendAck( NUMBER_OF_BUFFER_LEVELS,
253     & nSx, nSy )
254     INTEGER eastSendAck( NUMBER_OF_BUFFER_LEVELS,
255     & nSx, nSy )
256     INTEGER southSendAck( NUMBER_OF_BUFFER_LEVELS,
257     & nSx, nSy )
258     INTEGER northSendAck( NUMBER_OF_BUFFER_LEVELS,
259     & nSx, nSy )
260     INTEGER westRecvAck( NUMBER_OF_BUFFER_LEVELS,
261     & nSx, nSy )
262     INTEGER eastRecvAck( NUMBER_OF_BUFFER_LEVELS,
263     & nSx, nSy )
264     INTEGER southRecvAck( NUMBER_OF_BUFFER_LEVELS,
265     & nSx, nSy )
266     INTEGER northRecvAck( NUMBER_OF_BUFFER_LEVELS,
267     & nSx, nSy )
268     INTEGER exchangeBufLevel( cacheLineSize/4, nSx, nSy )
269     INTEGER exchNReqsX(cacheLineSize/4,nSx,nSy)
270     INTEGER exchNReqsY(cacheLineSize/4,nSx,nSy)
271     INTEGER exchReqIdX(2*nSx+2*nSy,cacheLineSize/4,nSx,nSy)
272     INTEGER exchReqIdY(2*nSx+2*nSy,cacheLineSize/4,nSx,nSy)
273     INTEGER exchRecvXSpinCount(cacheLineSize/4, nSx, nSy)
274     INTEGER exchRecvXExchCount(cacheLineSize/4, nSx, nSy)
275     INTEGER exchRecvXSpinMax (cacheLineSize/4, nSx, nSy)
276     INTEGER exchRecvXSpinMin (cacheLineSize/4, nSx, nSy)
277     INTEGER exchRecvYSpinCount(cacheLineSize/4, nSx, nSy)
278     INTEGER exchRecvYExchCount(cacheLineSize/4, nSx, nSy)
279     INTEGER exchRecvYSpinMax (cacheLineSize/4, nSx, nSy)
280     INTEGER exchRecvYSpinMin (cacheLineSize/4, nSx, nSy)
281    

  ViewVC Help
Powered by ViewVC 1.1.22