Hi Jed,<br><br>Thanks for the answers. However, I'm still abit confused. My question is below. Also, you mention in the later mail that "Many people have the perception that the goal of partitioning is to<br>
minimize the number of neighbor processes. This actually has little impact on communication costs and is usually detrimental to solver performance.“<br><br>But you mention abt latency, so shouldn't minimizing the number of neighbor processes reduce latency and improve performance?<br>
<br><div class="gmail_quote">On Thu, Dec 10, 2009 at 5:09 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, 10 Dec 2009 16:44:02 +0800, Wee-Beng Tay <<a href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I'm working on a 2D Cartesian grid and I'm going to decompose the grid for<br>
> MPI for my CFD Fortran code. The grid size is in the ratio of 110 x 70. I<br>
> wonder how I should decompose the grid - horizontally or vertically?<br>
<br>
</div>Both<br></blockquote><div><br>For both do u mean dividing 1 big grid into 4 55x35 grids?<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> I'll need to "package" the 70 values in a chunk for efficient sending.<br>
> However, if it's in 110x35, I can use mpi_isend directly since it's<br>
> contagious data.<br>
<br>
</div>This will make no performance difference and would make things very<br>
fragile. The cost of packing the ghosted values is trivial compared to<br>
the cost of sending them (which is mostly due to latency so it doesn't<br>
matter much how many values are sent).<br></blockquote><div><br>so whichever method I use (horizontal or vertical) doesn't matter? But splitting to 4 55x35 grids will be better?<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> So is there a better option since there seems to be a conflict? I read about<br>
> the use of DMMG. Will this problem be dealt with much better if I use DMMG<br>
> instead?<br>
<br>
</div>DMMG is for multigrid, start with a DA, as in<br>
<br>
DACreate2d(PETSC_COMM_WORLD,wrap,stencil_type,110,70,PETSC_DECIDE,PETSC_DECIDE,...)<br>
<br>
The user's manual has a good section on this.<br>
<font color="#888888"><br>
<br>
Jed<br>
</font></blockquote></div><br>