Skip to content

Commit

Permalink
Merge pull request #2386 from devitocodes/workaround-mystery
Browse files Browse the repository at this point in the history
mpi: Avoid UnboundLocalVariable error
  • Loading branch information
mloubout committed Jun 17, 2024
2 parents 38c1709 + 93acdf6 commit 210f899
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions devito/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def wrapper(data, *args, **kwargs):
if isinstance(i, slice) and i.step is not None and i.step < 0:
comm_type = index_by_index
break
else:
comm_type = serial
else:
comm_type = serial
else:
comm_type = serial
kwargs['comm_type'] = comm_type
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip>=9.0.1
numpy>1.16
numpy>1.16,<2.0
sympy>=1.9,<1.13
psutil>=5.1.0,<6.0
py-cpuinfo<10
Expand Down
16 changes: 8 additions & 8 deletions tests/test_adjoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ class TestAdjoint:
('layers-viscoacoustic', (20, 25), 'maxwell', 4, 2, viscoacoustic_setup),
('layers-viscoacoustic', (20, 25), 'maxwell', 2, 2, viscoacoustic_setup),
# 3D Deng Mcmechan Viscoacoustic tests with varying space and equation orders
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 4, 1, \
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 2, 1, \
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 4, 2, \
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 2, 2, \
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 4, 1,
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 2, 1,
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 4, 2,
viscoacoustic_setup),
('layers-viscoacoustic', (20, 25, 20), 'maxwell', 2, 2,
viscoacoustic_setup),
])
def test_adjoint_F(self, mkey, shape, kernel, space_order, time_order, setup_func):
"""
Expand Down

0 comments on commit 210f899

Please sign in to comment.