<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, Jun 23, 2018 at 4:37 AM Najeeb Ahmad <<a href="mailto:nahmad16@ku.edu.tr">nahmad16@ku.edu.tr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying to solve a
<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">64008000</span> x
<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">64008000</span> system using PETSc. The problem I am facing is that I am getting a very large iteration count for the first solution (order of thousands). For the subsequent soluitons, the iteration count is less. For instance, here is the iteration count for the first solution when my code is run on 32 processes.</div><div><br></div><div>...</div><div>2772 KSP Residual norm 1.198554448053e-07</div><div>2773 KSP Residual norm 1.190214006391e-07</div><div>2774 KSP Residual norm 1.181931531360e-07</div><div>2775 KSP Residual norm 1.173706620648e-07</div><div>2776 KSP Residual norm 1.165538874733e-07</div><div>2777 KSP Residual norm 1.157427896857e-07</div><div>2778 KSP Residual norm 1.149373293013e-07</div><div>2779 KSP Residual norm 1.141374671925e-07</div><div>2780 KSP Residual norm 1.133431645025e-07</div><div>Line<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ar solve converged due to CONVERGED_RTOL iterations 2780</span> </div><div><br></div><div>For the subsequent solutions, the iteration count is as follows:</div><div>...</div><div>116 KSP Residual norm 2.657138978992e-04</div><div>117 KSP Residual norm 2.767485246885e-04</div><div>118 KSP Residual norm 2.071574619161e-04</div><div>119 KSP Residual norm 2.273562103015e-04</div><div>120 KSP Residual norm 1.693847273193e-04</div><div>121 KSP Residual norm 1.803833437167e-04</div><div>122 KSP Residual norm 1.443434809819e-04</div><div>123 KSP Residual norm 1.390878278231e-04</div><div>124 KSP Residual norm 1.247521972621e-04</div><div>125 KSP Residual norm 1.059224678494e-04</div><div>Linear solve converged due to CONVERGED_RTOL iterations 125</div><div><br></div><div>The solver setup for my code is as follows:<br></div><div><br></div><div><div> ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);CHKERRQ(ierr);</div><div> ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr);</div><div> ierr = KSPSetType(ksp, KSPCG);CHKERRQ(ierr);</div><div> ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);</div><div> ierr = PCSetType(pc, PCJACOBI);</div><div> ierr = KSPSetFromOptions(ksp);CHKERRQ(ierr);</div><div> ierr = KSPSetUp(ksp);CHKERRQ(ierr);</div><div><br></div><div>and the command line for running the code is:</div><div><div>mpiexec -n 32 ./main -mat_type mpiaij -ksp_atol 1E-7 -ksp_rtol 1E-7 -ksp_converged_reason -ksp_monitor</div></div></div></div></blockquote><div><br></div><div>What equation are you trying to solve. CG/Jacobi is a scalable solver for the mass matrix (identity), but</div><div>not much else.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Any help is highly appreciated.</div><div><br></div><div><br></div>-- <br><div dir="ltr" class="m_1948627481110266386gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div></div><font size="2"><b><span style="color:rgb(7,55,99)"><i>Najeeb Ahmad</i></span></b></font></div><div><font size="2"><b><font color="#073763"><i><br></i></font></b></font><div dir="ltr" style="font-size:small"><div><font size="2"><b><span style="color:rgb(120,63,4)">Research and Teaching Assistant</span><br></b></font></div><div><font size="2"><b><font color="#000000">PARallel and MultiCORE Computing Laboratory (ParCoreLab)</font><span style="color:rgb(120,63,4)"> </span></b></font></div><font size="2"><b>Computer Science and Engineering<br></b></font></div><div style="font-size:small"><font size="2"><b>Koç University, Istanbul, Turkey</b></font></div></div></div></div><div><font size="2"><b><br></b></font></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div>