diff --git a/devito/operator/operator.py b/devito/operator/operator.py index 73cf07f8e46..563c0f37554 100644 --- a/devito/operator/operator.py +++ b/devito/operator/operator.py @@ -8,7 +8,7 @@ from devito.arch import compiler_registry, platform_registry from devito.data import default_allocator from devito.exceptions import InvalidOperator -from devito.logger import debug, info, perf, warning, is_log_enabled_for +from devito.logger import debug, info, perf, warning, is_log_enabled_for, set_log_level from devito.ir.equations import LoweredEq, lower_exprs from devito.ir.clusters import ClusterGroup, clusterize from devito.ir.iet import (Callable, CInterface, EntryFunction, FindSymbols, MetaCall, @@ -869,6 +869,11 @@ def _emit_timings(timings, indent=''): 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 + if configuration['mpi']: + set_log_level(configuration['log-level'], comm=args.comm) + # Rounder to 2 decimal places fround = lambda i: ceil(i * 100) / 100