Time for MatAssembly

Matthew Knepley knepley at gmail.com
Tue May 19 11:28:52 CDT 2009


On Tue, May 19, 2009 at 11:02 AM, <tribur at vision.ee.ethz.ch> wrote:

> Distinguished PETSc experts,
>
> Assuming processor k has defined N entries of a parallel matrix using
> MatSetValues. The half of the entries are in matrix rows belonging to this
> processor, but the other half are situated in rows of other processors.
>
> My question:
>
> When does MatAssemblyBegin+MatAssemblyEnd take longer, if the rows where
> the second half of the entries are situated belong all to one single other
> processor, e.g. processor k+1, or if these rows are distributed across
> several, let's say 4, other processors? Is there a significant difference?


Since we aggregate the rows and send a single message per proc, this is
probably dominated by bandwidth, not latency. It takes the
same bandwidth to send the messages, but if only one guys is sending, it is
probably better to split the message. If everyone is doing
the same thing, it will not matter at all. Generally, optimizing these
things is WAY down the list of important things for runtime.

  Matt


>
> Thanks in advance for your answer,
> Trini
>
-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090519/0584e931/attachment.htm>


More information about the petsc-users mailing list