[petsc-dev] Slowness of PetscSortIntWithArrayPair in MatAssembly

Fande Kong fdkong.jd at gmail.com
Tue Jul 2 15:34:34 CDT 2019


On Tue, Jul 2, 2019 at 2:08 PM Jed Brown via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> John Peterson <jwpeterson at gmail.com> writes:
>
> >> Do you add values many times into the same location?  The array length
> >> will be the number of misses to the local part of the matrix.  We could
> >> (and maybe should) make the stash use a hash instead of building the
> >> array with multiplicity and combining duplicates later.
> >>
> >
> >  This is a 3D model with a so-called "spider" node that is connected to
> > (and constrained in terms of) many other nodes by 1D "beam" elements. So,
> > yes, I would imagine the dofs of the spider node would be assembled into
> > from many (possibly off-processor) elements.
>
> Makes sense.
>
> > The "legacy" variant sends all that redundant data and inserts one at a
> >> time into the local data structures.
> >>
> >
> > OK, I guess in this case the problem is so small that we don't even
> notice
> > the communication time, even for the legacy algorithm.
>
> Fande said it took a second, which sounds like a long time to me -- it's
> enough time to move many GB in memory.
>

Just to be clear, I did not put a timer on. I hit the button, and then code
was done. I thought that were about one second.
"One second" thing was not the point at the first place, and I was
emphasizing  that BTS was way slower than the legacy for that particular
run.


Thanks,

Fande,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190702/33315e3c/attachment.html>


More information about the petsc-dev mailing list