Fix PETSc unit tests
The MPI unit tests are not run regularly in the CI. Therefore, nobody noticed that they are broken, until now
Problem
mpirun -np 3 ./testrunner --gtest_filter=MPITest*
hangs.
This is probably due to an assertion on one of the MPI ranks terminating that rank and the other ranks still waiting for it.
When I replaced ASSERT...
with EXPECT...
locally, many comparisons were off quite a bit.
How to reproduce
- Build OGS for PETSc (
cmake --preset release-petsc ...
) - run the unit tests with multiple MPI ranks:
mpirun -np 3 ./testrunner --gtest_filter=MPITest*
(alternatively,ninja tests_mpi
might also work, but I don't remember exactly)
Edited by Christoph Lehmann