<div dir="ltr"><div>I am working on handling very small pivot values for a very small percentage of my matrix (linear Ax = b solution), and I am getting an error that I don't understand when I run the KSPCG solver in parallel.</div><div><br></div><div>KSPCreate(comm, &ksp)</div><div>KSPSetTolerances(ksp, rtol, ...)</div><div>KSPSetType(ksp, KSPCG)</div><div>KSPSetInitialGuessNonzero(ksp, PETSC_TRUE)</div><div>KSPSetFromOptions(ksp)<br></div><div>...</div><div>KSPSetOperators(ksp, V, V)</div><div>...</div><div>KSPSolve(ksp,...)</div><div>KSPGetConvergedReason(ksp, &kspReason)</div><div>if ( kspReason == KSP_DIVERGED_PCSETUP_FAILED ) </div><div> PCGetSetUpFailedReason(pc, &pcReason)</div><div>...</div><div><br></div><div>Default Case (zeropivot is 2.22045E-14):</div><div>mpiexec -n 1 ...</div><div>==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT</div><div><br></div><div>Reduced pivot case, n = 1:</div><div>mpiexec -n 1 ... -pc_factor_zeropivot 1E-15</div><div>==> runs successfully</div><div>
<div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial"><br class="gmail-Apple-interchange-newline">Reduced pivot case, n > 1:</div><div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial">mpiexec -n 2 ... -pc_factor_zeropivot 1E-15</div><div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial">==> <span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>ksp fails due to pcReason = PC_SUBPC_ERROR</span></div><div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial"><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">What does this mean?</span></div><div><br></div>If I use the MUMPS solver and either Cholesky or LU preconditioning instead, it runs fine with any number of MPI ranks, but I'd like to be able to run the CG solver in parallel too.<br class="gmail-Apple-interchange-newline"></div><div><br></div><div>Thanks in advance,</div><div><br></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Matt Overholt</span><br></div><div dir="ltr"><div>CapeSym, Inc.</div><div>(508) 653-7100 x204</div><div><a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com<br></a></div></div></div></div></div></div></div>
<div dir="ltr"><br></div></div>