diff --git a/devito/__init__.py b/devito/__init__.py index c44cd4c16d..1ba848d621 100644 --- a/devito/__init__.py +++ b/devito/__init__.py @@ -50,6 +50,7 @@ def reinit_compiler(val): """ configuration['compiler'].__init__(suffix=configuration['compiler'].suffix, mpi=configuration['mpi']) + return val # Setup target platform and compiler diff --git a/devito/logger.py b/devito/logger.py index 2a7eed95a6..0ca9ec6aea 100644 --- a/devito/logger.py +++ b/devito/logger.py @@ -56,6 +56,8 @@ def _set_log_level(level): logger.setLevel(level) + return level + def set_log_level(level, comm=None): """ diff --git a/devito/parameters.py b/devito/parameters.py index e63d147058..a30e17eade 100644 --- a/devito/parameters.py +++ b/devito/parameters.py @@ -239,7 +239,7 @@ def __enter__(self, condition=True, **params): self.previous = {} for k, v in self.params.items(): self.previous[k] = configuration[k] - configuration.update(k, v) + configuration[k] = v def __exit__(self, exc_type, exc_val, exc_tb): for k, v in self.params.items():