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

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

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


Revision 1.4 - (show annotations) (download)
Thu Nov 13 14:40:14 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint52l_post, checkpoint52k_post, checkpoint52f_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint52e_pre, checkpoint52e_post, checkpoint52b_pre, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint52d_post, checkpoint52i_post, checkpoint52h_pre, checkpoint52j_post, branch-netcdf, checkpoint52a_post
Branch point for: netcdf-sm0
Changes since 1.3: +3 -1 lines
o added missing header CPP_EEOPTIONS.h
o added TARGET_NEC_VECTOR
  (hurrikan.dkrz.de)

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

  ViewVC Help
Powered by ViewVC 1.1.22