[petsc-users] Scatter context for MatMult
Barry Smith
bsmith at mcs.anl.gov
Fri Aug 17 16:00:56 CDT 2012
MatGetCommunicationStructs() returns exactly back the VecScatter that gets all those ghost points.
It is hardwired for MPIAIJ matrices; which is ok for you.
PETSc developers need to fix this and either add MPIAIJ in the name or make it more general for other formats. Yucky stuff that should not have been exposed in exactly this way.
Barry
On Aug 17, 2012, at 1:33 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Fri, Aug 17, 2012 at 1:05 PM, John Fettig <john.fettig at gmail.com> wrote:
> Is this the role of MatGetGhosts?
>
> That's the intent, but it looks like this function was only implemented for MPIBAIJ.
>
> The actual implementation of MatMult_MPI*AIJ is to start the scatter, apply the diagonal block, finish the scatter, and apply the off-diagonal part.
>
> Why do you want raw access?
>
> If you really need, you can either use MatMPIAIJGetSeqAIJ() or just include the private header.
>
>
> John
>
> On Fri, Aug 17, 2012 at 2:01 PM, John Fettig <john.fettig at gmail.com> wrote:
> > Is there a scatter context available someplace that would allow me to
> > gather all of the elements of a vector that correspond to the ones
> > needed for a MatMult (MPIAIJ matrices)? When you do a MatMult, I
> > presume it first scatters/gathers the ghost elements of the vector
> > being multiplied, can I use this scatter for a vectors outside of the
> > MatMult?
> >
> > Thanks,
> > John
>
More information about the petsc-users
mailing list