PETSc on GPUs

Matthew Knepley knepley at gmail.com
Thu Sep 18 13:55:53 CDT 2008


On Thu, Sep 18, 2008 at 1:34 PM, Ahmed El Zein <ahmed at azein.com> wrote:
> On Thu, 2008-09-18 at 10:20 -0500, Matthew Knepley wrote:
>> > A question that I had regarding the PETSc code when I was thinking
>> about
>> > this was:
>> > You have the SeqAIJ matrix type and the the MPIAIJ type built around
>> it
>> > (or that is what I understand from the code). So basically you
>> implement
>> > the SeqAIJ type for the GPU and you get the MPI type for free?
>>
>> Yes, that is true. However, note that in the MPI step, you will need a
>> gather
>> operation to get the second matrix multiply to work.
> Matt,
> Could you explain a bit more?

The diagonal block performs a simple, serial AIJ MatMult(). However, for the
offdiagonal block, you must gather the Vec entries for nonzero columns in
that block, fit them into a small Vec, do another serial AIJ MatMult(), and then
scatter them back to the correct locations.

  Matt

> Ahmed
-- 
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




More information about the petsc-dev mailing list