Okay, i c, thanks. So if i want to sum over the z direction, it is better not to partition in z direction, i just tried and it works.
Another question is, if the size is small in x and y directions, and large in z direction, i want more of processors, but the number is restricted to the size in x and y direction, since partition is not allowed in z direction, any way to improve efficiency? On Sat, August 27, 2011 5:54 pm, Jed Brown wrote: > On Sat, Aug 27, 2011 at 16:49, Likun Tan <likunt at andrew.cmu.edu> wrote: > > >> I am sorry i still don't get what my problem is, i though when setting >> values to 2D, x, y, m and n will be reset, so the previous usage of the >> corner indices and width won't influence the later use. >> > > The whole array is not duplicated onto every process, just the owned part > and perhaps ghosts. You have to make sure that the decompositions are > compatible and that you only index into the part of the array that your > process has access to. This is really unlikely to happen "by accident", > so you have to decide how you want the total volume decomposed and which > parts you want local. Part of this (typically, if you are going to > integrate) is to not decompose at all in the z direction. Once you ensure > that everything is compatible, you can have one accessor that gives you > the array bounds for the 3D part and use the 2D part in a compatible way. >
