<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> We would need more information about "hanging". Do PETSc examples and tiny problems "hang" on multiple nodes? If you run with -info what are the last messages printed? Can you run with a debugger to see where it is "hanging"?<div><br></div><div><br><div><br><blockquote type="cite"><div>On Aug 9, 2023, at 5:59 PM, Ng, Cho-Kuen <cho@slac.stanford.edu> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Barry and Matt,</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks for your help. Now I can use petsc GPU backend on Perlmutter: 1 node, 4 MPI tasks and 4 GPUs. However, I ran into problems with multiple nodes: 2 nodes, 8 MPI tasks and 8 GPUs. The run hung on KSPSolve. How can I fix this?</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Best,</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div><div style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 934.90625px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, July 17, 2023 6:58 AM<br><b>To:</b><span class="Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; line-break: after-white-space;"><div><br></div> The examples that use DM, in particular DMDA all trivially support using the GPU with -dm_mat_type aijcusparse -dm_vec_type cuda<div><br></div><div><br><div><br><blockquote type="cite"><div>On Jul 17, 2023, at 1:45 AM, Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu">cho@slac.stanford.edu</a>> wrote:</div><br class="x_Apple-interchange-newline"><div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Barry,</div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thank you so much for the clarification.<span class="x_Apple-converted-space"> </span><br></div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I see that ex104.c and ex300.c use MatXAIJSetPreallocation(). Are there other tutorials available?</div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_appendonsend" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; display: inline-block; width: 934.90625px;"><span style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="x_divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA3968f266-4de5-414c-8ded-0cb1a901c9d7" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Saturday, July 15, 2023 8:36 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA52d26ba7-2670-8ab3-a5dd-77b3d113c4f0" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA68ae6436-3903-84f9-48a4-b03b65a66ca5" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA79a232e9-ee06-564c-a96f-c68878a3e6b7" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; line-break: after-white-space;"><div><br></div> <div> Cho,</div><div><br></div><div> We currently have a crappy API for turning on GPU support, and our documentation is misleading in places. </div><div><br></div><div> People constantly say "to use GPU's with PETSc you only need to use -mat_type aijcusparse (for example)" This is incorrect.</div><div><br></div><div> This does not work with code that uses the convenience Mat constructors such as MatCreateAIJ(), MatCreateAIJWithArrays etc. It only works if you use the constructor approach of MatCreate(), MatSetSizes(), MatSetFromOptions(), MatXXXSetPreallocation(). ... Similarly you need to use VecCreate(), VecSetSizes(), VecSetFromOptions() and -vec_type cuda</div><div><br></div><div> If you use DM to create the matrices and vectors then you can use <span style="font-variant-ligatures: no-common-ligatures;">-</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(180, 36, 25);"><b>dm_mat_type aijcusparse</b></span><span style="font-variant-ligatures: no-common-ligatures;"><span class="x_Apple-converted-space"> </span>-dm_vec_type cuda</span></div><div><br></div><div> Sorry for the confusion.</div><div><br></div><div> Barry</div><div><br></div><div><br></div><div><br><div><br><blockquote type="cite"><div>On Jul 15, 2023, at 8:03 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWAf48cf1d3-4bb0-365f-df65-8a7bbba69ea9" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>> wrote:</div><br class="x_x_Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr">On Sat, Jul 15, 2023 at 1:44 AM Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA63a4ff09-a025-caa1-ed16-7711ce6e61ff" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>> wrote:<br></div><div class="x_x_gmail_quote"><blockquote class="x_x_gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="x_x_msg2927322207553750716"><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Matt,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">After inserting 2 lines in the code:</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"> ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); <span class="x_Apple-converted-space"> </span><br><div> ierr = MatSetFromOptions(A);CHKERRQ(ierr);</div><div> ierr = MatCreateAIJ(PETSC_COMM_WORLD,mlocal,mlocal,m,n,</div><div> d_nz,PETSC_NULL,o_nz,PETSC_NULL,&A);;CHKERRQ(ierr);</div><div><br></div><div>"There are no unused options." However, there is no improvement on the GPU performance.</div></div></div></div></blockquote><div><br></div><div>1. MatCreateAIJ() sets the type, and in fact it overwrites the Mat you created in steps 1 and 2. This is detailed in the manual.</div><div><br></div><div>2. You should replace MatCreateAIJ(), with MatSetSizes() before MatSetFromOptions().</div><div><br></div><div> THanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="x_x_gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="x_x_msg2927322207553750716"><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><div>Thanks,</div><div>Cho<br></div></div><div id="x_x_m_2927322207553750716appendonsend"></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><hr style="display: inline-block; width: 907.546875px;"><div id="x_x_m_2927322207553750716divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA43ca02e0-81e4-f149-2009-8cbdd2a51610" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, July 14, 2023 5:57 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA0b6ad9f7-b374-0cd7-506c-48d938a910c4" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA116ba900-cc3d-f2e8-3a96-7eaac0f3d698" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>>; Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA20f2e876-bcce-f7cc-9ec2-eb79227f59a2" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWAdb208555-8c4d-606a-ba89-937985967219" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWAce66802f-9476-032d-c3bb-f915b3fe6272" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div dir="ltr"><div dir="ltr">On Fri, Jul 14, 2023 at 7:57 PM Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA5c578464-2b5a-a8ea-ff69-21635f2afbce" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>> wrote:<br></div><div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I managed to pass the following options to PETSc using a GPU node on Perlmutter.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"> -mat_type aijcusparse -vec_type cuda -log_view -options_left</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Below is a summary of the test using 4 MPI tasks and 1 GPU per task.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">o #PETSc Option Table entries:<div><span> </span>-log_view</div><div><span> </span>-mat_type aijcusparse</div><div> -options_left</div><div> -vec_type cuda</div><div> #End of PETSc Option Table entries</div><div> WARNING! There are options you set that were not used!</div><div> WARNING! could be spelling mistake, etc!</div><div> There is one unused database option. It is:</div><div> Option left: name:-mat_type value: aijcusparse</div><div><br></div><div>The -mat_type option has not been used. In the application code, we use</div><div><br></div><div> ierr = MatCreateAIJ(PETSC_COMM_WORLD,mlocal,mlocal,m,n,<div> d_nz,PETSC_NULL,o_nz,PETSC_NULL,&A);;CHKERRQ(ierr);</div></div></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div></div></div></blockquote><div><br></div><div>If you create the Mat this way, then you need MatSetFromOptions() in order to set the type from the command line.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">o The percent flops on the GPU for KSPSolve is 17%.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">In comparison with a CPU run using 16 MPI tasks, the GPU run is an order of magnitude slower. How can I improve the GPU performance?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556appendonsend"></div><hr style="display: inline-block; width: 889.984375px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA3ee2e8e7-ac9c-02f7-ecf8-b0743cbf7510" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, June 30, 2023 7:57 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA1da97316-51bf-2527-0abe-54ec0930612a" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>>; Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA38dd5856-f8cd-f187-3c47-dd9a51527ef3" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWAfe999de6-5a1b-b9bc-8554-62f21b50d46c" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA6421afb0-f0e2-c83e-f5a6-ac1b70b4d583" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWAd0d91437-98c7-6591-c3af-b29d476ca217" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Barry, Mark and Matt,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thank you all for the suggestions. I will modify the code so we can pass runtime options.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_appendonsend"></div><hr style="display: inline-block; width: 889.984375px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA6bbf791f-9570-47dc-438e-b7271929d5b8" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, June 30, 2023 7:01 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA2fee2809-3c2d-af28-d615-3b96769eb940" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA94f0a217-3c66-5efb-6eb7-93380133ee26" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>>; Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA25f562bb-0c9a-ef78-d90e-62197dc58ca6" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA2670d5e0-1f8e-cad6-7bd5-38c8b9ffcce9" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA80d16510-8efa-c3ca-59f8-16a370410506" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div><br></div> Note that options like -mat_type aijcusparse -vec_type cuda only work if the program is set up to allow runtime swapping of matrix and vector types. If you have a call to MatCreateMPIAIJ() or other specific types then then these options do nothing but because Mark had you use -options_left the program will tell you at the end that it did not use the option so you will know.<div><br><blockquote type="cite"><div>On Jun 30, 2023, at 9:30 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA2f855305-01d1-c3b1-f9a4-f074aa783488" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>> wrote:</div><br><div><div dir="ltr">PetscCall(PetscInitialize(&argc, &argv, NULL, help)); gives us the args and you run:<br><div><br></div><div>a.out -mat_type aijcusparse -vec_type cuda -log_view -options_left</div><div><br></div><div>Mark</div></div><br><div><div dir="ltr">On Fri, Jun 30, 2023 at 6:16 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA1d4fad4b-3701-e602-eb84-5fff6328267e" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>> wrote:<br></div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div dir="ltr">On Fri, Jun 30, 2023 at 1:13 AM Ng, Cho-Kuen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAbaea77fd-04fe-e987-d2b8-b502757b6e27" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Mark,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">The application code reads in parameters from an input file, where we can put the PETSc runtime options. Then we pass the options to PetscInitialize(...). Does that sounds right?</div></div></div></blockquote><div><br></div><div>PETSc will read command line argument automatically in PetscInitialize() unless you shut it off.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577appendonsend"></div><hr style="display: inline-block; width: 845.0625px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWAed9eff25-5bea-cfbf-dc2c-590bd1396156" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Thursday, June 29, 2023 8:32 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWAa6c16cb8-bfd3-0fa9-c95b-9be87088f0c6" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA76ca7266-8094-a45b-3795-3ed0c0bd1368" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA2dd09bd9-b90c-b249-4ca6-f7d72269502b" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Mark,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks for the information. How do I put the runtime options for the executable, say, a.out, which does not have the provision to append arguments? Do I need to change the C++ main to read in the options?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577x_appendonsend"></div><hr style="display: inline-block; width: 845.0625px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA6b2d7673-e4b6-8219-ce06-282eaa06bba1" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Thursday, June 29, 2023 5:55 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA99519f2b-3667-c8db-5319-1e665fab3806" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA42b56719-38ea-2f47-1d31-1cac6273de5e" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA17cb1379-2bcf-04bc-d777-83b7b0ac9da5" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div dir="ltr">Run with options: -mat_type aijcusparse -vec_type cuda -log_view -options_left<div><br></div><div>The last column of the performance data (from -log_view) will be the percent flops on the GPU. Check that that is > 0.</div><div><br></div><div>The end of the output will list the options that were used and options that were _not_ used (if any). Check that there are no options left.</div><div><br></div><div>Mark</div></div><br><div><div dir="ltr">On Thu, Jun 29, 2023 at 7:50 PM Ng, Cho-Kuen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA06869eb5-1ee4-4986-e4fa-089f9f8444fe" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I installed PETSc on Perlmutter using "spack install<span class="x_Apple-converted-space"> </span><span style="background: rgb(255, 255, 255);">petsc+cuda+zoltan</span><span style="background-color: rgb(255, 255, 255);">"<span class="x_Apple-converted-space"> </span></span>and used it by "<span style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; background: rgb(255, 255, 255);">spack load petsc/fwge6pf</span>". Then I compiled the application code (purely CPU code) linking to the petsc package, hoping that I can get performance improvement using the petsc GPU backend. However, the timing was the same using the same number of MPI tasks with and without GPU accelerators. Have I missed something in the process, for example, setting up PETSc options at runtime to use the GPU backend?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span>--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWA3a415dd5-98ee-effe-aae4-0c4038270c17" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></blockquote></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span>--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWA3b1004d2-f642-be6d-0f3d-e49783c2039f" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span class="x_x_gmail_signature_prefix">--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr" class="x_x_gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWA75f28132-a30f-58b6-3df1-e32a58adfeab" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br></div></div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div><div style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 934.90625px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, July 17, 2023 6:58 AM<br><b>To:</b><span class="Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; line-break: after-white-space;"><div><br></div> The examples that use DM, in particular DMDA all trivially support using the GPU with -dm_mat_type aijcusparse -dm_vec_type cuda<div><br></div><div><br><div><br><blockquote type="cite"><div>On Jul 17, 2023, at 1:45 AM, Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu">cho@slac.stanford.edu</a>> wrote:</div><br class="x_Apple-interchange-newline"><div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Barry,</div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thank you so much for the clarification.<span class="x_Apple-converted-space"> </span><br></div><div class="x_elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I see that ex104.c and ex300.c use MatXAIJSetPreallocation(). Are there other tutorials available?</div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div class="x_elementToProof x_ContentPasted0" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_appendonsend" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; display: inline-block; width: 934.90625px;"><span style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="x_divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA103f33e8-9dc9-a257-88bf-6ef0cd0e7c88" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Saturday, July 15, 2023 8:36 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWAe1f23b45-1e2a-4264-518d-24ddb42a0547" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA04f6d3b8-7d46-8435-7542-c6947b7d6140" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA4df27f1c-38fc-b7f3-048c-97ad0537a2e8" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; line-break: after-white-space;"><div><br></div> <div> Cho,</div><div><br></div><div> We currently have a crappy API for turning on GPU support, and our documentation is misleading in places. </div><div><br></div><div> People constantly say "to use GPU's with PETSc you only need to use -mat_type aijcusparse (for example)" This is incorrect.</div><div><br></div><div> This does not work with code that uses the convenience Mat constructors such as MatCreateAIJ(), MatCreateAIJWithArrays etc. It only works if you use the constructor approach of MatCreate(), MatSetSizes(), MatSetFromOptions(), MatXXXSetPreallocation(). ... Similarly you need to use VecCreate(), VecSetSizes(), VecSetFromOptions() and -vec_type cuda</div><div><br></div><div> If you use DM to create the matrices and vectors then you can use <span style="font-variant-ligatures: no-common-ligatures;">-</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(180, 36, 25);"><b>dm_mat_type aijcusparse</b></span><span style="font-variant-ligatures: no-common-ligatures;"><span class="x_Apple-converted-space"> </span>-dm_vec_type cuda</span></div><div><br></div><div> Sorry for the confusion.</div><div><br></div><div> Barry</div><div><br></div><div><br></div><div><br><div><br><blockquote type="cite"><div>On Jul 15, 2023, at 8:03 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA6b5b0e84-1862-a6c2-81db-4e7c0e323719" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>> wrote:</div><br class="x_x_Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr">On Sat, Jul 15, 2023 at 1:44 AM Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA1b5a8885-ba0f-1ac6-9640-692769a22f5a" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>> wrote:<br></div><div class="x_x_gmail_quote"><blockquote class="x_x_gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="x_x_msg2927322207553750716"><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Matt,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">After inserting 2 lines in the code:</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"> ierr = MatCreate(PETSC_COMM_WORLD,&A);CHKERRQ(ierr); <span class="x_Apple-converted-space"> </span><br><div> ierr = MatSetFromOptions(A);CHKERRQ(ierr);</div><div> ierr = MatCreateAIJ(PETSC_COMM_WORLD,mlocal,mlocal,m,n,</div><div> d_nz,PETSC_NULL,o_nz,PETSC_NULL,&A);;CHKERRQ(ierr);</div><div><br></div><div>"There are no unused options." However, there is no improvement on the GPU performance.</div></div></div></div></blockquote><div><br></div><div>1. MatCreateAIJ() sets the type, and in fact it overwrites the Mat you created in steps 1 and 2. This is detailed in the manual.</div><div><br></div><div>2. You should replace MatCreateAIJ(), with MatSetSizes() before MatSetFromOptions().</div><div><br></div><div> THanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="x_x_gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="x_x_msg2927322207553750716"><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><div>Thanks,</div><div>Cho<br></div></div><div id="x_x_m_2927322207553750716appendonsend"></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><hr style="display: inline-block; width: 907.546875px;"><div id="x_x_m_2927322207553750716divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA7fdcc7a9-b013-5d5d-02d4-793fee0a07b4" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, July 14, 2023 5:57 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWAbacdf8c3-2fe7-4c79-ebe1-763e8f891c49" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA934fc666-1fa8-30c8-b38a-36dcc7cd707c" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>>; Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA6f37579d-af91-efb1-e956-9a1f602e0ea1" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA8ceebdc3-cfda-8383-9f7b-6612cb2ab1f5" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWAf950e748-bd2c-453f-8f41-027396e9b72f" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div dir="ltr"><div dir="ltr">On Fri, Jul 14, 2023 at 7:57 PM Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA267b2277-6f7e-5657-4ffe-ed1157bf2972" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>> wrote:<br></div><div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I managed to pass the following options to PETSc using a GPU node on Perlmutter.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"> -mat_type aijcusparse -vec_type cuda -log_view -options_left</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Below is a summary of the test using 4 MPI tasks and 1 GPU per task.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">o #PETSc Option Table entries:<div><span> </span>-log_view</div><div><span> </span>-mat_type aijcusparse</div><div> -options_left</div><div> -vec_type cuda</div><div> #End of PETSc Option Table entries</div><div> WARNING! There are options you set that were not used!</div><div> WARNING! could be spelling mistake, etc!</div><div> There is one unused database option. It is:</div><div> Option left: name:-mat_type value: aijcusparse</div><div><br></div><div>The -mat_type option has not been used. In the application code, we use</div><div><br></div><div> ierr = MatCreateAIJ(PETSC_COMM_WORLD,mlocal,mlocal,m,n,<div> d_nz,PETSC_NULL,o_nz,PETSC_NULL,&A);;CHKERRQ(ierr);</div></div></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div></div></div></blockquote><div><br></div><div>If you create the Mat this way, then you need MatSetFromOptions() in order to set the type from the command line.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">o The percent flops on the GPU for KSPSolve is 17%.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">In comparison with a CPU run using 16 MPI tasks, the GPU run is an order of magnitude slower. How can I improve the GPU performance?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556appendonsend"></div><hr style="display: inline-block; width: 889.984375px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA7e1d14b7-89b3-1ec1-c965-76efe2dffe11" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, June 30, 2023 7:57 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWA11864b9f-7a45-d494-1cf7-0afb6b9173cd" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>>; Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA21b488e0-194a-6ca7-2354-d043793a3314" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA1902bbf8-608d-0aeb-f01c-5158083ea787" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA11ce8778-3c19-0bd1-ecf6-d816c905f54b" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA7403216c-eacf-c06e-b321-23262a82d8b0" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Barry, Mark and Matt,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thank you all for the suggestions. I will modify the code so we can pass runtime options.</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_appendonsend"></div><hr style="display: inline-block; width: 889.984375px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev" id="OWAbe079dbf-dcf9-3ff5-f21d-74c8e1daeb51" class="OWAAutoLink" data-loopstyle="linkonly">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Friday, June 30, 2023 7:01 AM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA2a27e049-c5c0-f791-5341-3d804450f6a9" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span>Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA312c876d-c32c-05fa-8dc7-2d52f5c71576" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>>; Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWAf0d2a56e-4cc9-0331-8021-7ace2d1a80a5" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>>;<span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWAdba10dc7-d9e6-c383-bc06-7732fc241663" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA6c5cd04f-f101-546d-6f66-650b7a13f93b" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div><br></div> Note that options like -mat_type aijcusparse -vec_type cuda only work if the program is set up to allow runtime swapping of matrix and vector types. If you have a call to MatCreateMPIAIJ() or other specific types then then these options do nothing but because Mark had you use -options_left the program will tell you at the end that it did not use the option so you will know.<div><br><blockquote type="cite"><div>On Jun 30, 2023, at 9:30 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA4c3abf09-ba97-ba80-02a6-a67e12cb685c" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>> wrote:</div><br><div><div dir="ltr">PetscCall(PetscInitialize(&argc, &argv, NULL, help)); gives us the args and you run:<br><div><br></div><div>a.out -mat_type aijcusparse -vec_type cuda -log_view -options_left</div><div><br></div><div>Mark</div></div><br><div><div dir="ltr">On Fri, Jun 30, 2023 at 6:16 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" id="OWA32632c5a-324b-6c80-baf2-a2eb77067857" class="OWAAutoLink" data-loopstyle="linkonly">knepley@gmail.com</a>> wrote:<br></div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div dir="ltr">On Fri, Jun 30, 2023 at 1:13 AM Ng, Cho-Kuen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" id="OWA90649827-7437-2ef6-fcb2-d6362cffeb9a" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Mark,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">The application code reads in parameters from an input file, where we can put the PETSc runtime options. Then we pass the options to PetscInitialize(...). Does that sounds right?</div></div></div></blockquote><div><br></div><div>PETSc will read command line argument automatically in PetscInitialize() unless you shut it off.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577appendonsend"></div><hr style="display: inline-block; width: 845.0625px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA0f20f968-f385-abd5-580d-67b264825776" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Thursday, June 29, 2023 8:32 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA6606abb3-997e-e6a4-2e6a-6500f2df1c85" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA91589f22-1b88-90ff-4920-b2e2d4adee35" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA62b7a4d5-d56c-923a-0518-d64fc97d2f65" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Mark,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks for the information. How do I put the runtime options for the executable, say, a.out, which does not have the provision to append arguments? Do I need to change the C++ main to read in the options?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577x_appendonsend"></div><hr style="display: inline-block; width: 845.0625px;"><div id="x_x_m_2927322207553750716x_m_-8026140834471843556x_x_m_-2363626647532502450m_5514417947815199577x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="x_Apple-converted-space"> </span>Mark Adams <<a href="mailto:mfadams@lbl.gov" id="OWA6b07df9a-ed47-437f-8dea-6c178e948616" class="OWAAutoLink" data-loopstyle="linkonly">mfadams@lbl.gov</a>><br><b>Sent:</b><span class="x_Apple-converted-space"> </span>Thursday, June 29, 2023 5:55 PM<br><b>To:</b><span class="x_Apple-converted-space"> </span>Ng, Cho-Kuen <<a href="mailto:cho@slac.stanford.edu" id="OWA5f0f23ba-4b22-76a3-6c2d-0986c08aa7ec" class="OWAAutoLink" data-loopstyle="linkonly">cho@slac.stanford.edu</a>><br><b>Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" id="OWA7c36b985-36a5-7567-9247-9a36be343e25" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" id="OWA4aea457e-f910-7a3a-d346-df926ca7cc55" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="x_Apple-converted-space"> </span>Re: [petsc-users] Using PETSc GPU backend</font><div> </div></div><div><div dir="ltr">Run with options: -mat_type aijcusparse -vec_type cuda -log_view -options_left<div><br></div><div>The last column of the performance data (from -log_view) will be the percent flops on the GPU. Check that that is > 0.</div><div><br></div><div>The end of the output will list the options that were used and options that were _not_ used (if any). Check that there are no options left.</div><div><br></div><div>Mark</div></div><br><div><div dir="ltr">On Thu, Jun 29, 2023 at 7:50 PM Ng, Cho-Kuen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" id="OWAece116f1-3577-d79b-cc93-1b86d53850b9" class="OWAAutoLink" data-loopstyle="linkonly">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div dir="ltr"><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">I installed PETSc on Perlmutter using "spack install<span class="x_Apple-converted-space"> </span><span style="background: rgb(255, 255, 255);">petsc+cuda+zoltan</span><span style="background-color: rgb(255, 255, 255);">"<span class="x_Apple-converted-space"> </span></span>and used it by "<span style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; background: rgb(255, 255, 255);">spack load petsc/fwge6pf</span>". Then I compiled the application code (purely CPU code) linking to the petsc package, hoping that I can get performance improvement using the petsc GPU backend. However, the timing was the same using the same number of MPI tasks with and without GPU accelerators. Have I missed something in the process, for example, setting up PETSc options at runtime to use the GPU backend?</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Thanks,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Cho<br></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span>--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWA323b0915-2e7a-609d-173b-0fc3348754d9" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></blockquote></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span>--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWAdbeb21ba-908e-a2c4-8735-2e3b941401d1" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div><span class="x_x_gmail_signature_prefix">--<span class="x_Apple-converted-space"> </span></span><br><div dir="ltr" class="x_x_gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" data-auth="NotApplicable" id="OWAad6f94f0-1588-9c65-992b-643b42f90eda" class="OWAAutoLink" data-loopstyle="linkonly">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br></div></body></html>