On Fri, Apr 13, 2012 at 11:59 AM, recrusader <span dir="ltr">&lt;<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks, Matt.<br><br>If I have one array, each processor has a copy of all the values.<br>one possible option is <br></blockquote><div><br></div><div>1) If all processors have all values the code is already not scalable</div>
<div><br></div><div>2) If everyone has all values, only set the values you own</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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" target="_blank">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>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><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><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><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><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></font></span></blockquote></div><br>
</blockquote></div><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>