<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Do you want me to open an MR to handle the sequential case?<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 7, 2021, at 3:39 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">OK, I found where its not protected in sequential.</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 9:25 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="">Thanks, but that did not work. </div><div class=""><br class=""></div><div class="">It looks like this is just in MPIAIJ, but I am using SeqAIJ. ex2 (below) uses PETSC_COMM_SELF everywhere.</div><div class=""><br class=""></div>+ srun -G 1 -n 16 -c 1 --cpu-bind=cores --ntasks-per-core=2 /global/homes/m/madams/mps-wrapper.sh ../ex2 -dm_landau_device_type cuda -dm_mat_type aijcusparse -dm_vec_type cuda -log_view -pc_type gamg -ksp_type gmres -pc_gamg_reuse_interpolation <b class="">-matmatmult_backend_cpu -matptap_backend_cpu </b>-dm_landau_ion_masses .0005,1,1,1,1,1,1,1,1 -dm_landau_ion_charges 1,2,3,4,5,6,7,8,9 -dm_landau_thermal_temps 1,1,1,1,1,1,1,1,1,1 -dm_landau_n 1.000003,.5,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7<br class="">0 starting nvidia-cuda-mps-control on cgpu17<br class="">mps ready: 2021-07-07T06:17:36-07:00<br class="">masses: e= 9.109e-31; ions in proton mass units: 5.000e-04 1.000e+00 ...<br class="">charges: e=-1.602e-19; charges in elementary units: 1.000e+00 2.000e+00<br class="">thermal T (K): e= 1.160e+07 i= 1.160e+07 imp= 1.160e+07. v_0= 1.326e+07 n_0= 1.000e+20 t_0= 5.787e-06 domain= 5.000e+00<br class="">CalculateE j0=0. Ec = 0.050991<br class="">0 TS dt 1. time 0.<br class=""> 0) species-0: charge density= -1.6054532569865e+01 z-momentum= -1.9059929215360e-19 energy= 2.4178543516210e+04<br class=""> 0) species-1: charge density= 8.0258396545108e+00 z-momentum= 7.0660527288120e-20 energy= 1.2082380663859e+04<br class=""> 0) species-2: charge density= 6.3912608577597e-05 z-momentum= -1.1513901010709e-24 energy= 3.5799558195524e-01<br class=""> 0) species-3: charge density= 9.5868912866395e-05 z-momentum= -1.1513901010709e-24 energy= 3.5799558195524e-01<br class=""> 0) species-4: charge density= 1.2782521715519e-04 z-momentum= -1.1513901010709e-24 energy= 3.5799558195524e-01<br class="">[7]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[7]PETSC ERROR: GPU resources unavailable <br class="">[7]PETSC ERROR: CUDA error 2 (cudaErrorMemoryAllocation) : out of memory. Reports alloc failed; this indicates the GPU has run out resources<br class="">[7]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br class="">[7]PETSC ERROR: Petsc Development GIT revision: v3.15.1-569-g270a066c1e GIT Date: 2021-07-06 03:22:54 -0700<br class="">[7]PETSC ERROR: ../ex2 on a arch-cori-gpu-opt-gcc named cgpu17 by madams Wed Jul 7 06:17:38 2021<br class="">[7]PETSC ERROR: Configure options --with-mpi-dir=/usr/common/software/sles15_cgpu/openmpi/4.0.3/gcc --with-cuda-dir=/usr/common/software/sles15_cgpu/cuda/11.1.1 --CFLAGS=" -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4" --CXXFLAGS=" -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4" --CUDAFLAGS="-g -Xcompiler -rdynamic -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4" --FFLAGS=" -g " --COPTFLAGS=" -O3" --CXXOPTFLAGS=" -O3" --FOPTFLAGS=" -O3" --download-fblaslapack=1 --with-debugging=0 --with-mpiexec="srun -G 1" --with-cuda-gencodearch=70 --with-batch=0 --with-cuda=1 --download-p4est=1 --download-hypre=1 --with-zlib=1 PETSC_ARCH=arch-cori-gpu-opt-gcc<br class=""><b class="">[7]PETSC ERROR: #1 MatProductSymbolic_SeqAIJCUSPARSE_SeqAIJCUSPARSE() at /global/u2/m/madams/petsc/src/mat/impls/aij/seq/seqcusparse/<a href="http://aijcusparse.cu:2622/" target="_blank" class="">aijcusparse.cu:2622</a><br class=""></b>[7]PETSC ERROR: #2 MatProductSymbolic_ABC_Basic() at /global/u2/m/madams/petsc/src/mat/interface/matproduct.c:1146<br class="">[7]PETSC ERROR: #3 MatProductSymbolic() at /global/u2/m/madams/petsc/src/mat/interface/matproduct.c:799<br class="">[7]PETSC ERROR: #4 MatPtAP() at /global/u2/m/madams/petsc/src/mat/interface/matrix.c:9626<br class="">[7]PETSC ERROR: #5 PCGAMGCreateLevel_GAMG() at /global/u2/m/madams/petsc/src/ksp/pc/impls/gamg/gamg.c:87<br class="">[7]PETSC ERROR: #6 PCSetUp_GAMG() at /global/u2/m/madams/petsc/src/ksp/pc/impls/gamg/gamg.c:663<br class="">[7]PETSC ERROR: #7 PCSetUp() at /global/u2/m/madams/petsc/src/ksp/pc/interface/precon.c:1014<br class="">[7]PETSC ERROR: #8 KSPSetUp() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:406<br class="">[7]PETSC ERROR: #9 KSPSolve_Private() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:850<br class="">[7]PETSC ERROR: #10 KSPSolve() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:1084<br class="">[7]PETSC ERROR: #11 SNESSolve_NEWTONLS() at /global/u2/m/madams/petsc/src/snes/impls/ls/ls.c:225<br class="">[7]PETSC ERROR: #12 SNESSolve() at /global/u2/m/madams/petsc/src/snes/interface/snes.c:4769<br class="">[7]PETSC ERROR: #13 TSTheta_SNESSolve() at /global/u2/m/madams/petsc/src/ts/impls/implicit/theta/theta.c:185<br class="">[7]PETSC ERROR: #14 TSStep_Theta() at /global/u2/m/madams/petsc/src/ts/impls/implicit/theta/theta.c:223<br class="">[7]PETSC ERROR: #15 TSStep() at /global/u2/m/madams/petsc/src/ts/interface/ts.c:3571<br class="">[7]PETSC ERROR: #16 TSSolve() at /global/u2/m/madams/petsc/src/ts/interface/ts.c:3968<br class="">[7]PETSC ERROR: #17 main() at ex2.c:699<br class="">[7]PETSC ERROR: PETSc Option Table entries:<br class="">[7]PETSC ERROR: -dm_landau_amr_levels_max 0<br class="">[7]PETSC ERROR: -dm_landau_amr_post_refine 5<br class="">[7]PETSC ERROR: -dm_landau_device_type cuda<br class="">[7]PETSC ERROR: -dm_landau_domain_radius 5<br class="">[7]PETSC ERROR: -dm_landau_Ez 0<br class="">[7]PETSC ERROR: -dm_landau_ion_charges 1,2,3,4,5,6,7,8,9<br class="">[7]PETSC ERROR: -dm_landau_ion_masses .0005,1,1,1,1,1,1,1,1<br class="">[7]PETSC ERROR: -dm_landau_n 1.000003,.5,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7,1e-7<br class="">[7]PETSC ERROR: -dm_landau_thermal_temps 1,1,1,1,1,1,1,1,1,1<br class="">[7]PETSC ERROR: -dm_landau_type p4est<br class="">[7]PETSC ERROR: -dm_mat_type aijcusparse<br class="">[7]PETSC ERROR: -dm_preallocate_only<br class="">[7]PETSC ERROR: -dm_vec_type cuda<br class="">[7]PETSC ERROR: -ex2_connor_e_field_units<br class="">[7]PETSC ERROR: -ex2_impurity_index 1<br class="">[7]PETSC ERROR: -ex2_plot_dt 200<br class="">[7]PETSC ERROR: -ex2_test_type none<br class="">[7]PETSC ERROR: -ksp_type gmres<br class="">[7]PETSC ERROR: -log_view<br class=""><b class="">[7]PETSC ERROR: -matmatmult_backend_cpu<br class="">[7]PETSC ERROR: -matptap_backend_cpu</b><br class="">[7]PETSC ERROR: -pc_gamg_reuse_interpolation<br class="">[7]PETSC ERROR: -pc_type gamg<br class="">[7]PETSC ERROR: -petscspace_degree 1<br class="">[7]PETSC ERROR: -snes_max_it 15<br class="">[7]PETSC ERROR: -snes_rtol 1.e-6<br class="">[7]PETSC ERROR: -snes_stol 1.e-6<br class="">[7]PETSC ERROR: -ts_adapt_scale_solve_failed 0.5<br class="">[7]PETSC ERROR: -ts_adapt_time_step_increase_delay 5<br class="">[7]PETSC ERROR: -ts_dt 1<br class="">[7]PETSC ERROR: -ts_exact_final_time stepover<br class="">[7]PETSC ERROR: -ts_max_snes_failures -1<br class="">[7]PETSC ERROR: -ts_max_steps 10<br class="">[7]PETSC ERROR: -ts_max_time 300<br class="">[7]PETSC ERROR: -ts_rtol 1e-2<br class="">[7]PETSC ERROR: -ts_type beuler<br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 4:07 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><span style="font-family:monospace" class="">This will select the CPU path</span><div class=""><span style="font-family:monospace" class=""><br class=""></span></div><div class=""><span style="font-family:monospace" class="">-matmatmult_backend_cpu -matptap_backend_cpu</span><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 7, 2021, at 2:43 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Can I turn off using cuSprarse for RAP?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021 at 6:25 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" class="">bsmith@petsc.dev</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class=""><br class=""></div> Stefano has mentioned this before. He reported cuSparse matrix-matrix vector products use a very amount of memory.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2021, at 4:33 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">I am running out of memory in GAMG. It looks like this is from the new cuSparse RAP.<div class="">I was able to run Hypre with twice as much work on the GPU as this run.</div><div class="">Are there parameters to tweek for this perhaps or can I disable it?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Mark <br class=""><div class=""><br class=""></div><div class=""> 0 SNES Function norm 5.442539952302e-04 <br class="">[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[2]PETSC ERROR: GPU resources unavailable <br class="">[2]PETSC ERROR: CUDA error 2 (cudaErrorMemoryAllocation) : out of memory. Reports alloc failed; this indicates the GPU has run out resources<br class="">[2]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br class="">[2]PETSC ERROR: Petsc Development GIT revision: v3.15.1-569-g270a066c1e GIT Date: 2021-07-06 03:22:54 -0700<br class="">[2]PETSC ERROR: ../ex2 on a arch-cori-gpu-opt-gcc named cgpu11 by madams Tue Jul 6 13:37:43 2021<br class="">[2]PETSC ERROR: Configure options --with-mpi-dir=/usr/common/software/sles15_cgpu/openmpi/4.0.3/gcc --with-cuda-dir=/usr/common/software/sles15_cgpu/cuda/11.1.1 --CFLAGS=" -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECI<br class="">ES=10 -DLANDAU_MAX_Q=4" --CXXFLAGS=" -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4" --CUDAFLAGS="-g -Xcompiler -rdynamic -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4" --FFLAGS=" -g " -<br class="">-COPTFLAGS=" -O3" --CXXOPTFLAGS=" -O3" --FOPTFLAGS=" -O3" --download-fblaslapack=1 --with-debugging=0 --with-mpiexec="srun -G 1" --with-cuda-gencodearch=70 --with-batch=0 --with-cuda=1 --download-p4est=1 --<br class="">download-hypre=1 --with-zlib=1 PETSC_ARCH=arch-cori-gpu-opt-gcc<br class="">[2]PETSC ERROR: #1 MatProductSymbolic_SeqAIJCUSPARSE_SeqAIJCUSPARSE() at /global/u2/m/madams/petsc/src/mat/impls/aij/seq/seqcusparse/<a href="http://aijcusparse.cu:2622/" target="_blank" class="">aijcusparse.cu:2622</a><br class="">[2]PETSC ERROR: #2 MatProductSymbolic_ABC_Basic() at /global/u2/m/madams/petsc/src/mat/interface/matproduct.c:1159<br class="">[2]PETSC ERROR: #3 MatProductSymbolic() at /global/u2/m/madams/petsc/src/mat/interface/matproduct.c:799<br class="">[2]PETSC ERROR: #4 MatPtAP() at /global/u2/m/madams/petsc/src/mat/interface/matrix.c:9626<br class="">[2]PETSC ERROR: #5 PCGAMGCreateLevel_GAMG() at /global/u2/m/madams/petsc/src/ksp/pc/impls/gamg/gamg.c:87<br class="">[2]PETSC ERROR: #6 PCSetUp_GAMG() at /global/u2/m/madams/petsc/src/ksp/pc/impls/gamg/gamg.c:663<br class="">[2]PETSC ERROR: #7 PCSetUp() at /global/u2/m/madams/petsc/src/ksp/pc/interface/precon.c:1014<br class="">[2]PETSC ERROR: #8 KSPSetUp() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:406<br class="">[2]PETSC ERROR: #9 KSPSolve_Private() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:850<br class="">[2]PETSC ERROR: #10 KSPSolve() at /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c:1084<br class="">[2]PETSC ERROR: #11 SNESSolve_NEWTONLS() at /global/u2/m/madams/petsc/src/snes/impls/ls/ls.c:225<br class="">[2]PETSC ERROR: #12 SNESSolve() at /global/u2/m/madams/petsc/src/snes/interface/snes.c:4769<br class="">[2]PETSC ERROR: #13 TSTheta_SNESSolve() at /global/u2/m/madams/petsc/src/ts/impls/implicit/theta/theta.c:185<br class="">[2]PETSC ERROR: #14 TSStep_Theta() at /global/u2/m/madams/petsc/src/ts/impls/implicit/theta/theta.c:223<br class="">[2]PETSC ERROR: #15 TSStep() at /global/u2/m/madams/petsc/src/ts/interface/ts.c:3571<br class="">[2]PETSC ERROR: #16 TSSolve() at /global/u2/m/madams/petsc/src/ts/interface/ts.c:3968<br class="">[2]PETSC ERROR: #17 main() at ex2.c:699<br class=""></div></div></div>
</div></blockquote></div><br class=""></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></body></html>