Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

The PETSc DA object decomposes the domain differently than the MPI_Cart_create() command. How can one use them together?

0
Posted

The PETSc DA object decomposes the domain differently than the MPI_Cart_create() command. How can one use them together?

0

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.

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123