I'm solving $Ax = b$ with PETSc, $A$ sparse and asymmetric.
I'm using BCGS or FGMRES or TFQMR as a solver, and ILU as a preconditioner.
When I use 1 core, everything works as expected. But with 8 cores, no,
I get -5, KSP_DIVERGED_BREAKDOWN
, or maximum number of iterations exceeded
.
What could be wrong? I am pretty sure my code is correct.