/[MITgcm]/MITgcm_contrib/exch3/ex3_set_glbe_inds.F
ViewVC logotype

Contents of /MITgcm_contrib/exch3/ex3_set_glbe_inds.F

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


Revision 1.1 - (show annotations) (download)
Thu Apr 6 20:36:26 2006 UTC (18 years, 1 month ago) by edhill
Branch: MAIN
CVS Tags: HEAD
move out of the model and into MITgcm_contrib

1 C $Header: /u/gcmpack/MITgcm/pkg/ex3/ex3_set_glbe_inds.F,v 1.1 2006/02/06 21:09:54 edhill Exp $
2 C $Name: $
3
4 #include "EX3_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP
8 C !ROUTINE: EX3_SET_GLBE_INDS
9
10 C !INTERFACE:
11 SUBROUTINE EX3_SET_GLBE_INDS
12
13 C !DESCRIPTION:
14 C Determine the global/local buffer indicies for send/recv
15 C operations at each edge
16
17 C !USES:
18 IMPLICIT NONE
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "EESUPPORT.h"
22 #include "EX3_SIZE.h"
23 #include "EX3_PARAMS.h"
24 #include "EX3_TOPOLOGY.h"
25 CEOP
26
27 C !LOCAL VARIABLES:
28 INTEGER ke, kt, ii, itile
29
30 C The idea here is that RECV operations should *ALWAYS* happen
31 C within the first buffer of the receiving tile and send operations
32 C will happen in either:
33 C
34 C . MPI :: the second index of the sending tile
35 C . LOCAL :: the first index of the receiving tile
36 C
37 C So, whenever possible, local operations will bypass MPI.
38
39 C First set all tiles to non-local status
40 DO kt = 1,EX3_MAX_TILES
41 DO ke = 1,EX3_MAX_E_NBS
42 ex3_e_iopt_il(ke,kt) = -1
43 ENDDO
44 ENDDO
45
46 C EX3_B_RL ( EX3_MAX_BL, 2*EX3_MAX_E_NBS, nSx*nSy )
47
48 C Then, for only the local tiles, set the flag to the local buffer
49 C index to use for for send operations
50 DO ii = 1,ex3_p_ntile
51 itile = ex3_p_itile(ii)
52 DO ke = 1,EX3_MAX_E_NBS
53 ex3_e_iopt_il(ke,itile) =
54 & (ii-1)*2*EX3_MAX_E_NBS + 2*(ke-1) + 1
55 ENDDO
56 ENDDO
57
58 RETURN
59 END
60
61 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22