From 433c50406a0b747f87ccb9aaa4428d6f0d585d53 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Mon, 18 Sep 2023 14:30:02 +0100 Subject: [PATCH] mpi: Restore logging after perf results are emitted --- devito/operator/operator.py | 5 +++++ 1 file changed, 5 insertions(+) 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