File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3+ import scorep
34from mpi4py import MPI
45import numpy as np
56import mpi4py
67import instrumentation2
78mpi4py .rc .thread_level = "funneled"
89
10+ scorep .instrumenter .register ()
911
1012comm = mpi4py .MPI .COMM_WORLD
1113
Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ def test_error_region(scorep_env, instrumenter):
233233@requires_package ('numpy' )
234234@foreach_instrumenter
235235def test_mpi (scorep_env , instrumenter ):
236+ trace_path = get_trace_path (scorep_env )
236237 std_out , std_err = call (["mpirun" ,
237238 "-n" ,
238239 "2" ,
@@ -244,6 +245,7 @@ def test_mpi(scorep_env, instrumenter):
244245 "scorep" ,
245246 "--mpp=mpi" ,
246247 "--nocompiler" ,
248+ "--noinstrumenter" ,
247249 "--instrumenter-type=" + instrumenter ,
248250 "cases/mpi.py" ],
249251 env = scorep_env )
@@ -253,6 +255,13 @@ def test_mpi(scorep_env, instrumenter):
253255 assert re .search (r'\[Score-P\] [\w/.: ]*MPI_THREAD_FUNNELED' , std_err )
254256 assert re .search (expected_std_out , std_out )
255257
258+ std_out , std_err = call (["otf2-print" , trace_path ])
259+
260+ assert std_err == ""
261+ for func in ('instrumentation2:bar' , 'instrumentation2:baz' ):
262+ for event in ('ENTER' , 'LEAVE' ):
263+ assert re .search ('%s[ ]*[0-9 ]*[0-9 ]*Region: "%s"' % (event , func ), std_out )
264+
256265
257266@foreach_instrumenter
258267def test_call_main (scorep_env , instrumenter ):
You can’t perform that action at this time.
0 commit comments