Skip to content

Commit

Permalink
misc: Harmonise configuration callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ccuetom committed Aug 1, 2023
1 parent 2eff80e commit 96c1361
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions devito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions devito/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def _set_log_level(level):

logger.setLevel(level)

return level


def set_log_level(level, comm=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion devito/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 96c1361

Please sign in to comment.