<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 10, 2015 at 6:34 AM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <br>
    <div>On 10/11/2015 8:25 PM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Nov 10, 2015 at 1:33 AM, TAY
            wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
              <br>
              I need a subroutine in Fortran to partition a subset of my
              grid in the 3 x,y,z directions for MPI. I thought of using
              DMDACreate3d and DMDAGetCorners to get the starting and
              width of the partitioned grid.<br>
              <br>
              Because I need to partition at every time step and the
              subset grid changes dimension and index at every time
              step, so I will also need to use DMDestroy after each time
              step<br>
              <br>
              Will that use alot of memory? Will the grid actually be
              created? So I wonder if this DMDACreate3d and DMDestroy
              calls will take a lot of time.</blockquote>
            <div><br>
            </div>
            <div>DMDA just does 1D partitioning in each dimension, so
              its not that sophisticated. Is that all you want?</div>
            <div><br>
            </div>
            <div>  Matt</div>
          </div>
        </div>
      </div>
    </blockquote>
    Hi,<br>
    <br>
    Ya, that's all I want. Btw, how does DMDACreate3d partition the
    grids in x,y,z? What is the algorithm behind it?<br>
    <br>
    Supposed I have 14 x 17 x 20 and 12 cores. How does DMDACreate3d
    partition it?<br></div></blockquote><div><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/b0bc92c60ab2e8c65b1792a9a4080bf92080e52f/src/dm/impls/da/da3.c?at=master&fileviewer=file-view-default#da3.c-231">https://bitbucket.org/petsc/petsc/src/b0bc92c60ab2e8c65b1792a9a4080bf92080e52f/src/dm/impls/da/da3.c?at=master&fileviewer=file-view-default#da3.c-231</a><br></div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    Thanks.<br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><font color="#888888"><br><span class=""><font color="#888888">
                  -- <br>
                  Thank you.<br>
                  <br>
                  Yours sincerely,<br>
                  <br>
                  TAY wee-beng<br>
                  <br>
                </font></span></font></span></blockquote><span class=""><font color="#888888">
          </font></span></div><span class=""><font color="#888888">
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div>What most experimenters take for
            granted before they begin their experiments is infinitely
            more interesting than any results to which their experiments
            lead.<br>
            -- Norbert Wiener</div>
        </font></span></div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>