/[MITgcm]/MITgcm/eesupp/src/exch_cycle_ebl.F
ViewVC logotype

Annotation of /MITgcm/eesupp/src/exch_cycle_ebl.F

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


Revision 1.1 - (hide annotations) (download)
Tue Sep 29 18:53:44 1998 UTC (25 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint15, checkpoint17, checkpoint19, checkpoint18, checkpoint28, checkpoint29, checkpoint20, checkpoint21, checkpoint22, checkpoint23, checkpoint24, checkpoint25, checkpoint27, branch-atmos-merge-freeze, branch-atmos-merge-start, checkpoint26, checkpoint16, branch-atmos-merge-shapiro, checkpoint33, checkpoint32, checkpoint31, checkpoint30, checkpoint34, branch-atmos-merge-zonalfilt, branch-atmos-merge-phase5, branch-atmos-merge-phase4, branch-atmos-merge-phase7, branch-atmos-merge-phase6, branch-atmos-merge-phase1, branch-atmos-merge-phase3, branch-atmos-merge-phase2
Branch point for: branch-atmos-merge
CHanges to exchange routines for general tile <-> tile connectivity, DMA and shared
memory communication hooks, variable width overlaps and TAMC reverse mode flag.

1 cnh 1.1 C $Header: $
2    
3     SUBROUTINE EXCH_CYCLE_EBL( myThid )
4     C /==========================================================\
5     C | SUBROUTINE EXCH_CYCLE_EBL |
6     C | o Cycle exchange buffer level. |
7     C |==========================================================|
8     C | Step the "exchange buffer level" to next value. |
9     C | The buffer level is used to prevent consecutive messages |
10     C | overwriting one another. Because we know that every tile |
11     C | will participate in an exchange we can be sure that every|
12     C | tile will cycle through the buffers with the same |
13     C | sequence. Also we know that a tile cannot start a new |
14     C | exchange before it has completed its end of the previous |
15     C | exchange. Thus by cycling through three buffer levels we |
16     C | can be sure that the buffer we write to will be free. |
17     C | That is by the time we are participating in the third |
18     C | exchange transaction we know that both ends of the first |
19     C | transaction must have completed. |
20     C | Note -- |
21     C | 1. We allow more than three levels below although this |
22     C | is not necessary. |
23     C \==========================================================/
24     IMPLICIT NONE
25     C == Global data ==
26     #include "SIZE.h"
27     #include "EEPARAMS.h"
28     #include "EESUPPORT.h"
29     #include "EXCH.h"
30    
31     C == Routine arguments ==
32     C myThid - Thread number of this instance of the routine
33     INTEGER myThid
34    
35     C == Local variables ==
36     C bi, bj - Loop counters
37     INTEGER bi, bj
38    
39     DO bj=myByLo(myThid),myByHi(myThid)
40     DO bi=myBxLo(myThid),myBxHi(myThid)
41     C-- Use next level exchange buffer in cycle.
42     exchangeBufLevel(1,bi,bj) = exchangeBufLevel(1,bi,bj)+1
43     IF ( exchangeBufLevel(1,bi,bj) .GT. NUMBER_OF_BUFFER_LEVELS )
44     & exchangeBufLevel(1,bi,bj) = 1
45     ENDDO
46     ENDDO
47    
48     RETURN
49     END

  ViewVC Help
Powered by ViewVC 1.1.22