RPN_COMM

(RPN_COMM_adj_halox)


        SUBROUTINE RPN_COMM_adj_halox(g,minx,maxx,miny,maxy,
     %             ni,nj,nk,halox,haloy,periodx,periody,
     %             glob,gminx,gmaxx,gminy,gmaxy,gni,npol_row)

ARGUMENTS

g Array containing the local tile real or integer O
minx,maxx, miny, maxy Total dimensions of array g (nk for z axis) integer I
ni,nj,nk Dimensions of local array integer I
halox,haloy Halo width for x and y integer I
periodx,periody Periodicity for x and y logical I
glob Array containing a row of the global grid real or integer I
gminx, gmaxx, gminy, gmaxy Dimensions of array glob (nk for z axis) integer I
gni Global array size(=problem size) along x integer I
npol_row Number of polar rows of processes (semi-lag case) integer I
We need   gminx <= 1-halox <= gni+ halox <= gmaxx

Case 9 processes 3X3, npol_row=1 (Consider the additions as matricial operations)

glob is the entry array; g is the output (with adjoint exchange)

   +------+  +--+
P8 |IIIIII|  |OO|  (OO=II+HH+GG)
   +------+  +--+
   +------+  +--+
P7 |HHHHHH|  |NN|  (NN=II+HH+GG)
   +------+  +--+
   +------+  +--+
P6 |GGGGGG|  |MM|  (MM=II+HH+GG)
   +------+  +--+
   +------+  +--+                Global problem
P5 |FF    |  |FF|             input       output
   +------+  +--+             +--------+  +--------+
   +------+  +--+             |GG HH II|  |MM NN OO|
P4 |EE    |  |EE|             |        |  |        |
   +------+  +--+             |DD EE FF|  |DD EE FF|
   +------+  +--+             |        |  |        |
P3 |DD    |  |DD|             |AA BB CC|  |JJ KK LL|
   +------+  +--+             +--------+  +--------+
   +------+  +--+
P2 |CCCCCC|  |LL|  (LL=AA+BB+CC)
   +------+  +--+
   +------+  +--+
P1 |BBBBBB|  |KK|  (KK=AA+BB+CC)
   +------+  +--+
   +------+  +--+
P0 |AAAAAA|  |JJ|  (JJ=AA+BB+CC)
   +------+  +--+


DESCRIPTION

Prepare and send array "glob" to RPN_COMM_adj_halo and return array "g", containing
- The local tile after exchange if not in polar_row range
- The sum of corresponding elements of each tile if in polar_row range (pe_mex < npol_row or pe_mex >= pe_nx-npol_row)

EXAMPLE

call rpn_comm_xch_halo(tableau,minx,maxx,miny,maxy,ni,nj,nk,1,1,periodx, periody,gni,npol_row) 

SEE ALSO

RPN_COMM_xch_halo
RPN_COMM_* 

Return to RPN Libraries home page