On Sat, Aug 27, 2011 at 16:09, Likun Tan <likunt at andrew.cmu.edu> wrote:
> the size of temp and H is 9*9*201, the size of S is 9*9. > > I used 2 processors, the returned values are > temp: 0 0 0 9 9 101 > temp: 0 0 101 9 9 100 > temp is partitioned in the z direction. Each processor holds the full 9x9 cross-section of the "rod". > H: 0 0 101 9 9 100 > S: 0 5 101 9 4 100 > The 9x9 cross-section is partitioned. The value of zs and p are just left over from the earlier call, so they don't mean anything here. > > I am not sure what you mean by how DAs were constructed, the command i > used for construction is: > DACreate2d(PETSC_COMM_WORLD, DA_NONPERIODIC, DA_STENCIL_STAR, 9, 9, > PETSC_DECIDE, PETSC_DECIDE, 1, 0, PETSC_NULL, PETSC_NULL, &da2D); > DACreate3d(PETSC_COMM_WORLD, DA_NONPERIODIC, DA_STENCIL_STAR, 9, 9, 201, > PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, 1, 0, PETSC_NULL, PETSC_NULL, > PETSC_NULL, &da3D); > You can prevent PETSc from partitioning in the z-direction by changing the "p" parameter from PETSC_DECIDE to 1: DACreate3d(PETSC_COMM_WORLD, DA_NONPERIODIC, DA_STENCIL_STAR, 9, 9, 201, PETSC_DECIDE, PETSC_DECIDE, 1, 1, 0, PETSC_NULL, PETSC_NULL, PETSC_NULL, &da3D); -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110827/9d7c827a/attachment.htm>
