RPN_COMM

(RPN_COMM_transpose48)



subroutine RPN_COMM_transpose48(za,min1,max1,n1g,n2,min3,max3,n3g,zb,type,a_8,b_8)

ARGUMENTS

za input array of size (min1:max1,n2,n3g)Integer or Real*4I
n1g total number of points along the first dimension of zaIntegerI
min3:max3, n2,n1g size of output array zbIntegerI
type integer flag for the type of tranposition neededIntegerI
a_8 integer flag for the type of tranposition neededReal*8I
b_8 integer flag for the type of tranposition neededReal*8I
zb output array of size (size, n2, min3:max3, n1g)Integer*8 or Real*8O

DESCRIPTION


This routine change the mapping of the global domain on the local tiles. This operation can be performed in both way, backward and forward, and it is determined by the sign of "type" variable. It can also be done along x or y axis, following the absolute value of "type": 1 for x ,2 for y. If type=1 then we go from ( x/nx,y/ny, z) -> (local y/ny,z/nx,x). For -1, we go from (x/nx,y/ny,z) -> (z/ny,x/nx,y) where nx is the number of processes along x axis of the processes grid, ny the same along the y axis. The particularity of this routine if we compare it to RPN_COMM_transpose is that it converts a real*4 array to an real*8 array for all forward transpose and vice-versa for backward transpose. Furthermore, it scales the field using x = a_8 x + b_8


EXAMPLE

Given 6 processors (3x2 grid) and a domain of 23 per 12 per 9 points calculation grid (8+8+7 points along x, 6+6 along y and 9 along z),

+-+-+-+
|3|4|5|
+-+-+-+
|0|1|2|
+-+-+-+

we want to redistribute the grid, divinding z and x instead of x and y. We use the forward transpose ("type" >0) and we specify the needed arguments:

The input array, size (1:8,6,9) on all PE's (min1=1, max1=8, n2=6, n3g=9).
The output array, of size (6,1:5,23) on all PE's(min3=1, max3=5, n2=6, n1g=23).

We strongly recommend to obtain the values min3 and max3 with RPN_COMM_topo in order to get a trouble-free transpose. In this particular case, the call would be something like err = RPN_COMM_topo(5, min3, max3, nx3l, nxl3max, halo3x, n0_3x, .true. , .true.).

The "size" is 1 for real and integer, 2 for real*8 and so on.

When the call returns, the ouput array will contain its appropriate part of the domain. The new grid will be of size 6 per 5+4 per 23.
 


SEE ALSO

RPN_COMM_* 

Return to RPN Libraries home page