3 |
|
|
4 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_EEOPTIONS.h" |
5 |
|
|
6 |
CStartOfInterface |
CBOP |
7 |
|
|
8 |
|
C !ROUTINE: INI_COMMUNICATION_PATTERNS |
9 |
|
|
10 |
|
C !INTERFACE: |
11 |
SUBROUTINE INI_COMMUNICATION_PATTERNS( myThid ) |
SUBROUTINE INI_COMMUNICATION_PATTERNS( myThid ) |
|
C /==========================================================\ |
|
|
C | SUBROUTINE INI_COMMUNICATION_PATTERNS | |
|
|
C | o Initialise between tile communication data structures. | |
|
|
C |==========================================================| |
|
|
C | This routine assigns identifiers to each tile and then | |
|
|
C | defines a map of neighbors for each tile. | |
|
|
C | For each neighbor a communication method is defined. | |
|
|
C \==========================================================/ |
|
12 |
IMPLICIT NONE |
IMPLICIT NONE |
13 |
|
C !DESCRIPTION: |
14 |
|
C *==========================================================* |
15 |
|
C | SUBROUTINE INI_COMMUNICATION_PATTERNS |
16 |
|
C | o Initialise between tile communication data structures. |
17 |
|
C *==========================================================* |
18 |
|
C | This routine assigns identifiers to each tile and then |
19 |
|
C | defines a map of neighbors for each tile. |
20 |
|
C | For each neighbor a communication method is defined. |
21 |
|
C *==========================================================* |
22 |
|
|
23 |
|
C !USES: |
24 |
C === Global data === |
C === Global data === |
25 |
#include "SIZE.h" |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
#include "EESUPPORT.h" |
#include "EESUPPORT.h" |
28 |
#include "EXCH.h" |
#include "EXCH.h" |
|
CEndOfInterface |
|
29 |
|
|
30 |
|
C !INPUT/OUTPUT PARAMETERS: |
31 |
C === Routine arguments === |
C === Routine arguments === |
32 |
C myThid - Thread number we are dealing with in this call |
C myThid :: Thread number we are dealing with in this call |
33 |
INTEGER myThid |
INTEGER myThid |
34 |
|
|
35 |
|
C !LOCAL VARIABLES: |
36 |
C === Local variables === |
C === Local variables === |
37 |
C pxW - Process X coord of process to west. |
C pxW :: Process X coord of process to west. |
38 |
C pxE - Process X coord of process to west. |
C pxE :: Process X coord of process to west. |
39 |
C pyN - Process Y coord of process to north. |
C pyN :: Process Y coord of process to north. |
40 |
C pyS - Process Y coord of process to south. |
C pyS :: Process Y coord of process to south. |
41 |
C procW - Process Id of process to west. |
C procW :: Process Id of process to west. |
42 |
C procE - Process Id of process to east. |
C procE :: Process Id of process to east. |
43 |
C procN - Process Id of process to north. |
C procN :: Process Id of process to north. |
44 |
C procS - Process Id of process to south. |
C procS :: Process Id of process to south. |
45 |
C totalTileCount - Total number of tiles |
C totalTileCount :: Total number of tiles |
46 |
C tagW0, tagE0, tagS0, tagN0, theTag - Working variables for |
C tagW0, tagE0, tagS0, tagN0, theTag :: Working variables for |
47 |
C calculating message tags. |
C calculating message tags. |
48 |
C biW, biE, bjN, bjS - Tile x and y indices to west, east, |
C biW, biE, bjN, bjS :: Tile x and y indices to west, east, |
49 |
C south and north. |
C south and north. |
50 |
C bi, bj - Tile loop counter |
C bi, bj :: Tile loop counter |
51 |
C pi, pj - Process loop counter |
C pi, pj :: Process loop counter |
52 |
|
C bi0, bj0 :: Base global index coordinate ( on CS there is no global |
53 |
|
C coord). |
54 |
INTEGER bi0(nPx) |
INTEGER bi0(nPx) |
55 |
INTEGER bj0(nPy) |
INTEGER bj0(nPy) |
56 |
INTEGER bi, bj, pi, pj |
INTEGER bi, bj, pi, pj |
60 |
INTEGER tagW0, tagE0, tagS0, tagN0, theTag |
INTEGER tagW0, tagE0, tagS0, tagN0, theTag |
61 |
INTEGER biE, biW, bjN, bjS |
INTEGER biE, biW, bjN, bjS |
62 |
INTEGER thePx, thePy, theBj, theBi |
INTEGER thePx, thePy, theBj, theBi |
63 |
|
CEOP |
64 |
|
|
65 |
#ifndef ALWAYS_USE_MPI |
#ifndef ALWAYS_USE_MPI |
66 |
C-- Turn off memsync by default (e.g. needed for threads on SUNs) |
C-- Turn off memsync by default (e.g. needed for threads on SUNs) |