Skip to content

Commit d8a9f97

Browse files
committed
ParallelIOTests: Ensure that all ranks share the same RNG seed
Catch2 v3 randomizes the execution order
1 parent 25d6443 commit d8a9f97

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/CatchRunner.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ int main(int argc, char *argv[])
2828
MPI_Init(&argc, &argv);
2929

3030
Catch::Session session;
31+
// session.configData().runOrder = Catch::TestRunOrder::Declared;
32+
MPI_Bcast(
33+
&session.configData().rngSeed, 1, MPI_UINT32_T, 0, MPI_COMM_WORLD);
3134
int result = session.applyCommandLine(argc, argv);
3235
if (result == 0)
3336
{

0 commit comments

Comments
 (0)