RPN_COMM

(RPN_COMM_xch_halox)



        SUBROUTINE RPN_COMM_xch_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 I/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 O
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 will note that halox and haloy are related to the global grid.
We need gminx <= 1-halox <= gni+ halox <= gmax


Case 9 PEs 3X3, npol_row=1 (see all additions as matrix computation)

g as input    glob as output (with halo exchange )

   +--+  +------+
P8 |II|  |GGHHII|  
   +--+  +------+
   +--+  +------+
P7 |HH|  |GGHHII|
   +--+  +------+
   +--+  +------+
P6 |GG|  |GGHHII|
   +--+  +------+
   +--+  +------+
P5 |FF|  |FF    |
   +--+  +------+
   +--+  +------+
P4 |EE|  |EE    |
   +--+  +------+
   +--+  +------+
P3 |DD|  |DD    |
   +--+  +------+
   +--+  +------+
P2 |CC|  |AABBCC|  
   +--+  +------+
   +--+  +------+
P1 |BB|  |AABBCC|
   +--+  +------+
   +--+  +------+
P0 |AA|  |AABBCC|
   +--+  +------+


DESCRIPTION

This subroutine prepares and sends the array g to the RPN_COMM_xch_halo, and returns glob, an array containing:
- The array g after halo exchange if the PE is not involved in a semi-lagrangian exchange
- And array containing all the information of a row of PEs (see the documenation of RPN_COMM_xch_halo) if the PE is involved in a semi-lagrangian exchange (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