[petsc-users] Preliminaries to use gpu capabilities

Barry Smith bsmith at petsc.dev
Sun Aug 25 17:26:28 CDT 2024



> On Aug 25, 2024, at 12:45 PM, Edoardo alinovi <edoardo.alinovi at gmail.com> wrote:
> 
> Thank you Barry, sounds great. I'll try it out in the next weeks! Is copy data such a bottleneck with respect to the solving time in your opinion?

   If you are solving with the same matrix many times, then the matrix copy is not a big deal. 

> I am not scared of building stuff on gpu directly, I basically assemble the petsc matrix and rhs in one point so it would be ok doing stuff on gpu directly. Is aij format ok for gpu or better CSR?

   PETSc AIJ is essentially CSR and is what everyone supports. If you are solving with the same matrix many times, converting to MATAIJSELL up front will likely pay off, but this doesn't change user code.


> 
> Cheers.
> 
> Il Dom 25 Ago 2024, 13:49 Edoardo alinovi <edoardo.alinovi at gmail.com <mailto:edoardo.alinovi at gmail.com>> ha scritto:
>> Hello Petsc friends,
>> 
>> As many people is doing,  I would like to explore a bit gpu capabilities (cuda) in petsc. 
>> 
>> Before attemping any coding effort I would like to hear from you if all of this make sense:
>> - compile mpi with cuda support
>> - compile petsc with cuda support
>> - build matrix and vectors as MATAIJCUSPARSE and VECMPICUDA to tell petsc using gpu.
>> 
>> That's really it or do I need to take care of something else? 
>> 
>> I have seen that there is an amgXWrapper library aroud, but not sure if it is still relevant now or not.
>> 
>> Thank you for the suggestions!
>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240825/ae905a6e/attachment.html>


More information about the petsc-users mailing list