<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 </div><div>following output when run on 4 processors.</div><div><br></div><div>Code:</div><div>ierr=DAGetCorners(appctx->da,&xs,&ys,&zs,&xm,&ym,&zm);CHKERRQ(ierr);</div><div> for (k=zs; k<zs+zm; k++) {</div><div> for (j=ys; j<ys+ym; j++) {</div><div> for (i=xs; i<xs+xm; i++) {</div><div> {</div><div> Vec_A[k][j][i] = (PetscReal)(k*my*mx+j*mx+i);</div><div> }}}</div><div><br></div><div>Output: </div><div>Vec_A (mx=16 X my=16 X mz=4):</div></div><div>0 <span class="Apple-tab-span" style="white-space:pre">        </span>1 <span class="Apple-tab-span" style="white-space:pre">
        </span>2 <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>