[petsc-users] Runtime options to activate GPU offloading of PETSc solvers

Junchao Zhang junchao.zhang at gmail.com
Wed Aug 23 10:00:28 CDT 2023


For example,  src/ksp/ksp/tutorials/ex1.c,  which can be tested with these
options.  "-mat_type aijcusparse -vec_type cuda" enables GPU offloading.
test:
suffix: 2_aijcusparse
requires: cuda
args: -pc_type sor -pc_sor_symmetric -ksp_monitor_short
-ksp_gmres_cgs_refinement_type refine_always -mat_type aijcusparse
-vec_type cuda
args: -ksp_view

--Junchao Zhang


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.
>
> Best regards
>
> Laurent
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230823/f315b068/attachment-0001.html>


More information about the petsc-users mailing list