<div dir="ltr">Wouldn&#39;t it be better in this case to use an MPIScatterV?<br><br>~A<br><br><div class="gmail_quote">On Mon, Sep 22, 2008 at 4:03 PM, Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
 &nbsp; I would only expect good performance if you used MPI calls to send the blocks of rows of the matrix to the process<br>
they belong to and use MatGetArray() to pass into the MPI_Recv to receive the data into.<br><font color="#888888">
<br>
 &nbsp; Barry</font><div><div></div><div class="Wj3C7c"><br>
<br>
On Sep 22, 2008, at 1:34 PM, Yujie wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thank you for your reply, Matt. I have checked the tutorials. They just use specified values and MatSetValues() to make a parallel matrix. Now, the matrix I use is in a single node of the cluster. I have &#39;M&#39; nodes in this cluster. I need to copy the sequential matrix to other &#39;M-1&#39; nodes and then use MatSetValues() or I just use MatSetvalues() in the node where the matrix is? The latter should work, right? thanks.<br>

<br>
Yujie<br>
<br>
<br>
On Mon, Sep 22, 2008 at 11:09 AM, Matthew Knepley &lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt; wrote:<br>
The right way to do this is to input the matrix using MatSetValues()<br>
in a distribute fashion. You can consult any of the tutorials, for instance<br>
KSP ex2 for an example of this.<br>
<br>
&nbsp;Matt<br>
<br>
On Mon, Sep 22, 2008 at 12:57 PM, Yujie &lt;<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>&gt; wrote:<br>
&gt; Hi, Petsc developer<br>
&gt;<br>
&gt; Now, I have a sequential dense matrix. How to get a parallel matrix based on<br>
&gt; it? thanks a lot.<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Yujie<br>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which<br>
their experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>