<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 13px;">
<div style="">&nbsp;Hi, Petsc Team,<br>
<br>
I use DA object to create structured data array based on global vectors. Recently, I checked my code and found an array with index out of range. But the code can run without any warning or segmentation violation message. At first I thought this might be a cache
 problem. But later I ran a simpler test code on another machine and it gave no error either. I did not use any periodic boundary setting.<br>
<br>
This never took place in the past from my experience, as Petsc could always detect any segmentation violation. So what's wrong with it this time? The following is the main part of my sequential test code:<br>
<br>
&nbsp; DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_BOX,m,n,q,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,&amp;da);&nbsp;
<br>
&nbsp; DACreateGlobalVector(da, &amp;elev); <br>
&nbsp; VecSet(elev, 3.14159265);&nbsp; <br>
&nbsp; DAVecGetArray(da, elev, &amp;ele);<br>
&nbsp; PetscPrintf(PETSC_COMM_WORLD, &quot;ele[3][3][%D] is %4.3e\n&quot;, m&#43;120, ele[3][3][m&#43;120]);
<br>
&nbsp; DAVecRestoreArray(da, elev, &amp;ele);<br>
&nbsp; VecDestroy(elev);&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp; DADestroy(daw);<br>
<br>
<br>
Thank you very much.<br>
<br>
<br>
Zhisong Li<br>
</div>
</div>
</body>
</html>