Thanks, Matt.<br><br>If I have one array, each processor has a copy of all the values.<br>one possible option is <br>VecCreateMPI();<br>VecSetValues();<br>VecAssemblyBegin();<br>VecAssemblyEnd();<br><br>any better idea?<br>
<br>if I have one array, only one processor has a copy of all the values.<br>How to generate a MPI vector?<br><br>Best,<br>Yujie<br><br><div class="gmail_quote">On Fri, Apr 13, 2012 at 10:38 AM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Apr 13, 2012 at 11:37 AM, recrusader <span dir="ltr">&lt;<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>&gt;</span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear PETSc developers,<br><br>my question is what type of array is need for <font size="4">VecCreateMPIWithArray?<br>it is parallel distributed, that each processor holds local values of the array? or each processor has a copy of all the values of the array?<br>


</font>
<pre><font size="4"></font></pre></blockquote><div><br></div></div><div>Only local values.</div><div><br></div><div>   Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<pre><font size="4">PetscErrorCode  VecCreateMPIWithArray(MPI_Comm comm,PetscInt n,PetscInt N,const PetscScalar array[],Vec *vv)</font></pre>I didn&#39;t find more information about the array from the manual.<br><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecCreateMPIWithArray.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecCreateMPIWithArray.html</a><br>


<br>Thanks a lot,<br>Yujie<br>
</blockquote></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>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<br>
</font></span></blockquote></div><br>