Skip to content

Commit

Permalink
mpi: Restore logging after perf results are emitted
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Sep 18, 2023
1 parent 97b9804 commit 433c504
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ def _emit_apply_profiling(self, args):
"""Produce a performance summary of the profiled sections."""

# In case 'MPI0' is selected for logging, restrict result printing to one rank
temp = configuration['log-level']
if configuration['mpi']:
set_log_level(configuration['log-level'], comm=args.comm)

Expand Down Expand Up @@ -972,6 +973,10 @@ def _emit_apply_profiling(self, args):
else:
perf("Performance[mode=%s] arguments: %s" % (self._mode, perf_args))

# Restore logging configuration to all ranks
if configuration['mpi']:
set_log_level(temp, comm=None)

return summary

# Pickling support
Expand Down

0 comments on commit 433c504

Please sign in to comment.