*** PETSC Solver failed to converge *** in parallel mode (TOUOGH3_v1.12- EOS1)
Hi,
I have a problem with code parallelization. The code runs smoothly on my laptop, but as soon as I move to the HPC and use multiple processors, it says *** PETSC Solver failed to converge ***. Due to this, the time step in the simulation does not increase, and the simulation time progresses very slowly (I am planning to simulate around 20 years).
I am using EOS1 (not anticipating the phase change) and have one source term element (defined flow rate and inlet temperature) and another sink element (defined flow rate, with temperature as the variable of interest). On my laptop with the serial model, the time steps are large, but the simulation is slow due to single-core usage. In contrast, on the HPC, the time step barely exceeds 500 s.
When switching from a single-core to a multi-core solver, I modify the INFILE with SOLVR(MATSLV) = 8
and include the .petscrc
file in the working folder, which contains:
-ksp_type bcgs
-pc_type bjacobi
-ksp_rtol 1e-5
-ksp_max_it 1000
-ksp_monitor
I have tried adjusting the max_it
and rtol
values as well, but without success. Any feedback would be appreciated.
2 replies
-
The problem is partly solved by using following as the details of .petscrc file:
#-info
#-ksp_monitor_true_residual
-ksp_type bicg
#-pc_type asm
#-sub_pc_type lu
-ksp_rtol 1e-7
But, still time steps are not higher as experienced with a single processor, but considerably higher than the previous scheme. If someone has suggestion to improve it even further, feel free to add here. Thanks -
In most case, following combination is good for TOUGH MPI simulation:
Solving method: BiCGSTAB
Preconditioner: Block Jacobi
Convergence criterion: 1.0e-6
maximum iteration: 300
PETSC does not support parallel ILU, if you did not install HYPRE with PETSC.