The PETSc DA object decomposes the domain differently than the MPI_Cart_create() command. How can one use them together?
The MPI_Cart_create() first divides the mesh along the z direction, then the y, then the x. DA divides along the x, then y, then z. Thus, for example, rank 1 of the processes will be in a different part of the mesh for the two schemes. To resolve this you can create a new MPI communicator that you pass to DACreate() that renumbers the process ranks so that each physical process shares the same part of the mesh with both the DA and the MPI_Cart_create(). The code to determine the new numbering was provided by Rolf Kuiper.
The MPI_Cart_create() first divides the mesh along the z direction, then the y, then the x. DMDA divides along the x, then y, then z. Thus, for example, rank 1 of the processes will be in a different part of the mesh for the two schemes. To resolve this you can create a new MPI communicator that you pass to DMDACreate() that renumbers the process ranks so that each physical process shares the same part of the mesh with both the DMDA and the MPI_Cart_create(). The code to determine the new numbering was provided by Rolf Kuiper.
Related Questions
- Top of page What should I do if the Import 2D Object command displays an error message when attempting to bring artwork created using other software packages into Crystal 3D IMPACT! Pro?
- What should I do if the Import 2D Object command displays an error message when attempting to bring artwork created using other software packages into Crystal 3D IMPACT! Pro?
- The PETSc DA object decomposes the domain differently than the MPI_Cart_create() command. How can one use them together?