<div dir="ltr">Hi,<div><br></div><div>I'm developing a microbenchmark that runs a CG solve using PETSc on a mesh using a 5-point stencil matrix. My code (linked here: <a href="https://github.com/rohany/petsc-pde-benchmark/blob/main/main.cpp">https://github.com/rohany/petsc-pde-benchmark/blob/main/main.cpp</a>, only 120 lines) works on 1 GPU and has great performance. When I move to 2 GPUs, the program appears to get stuck in the input generation. I've literred the code with print statements and have found out the following clues:</div><div><br></div><div>* The first rank progresses through this loop: <a href="https://github.com/rohany/petsc-pde-benchmark/blob/main/main.cpp#L44">https://github.com/rohany/petsc-pde-benchmark/blob/main/main.cpp#L44</a>, but then does not exit (it seems to get stuck right before rowStart == rowEnd)</div><div>* The second rank makes very few iterations through the loop for its allotted rows.</div><div><br></div><div>Therefore, neither rank makes it to the call to MatAssemblyBegin.</div><div><br></div><div>I'm running the code using the following command line on the Summit supercomputer:</div><div>```<br>jsrun -n 2 -g 1 -c 1 -b rs -r 2 /gpfs/alpine/scratch/rohany/csc335/petsc-pde-benchmark/main -ksp_max_it 200 -ksp_type cg -pc_type none -ksp_atol 1e-10 -ksp_rtol 1e-10 -vec_type cuda -mat_type aijcusparse -use_gpu_aware_mpi 0 -nx 8485 -ny 8485<br>```</div><div><br></div><div>Any suggestions will be appreciated! I feel that I have applied many of the common petsc optimizations of preallocating my matrix row counts, so I'm not sure what's going on with this input generation.</div><div><br></div><div>Thanks,</div><div><br></div><div>Rohan Yadav</div></div>