[petsc-dev] PETSc amg solver with gpu seems run slowly

Qi Yang qiyang at oakland.edu
Tue Mar 22 09:30:50 CDT 2022


To whom it may concern,

I have tried petsc ex50(Possion) with cuda, ksp cg solver and
gamg precondition, however, it run for about 30s. I also tried NVIDIA AMGX
with the same solver and same grid (3000*3000), it only took 2s. I used
nsight system software to analyze those two cases, found petsc took much
time in the memory process (63% of total time, however, amgx only took
19%). Attached are screenshots of them.

The petsc command is : mpiexec -n 1 ./ex50  -da_grid_x 3000 -da_grid_y 3000
-ksp_type cg -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1
-vec_type cuda -mat_type aijcusparse -ksp_monitor -ksp_view -log-view

The log file is also attached.

Regards,
Qi

[image: 1.png]
[image: 2.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220322/bf1d440c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.png
Type: image/png
Size: 160105 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220322/bf1d440c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.png
Type: image/png
Size: 216203 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220322/bf1d440c/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.PETSc_cg_amg_ex50_gpu_cuda
Type: application/octet-stream
Size: 32623 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220322/bf1d440c/attachment-0001.obj>


More information about the petsc-dev mailing list