Skip to content

add warning about default test order causing problems with MPI - #3192

Open
kbthomp1 wants to merge 2 commits into
catchorg:develfrom
kbthomp1:warn-users-test-order-MPI
Open

add warning about default test order causing problems with MPI#3192
kbthomp1 wants to merge 2 commits into
catchorg:develfrom
kbthomp1:warn-users-test-order-MPI

Conversation

@kbthomp1

Copy link
Copy Markdown

Summary

This adds a warning in the documentation about the default (random) test order of execution possibly causing issues for MPI programs using Catch2 after version 3.9.1.

We recently update Catch2 from version 3.1.0 to the 3.15.1, and we were surprised that our tests started encountering MPI deadlock due the default test execution being changed to random. The fix is simple (use --lex or another non-default ordering option), but a google search was unhelpful. I hope that including this warning in the documentation helps improve the visibility of the fix.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.16%. Comparing base (0aeb818) to head (0a4a310).
⚠️ Report is 10 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3192      +/-   ##
==========================================
- Coverage   91.27%   91.16%   -0.11%     
==========================================
  Files         204      206       +2     
  Lines        8973     9016      +43     
==========================================
+ Hits         8190     8219      +29     
- Misses        783      797      +14     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread docs/command-line.md Outdated
> [!WARNING]
> You should not use this option when launching Catch2 tests on multiples processes that require synchronous communication,
> (e.g., Message Passing Interface (MPI) code),
> because the test order of execution will **not** be indentical on all processes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Suggested change
> because the test order of execution will **not** be indentical on all processes.
> because the test order of execution will **not** be identical on all processes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks.

@horenmar horenmar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning is fine, but the overall text is wrong; you do want the option with MPI and friends, but using a fixed seed... or use the --order option.

Also I suggest implementing a stronger warning than just in docs, similar to here: 0aeb818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants