How to improve the computing speed of a THM model on OGS6?

Hi @Rui_Feng,
from looking at the input file, there are 2 main things you can do:

  • time stepping: not sure about the behavior of your problem, but having I look at how many linear steps are needed for the nonlinear solver to converge over time could help to gain some insight. An adaptive time stepping scheme like iteration number based time stepping could improve the time discretization in the right manner. With adaptive time stepping you can also reduce the maximum number of nonlinear steps further.
  • The linear solver: Here you have a lot of options in theory. Nevertheless, most of the options require some effort to get them working. If you want to stick with Eigen as library, SparseLU is the only direct solver that works out of the box. Its main disadvantage is that it is not parallelized. If you compile OGS with MKL you can use PardisoLU which is a parallelized direct solver (here are some hints if you run into trouble: PardisoLU fails with unspecific message - #13 by joergbuchwald, and I would also suggest to switch off scaling for Pardiso as it leads sometimes into more trouble). This should work quite well for your problem size(~30000 nodes). Alternatively, you could also try an iterative solver like BiCGSTAB which works also out-of-the-box and is parallelized together with DIAGONAL preconditioning. However, it depends very much on the problem whether the solver converges. You could also try to precondition BiCGSTAB with ILUT and scaling switched on to achieve sometimes better convergence.
    Unfortunately, ILUT is not parallelized, but it might be faster than SparseLU.
    With PETSc or LIS libraries you will have even more possibilities, and you could also make use of MPI parallelization (However I suspect no big advantages for your problem size).
1 Like