<div dir="ltr">Wouldn'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"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></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>
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>
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 'M' nodes in this cluster. I need to copy the sequential matrix to other 'M-1' 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 <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> 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>
Matt<br>
<br>
On Mon, Sep 22, 2008 at 12:57 PM, Yujie <<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>> wrote:<br>
> Hi, Petsc developer<br>
><br>
> Now, I have a sequential dense matrix. How to get a parallel matrix based on<br>
> it? thanks a lot.<br>
><br>
> Regards,<br>
><br>
> 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>