diff --git a/devito/operator/operator.py b/devito/operator/operator.py index fa4db73c1f..406f3bdeb9 100644 --- a/devito/operator/operator.py +++ b/devito/operator/operator.py @@ -896,6 +896,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) @@ -999,6 +1000,10 @@ def lower_perfentry(v): 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