<div dir="ltr"><div>Dear PETSC Users,</div><div><br></div><div>I tried to use a Cholesky factor (MUMPS results) as a preconditioner for KSPSolve(). An example code is pasted below. When the code runs, the log file indicates that Job=3 (i.e. backward/forward substitution) of MUMPS is called every time inside the loop. Is there anyway to avoid JOB=3 of MUMPS and use the factor as a pure preconditioner for the CG solver inside KSPSOLVE()? On my cluster, JOB=3 shows unexpected slow performance (see Vol72, Issue 35) and should be avoided. In advance, thanks for your help.</div><div><br></div><div>Regards,</div><div>Evan<br></div><div><br></div><div><br></div><div><div>Code:</div><div>KSPCreate(PETSC_COMM_WORLD, &ksp_fetd_dt);<br>KSPSetOperators(ksp_fetd_dt, A_dt, A_dt);<br>KSPSetType (ksp_fetd_dt, KSPPREONLY);<br>KSPGetPC(ksp_fetd_dt, &pc_fetd_dt);<br>MatSetOption(A_dt, MAT_SPD, PETSC_TRUE);<br>PCSetType(pc_fetd_dt, PCCHOLESKY);<br>PCFactorSetMatSolverPackage(pc_fetd_dt, MATSOLVERMUMPS);<br>PCFactorSetUpMatSolverPackage(pc_fetd_dt);<br>PCFactorGetMatrix(pc_fetd_dt, &F_dt);</div><div>MatMumpsSetIcntl(F_dt, 4, 1); // Turn on MUMPS's log file.<br>KSPSetType(ksp_fetd_dt, KSPCG); <br>KSPSetTolerances(ksp_fetd_dt, 1e-9, 1.0e-50, 1.0e10, ksp_iter);<br></div><div>for (int i=0; i<1000; i++) {<br>// Create a new RHS vector B_dt<br>KSPSolve(ksp_fetd_dt,B_dt,solution); <br>// Output solution time=time2-time1;<br>} </div></div></div>