Skip to content

Commit 2327423

Browse files
authored
Fix spurious MPI test failure (#103)
It can happen that the output of the numpy array from each rank and its output from the bar/baz function get interleaved. However the current test checks for contiguous output These new checks are better: - They also check for the rank - They don't require a specific order - They fix a small issue with the regex which allowed any character for the dot
1 parent 8639243 commit 2327423

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/test_scorep.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,11 @@ def test_mpi(scorep_env, instrumenter):
250250
"cases/mpi.py"],
251251
env=scorep_env)
252252

253-
expected_std_out = r"\[0[0-9]\] \[0. 1. 2. 3. 4.\]\n\[0[0-9]] \[0. 1. 2. 3. 4.\]\n"
254-
255253
assert re.search(r'\[Score-P\] [\w/.: ]*MPI_THREAD_FUNNELED', std_err)
256-
assert re.search(expected_std_out, std_out)
254+
assert '[00] [0. 1. 2. 3. 4.]\n' in std_out
255+
assert '[01] [0. 1. 2. 3. 4.]\n' in std_out
256+
assert 'bar\n' in std_out
257+
assert 'baz\n' in std_out
257258

258259
std_out, std_err = call(["otf2-print", trace_path])
259260

0 commit comments

Comments
 (0)