<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div><div><div>Sorry for the spam. Just to illustrate the problem. The following code produces the&nbsp;</div><div>following output when run on 4 processors.</div><div><br></div><div>Code:</div><div>ierr=DAGetCorners(appctx-&gt;da,&amp;xs,&amp;ys,&amp;zs,&amp;xm,&amp;ym,&amp;zm);CHKERRQ(ierr);</div><div>&nbsp;for (k=zs; k&lt;zs+zm; k++) {</div><div>&nbsp;&nbsp;for (j=ys; j&lt;ys+ym; j++) {</div><div>&nbsp;&nbsp;for (i=xs; i&lt;xs+xm; i++) {</div><div>&nbsp;&nbsp; &nbsp;{</div><div>&nbsp;&nbsp; &nbsp;Vec_A[k][j][i] = (PetscReal)(k*my*mx+j*mx+i);</div><div>&nbsp;&nbsp; &nbsp;}}}</div><div><br></div><div>Output:&nbsp;</div><div>Vec_A (mx=16 X my=16 X mz=4):</div></div><div>0&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>1&nbsp;<span class="Apple-tab-span" style="white-space:pre">
        </span>2&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>3<span class="Apple-tab-span" style="white-space:pre">        </span>4<span class="Apple-tab-span" style="white-space:pre">        </span>5<span class="Apple-tab-span" style="white-space:pre">        </span>6<span class="Apple-tab-span" style="white-space:pre">        </span>7</div><div>16<span class="Apple-tab-span" style="white-space:pre">        </span>17<span class="Apple-tab-span" style="white-space:pre">        </span>18<span class="Apple-tab-span" style="white-space:pre">        </span>19<span class="Apple-tab-span" style="white-space:pre">        </span>20<span class="Apple-tab-span" style="white-space:pre">        </span>21<span class="Apple-tab-span" style="white-space:pre">        </span>22<span class="Apple-tab-span" style="white-space:pre">        </span>23</div><div>32<span class="Apple-tab-span" style="white-space:pre">        </span>33<span class="Apple-tab-span" style="white-space:pre">        </span>34<span class="Apple-tab-span"
 style="white-space:pre">        </span>35<span class="Apple-tab-span" style="white-space:pre">        </span>36<span class="Apple-tab-span" style="white-space:pre">        </span>37<span class="Apple-tab-span" style="white-space:pre">        </span>38<span class="Apple-tab-span" style="white-space:pre">        </span>39</div><div>48<span class="Apple-tab-span" style="white-space:pre">        </span>49<span class="Apple-tab-span" style="white-space:pre">        </span>and so on</div><div><br></div><div>I don't understand why does the array value jump to 16 after 7. Meaning</div><div>why is the 8th element of the vector is 16. Thanks.</div></div><div style="position:fixed"></div>


</div><br>







      </body></html>