Closed LecrisUT closed 8 months ago
For your case I would suggest to set the number of ranks via -DTEST_MPI_RANKS
. As you said there is not a clean solution for this problem, but please let us know if you can find something. Note that tests are really meant to check correctness and not performance.
For example, if you have
ctest -j 2
, there will be 2 tests running in parallel. But the auto calculation gets the maximum number of processors throughProcessorCount
and defines it statically to be used inmpiexec
. This leads to the cores being oversubscribed and potentially switching between the tests.https://github.com/cp2k/dbcsr/blob/579110dc00580dcdc06d3beef31bccd0378cf1dc/tests/CMakeLists.txt#L3-L7
On the cmake side, I am not sure if there is clear way to define this. The documentation is a bit vague on how to design this. Maybe there is some internal handling when using the
PROCESSORS
property. This should be investigated with the cmake team (discussion).