This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Unable to solve my problem with CG solver in parallel

+2 votes

I'm solving a diffussion type equation. In serial, everything works fine and using

solve(A, *u.vector(), b, "cg", "sor");

but with MPI, the error occurs:

*** -------------------------------------------------------------------------
*** Error: Unable to solve linear system using PETSc Krylov solver.
*** Reason: Solution failed to converge in 0 iterations (PETSc reason DIVERGED_NANORINF, residual norm ||r|| = nan).
*** Where: This error was encountered inside PETScKrylovSolver.cpp.
*** Process: 2


*** DOLFIN version: 1.3.0
*** Git changeset:
*** -------------------------------------------------------------------------

I know the program works perfectly fine (in serial) but I'd like to know what I could try to fix the problem occuring when using MPI. What could be the likely cause and what are possible solutions I can try.

Thank you.

NB: Strangely enough, it works in parallel with the default lu solver.

asked Feb 12, 2014 by gennadiy FEniCS Novice (590 points)
edited Feb 12, 2014 by gennadiy
...