[petsc-dev] Comp-comm overlap with DMPlex

Matthew Knepley knepley at gmail.com
Wed Jan 15 08:41:24 CST 2014


On Wed, Jan 15, 2014 at 7:16 AM, Michael Lange <michael.lange at imperial.ac.uk
> wrote:

> Hi,
>
> I am trying to implement a computation-communication overlap with DMPlex,
> where local values that do not need to be sent are updated while the DM/SF
> is broadcasting the ghost values (DMGlobalToLocal() or PetscSFBcast(), I've
> tried both). The problem is that this only works if I force the broadcast
> to end before the computation is performed, but it fails if they actually
> overlap. In that case it seems that the updates to the global Vec are
> ignored completely. Am I missing something here or can somebody point me to
> a working example that does comp-comm overlap with DMPlex?
>

0) You would first need to divide the computation units (cells for FEM)
into boundary and interior, which I do not currently do. Then you can

     DMLocalToLocalBegin()
    <compute interior>
    DMLocalToLocalEnd()
    <compute boundary>

1) DMGlobalToLocal() copies the entire local vector, so it is not really
what you want. You want LocalToLocal(), which I do not currently
    make. Its not hard. You take the GlobalToLocal map and remove
everything that is not on the boundary, meaning everything in the SF
    that comes from the same proc. So you make another SF, and use the same
PetscSFBcast() in DMLocalToLocal().

    Matt


> Kind regards
> Michael Lange
>



-- 
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-dev/attachments/20140115/b61c9950/attachment.html>


More information about the petsc-dev mailing list