Skip to content

Commit

Permalink
mpi: Cast MPI={1,True,basic} to MPI=basic for homogeneity
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Sep 10, 2024
1 parent f314991 commit eab3579
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion devito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def reinit_compiler(val):
deprecate='openmp')

# MPI mode (0 => disabled, 1 == basic)
preprocessor = lambda i: bool(i) if isinstance(i, int) else i
preprocessor = lambda i: {0: False, 1: 'basic'}.get(i, i)
configuration.add('mpi', 0, [0, 1] + list(mpi_registry),
preprocessor=preprocessor, callback=reinit_compiler)

Expand Down
1 change: 0 additions & 1 deletion devito/mpi/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,6 @@ def _call_poke(self, poke):


mpi_registry = {
True: BasicHaloExchangeBuilder,
'basic': BasicHaloExchangeBuilder,
'diag': DiagHaloExchangeBuilder,
'diag2': Diag2HaloExchangeBuilder,
Expand Down

0 comments on commit eab3579

Please sign in to comment.