On Tue, Mar 18, 2014 at 8:04 PM, Mani Chandra <[email protected]> wrote:
> Hi, > > I see a 4x increase in the memory usage when I change from > DMDA_STENCIL_STAR to DMDA_STENCIL_BOX. Attached are the outputs of > -log_summary which shows a huge increase in the matrix memory usage. Is > this expected? > > Yup. In 2D your matrices balloon from 5 entries per row to 9. In 3D it's 7 to 27. The number of colors required to color the matrix will increase by a significant factor as well, explaining the situation in your log files by simple multiplication. > On a different note, suppose I am running a serial calculation with no > need to exchange data but I am using corner node information, do I need to > use DMDA_STENCIL_BOX? Would the jacobian when computed using colored finite > differences be correctly represented if I use corner information but still > use DMDA_STENCIL_STAR? > > If you're using diagonal corners in your function evaluation, then you need DMDA_STENCIL_BOX. Otherwise you're going to have columns of the Jacobian of the same color that aren't structurally orthogonal, and the finite difference Jacobian will be straightup wrong. - Peter > Thanks, > Mani > > >
