diff --git a/devito/operator/operator.py b/devito/operator/operator.py index 145810077ee..4df1d2805b6 100644 --- a/devito/operator/operator.py +++ b/devito/operator/operator.py @@ -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) @@ -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