diff --git a/devito/mpi/distributed.py b/devito/mpi/distributed.py index 93b808445cb..93e9072d01e 100644 --- a/devito/mpi/distributed.py +++ b/devito/mpi/distributed.py @@ -8,6 +8,7 @@ import numpy as np from cgen import Struct, Value +from devito.logger import set_log_level from devito.data import LEFT, CENTER, RIGHT, Decomposition from devito.parameters import configuration from devito.tools import EnrichedTuple, as_tuple, ctypes_to_cstr, filter_ordered diff --git a/devito/operator/operator.py b/devito/operator/operator.py index 3b5993d6469..3cff0788cd0 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, @@ -865,6 +865,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