From 78c27ce667ce974b31984f4a48e59e949ce9031b Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Mon, 17 Jun 2024 10:41:50 +0000 Subject: [PATCH 1/3] mpi: Avoid UnboundLocalVariable error --- devito/data/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devito/data/data.py b/devito/data/data.py index ca18006331..69bfbe80c6 100644 --- a/devito/data/data.py +++ b/devito/data/data.py @@ -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 From ece1d19a744194b587e462a32d51e058d40c60e8 Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Mon, 17 Jun 2024 10:50:17 +0000 Subject: [PATCH 2/3] misc: pep8 happiness --- tests/test_adjoint.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_adjoint.py b/tests/test_adjoint.py index 90e4c2a32b..f5f89de22e 100644 --- a/tests/test_adjoint.py +++ b/tests/test_adjoint.py @@ -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): """ From 93acdf6152e462cde6b29744c0db6a01bebc7edc Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Mon, 17 Jun 2024 11:06:58 +0000 Subject: [PATCH 3/3] reqs: Enforcing numpy<2.0 for now --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 61a9636de7..6865109d16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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