[petsc-users] Runtime options to activate GPU offloading of PETSc solvers
Matthew Knepley
knepley at gmail.com
Wed Aug 23 10:07:17 CDT 2023
On Wed, Aug 23, 2023 at 9:27 AM TROTIGNON Laurent <laurent.trotignon at cea.fr>
wrote:
> Hello all,
>
> In the on line docs of PETSc, I found this paragraph :
>
>
>
> « PETSc uses a single source programming model where solver back-ends are
> selected as *runtime* options and configuration options with no changes
> to the API.
>
> Users should (ideally) never have to change their source code to take
> advantage of new backend implementations. »
>
>
>
> I am looking for an example of runtime options that enable activation of
> GPU offloading of PETSc solvers.
>
> I am not sure that runtime options for GPU offloading are currently
> available ?
>
> I am currently using petsc/3.19.2 configured with cuda and nvhpc/22.2.
>
>
Here is the FAQ on this: https://petsc.org/main/faq/#doc-faq-gpuhowto
The short answer is that GPU offloading is enabled by changing the types of
vectors and matrices, so that all the operations are executed on the GPU.
The solvers just organize those operations, so they need no changes.
Thanks,
Matt
> Best regards
>
> Laurent
>
>
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230823/de88057c/attachment.html>
More information about the petsc-users
mailing list