Hi Juan, I am sorry to hear that. I should mention that we may miss some timing information in PETSc's built-in profiling tools (e.g., -log_view). I would recommend using vendor profiling tools such as NVIDIA Nsight Systems or ROCm rocprof to get a more complete picture of the performance. See the PETSc documentation on Nsight Systems for more information. Since you ran the code with a single process, we could also use your matrix and right-hand-side vector to investigate the performance issues within PETSc. Is it fine for you to share it?
Thanks, --Junchao Zhang On Wed, Nov 18, 2026 at 11:27 AM Juan Sebastián Hincapié Montes via petsc-users <[email protected]> wrote: > Dear PETSc developers, > > We are porting our finite element code FEMuSS to LUMI-G (AMD MI250X, > gfx90a) using PETSc 3.24.4 built with HIP and Kokkos (cpeCray 25.03, ROCm > 6.3.4). Our test case is a 2D Poisson-type problem (heat equation, linear > triangles), 6.56M unknowns, 45.9M nonzeros, solved with CG + GAMG on 1 GCD: > > # Krylov solver: CG (Poisson is symmetric positive definite) > -ksp_type cg > -ksp_rtol 1e-8 > > # Preconditioner: algebraic multigrid (GAMG), smoothed aggregation > -pc_type gamg > -pc_gamg_type agg > -pc_gamg_agg_nsmooths 1 > -pc_gamg_threshold 0.01 > > # Smoother on each level: Chebyshev + Jacobi (same as the GPU case) > -mg_levels_ksp_type chebyshev > -mg_levels_pc_type jacobi > -mg_levels_ksp_max_it 2 > > # Matrix on the CPU > -mat_type aij > > The solve phase works very well on the GPU (KSPSolve 0.31 s, 11 > iterations, GPU %F = 100), but the setup dominates and seems to run mostly > on the CPU: > > With -mat_type aijhipsparse (PCSetUp 6.41 s): > - PCGAMGCreateG 2.21 s (MatCreateGraph 1.16 s) > - GAMG Coarsen 2.07 s (MIS/Agg 0.85 s, Squ l00 0.15 s) > - PCGAMGProl 1.13 s (Prol-lift 1.10 s, 0 flops) > - PCGAMGOptProl 0.65 s > - PCGAMGCreateL 0.30 s > - MatTranspose: 15 calls, 0.72 s, 0 flops > Total Mflop/s / GPU Mflop/s for PCSetUp = 967 / 22791, i.e. the GPU is > busy roughly 4% of the setup time, although GPU %F is 97%. > > With -mat_type aijkokkos (PCSetUp 17.6 s, same hierarchy and iterations): > - PCGAMGCreateG 9.45 s, of which MatCreateGraph is only 0.98 s > - GAMG Coarsen 5.64 s, of which MIS/Agg is 0.93 s and Squ l00 0.18 s > So about 13 s of the setup is not covered by any sub-event. > > For reference, the same setup on 16 CPU cores takes 3.5 s. > > Our questions: > 1. With aijkokkos, what could explain the ~8.5 s in PCGAMGCreateG outside > MatCreateGraph and the ~4.5 s in GAMG Coarsen outside MIS/Agg? Is there a > host conversion or rebuild of the graph that is not logged? > 2. We understand that a GPU MIS coarsener (MATCOARSENMISKOKKOS) is in > development. Is there a branch or merge request we could test, and is it > planned for an upcoming release? > 3. In the meantime, are there options you would recommend to reduce the > host-side setup cost on GPUs (for example regarding aggressive coarsening, > the coarsener type, or the threshold)? For transient runs we also plan to > reuse the preconditioner across time steps. > > The complete -log_view outputs (with -log_view_gpu_time and -ksp_view) for > both matrix types are attached. > > Thank you for your time and for PETSc. > > Best regards, > Juan Sebastián Hincapié > CIMNE >
