Skip to content

Commit d031a2a

Browse files
committed
tests: Reinstate testing parameters for adjoint
1 parent f55abc3 commit d031a2a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

devito/mpi/routines.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ def _call_remainder(self, remainder):
744744
class Basic2HaloExchangeBuilder(BasicHaloExchangeBuilder):
745745

746746
"""
747-
A BasicHaloExchangeBuilder making use of pre-allocated buffers.
747+
A BasicHaloExchangeBuilder making use of pre-allocated buffers for
748+
message size.
748749
749750
Generates:
750751

tests/test_mpi.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2645,12 +2645,12 @@ def run_adjoint_F(self, nd):
26452645
preset='layers-isotropic', dtype=np.float64)
26462646
# Run forward operator
26472647
rec, u, _ = solver.forward()
2648-
# printf(norm(u))
26492648
assert np.isclose(norm(u) / Eu, 1.0)
26502649
assert np.isclose(norm(rec) / Erec, 1.0)
26512650

26522651
# Run adjoint operator
26532652
srca, v, _ = solver.adjoint(rec=rec)
2653+
26542654
assert np.isclose(norm(v) / Ev, 1.0)
26552655
assert np.isclose(norm(srca) / Esrca, 1.0)
26562656

@@ -2659,8 +2659,9 @@ def run_adjoint_F(self, nd):
26592659
term2 = norm(rec)**2
26602660
assert np.isclose((term1 - term2)/term1, 0., rtol=1.e-10)
26612661

2662-
@pytest.mark.parametrize('nd', [3])
2663-
@pytest.mark.parallel(mode=[(4, 'basic2')])
2662+
@pytest.mark.parametrize('nd', [1, 2, 3])
2663+
@pytest.mark.parallel(mode=[(4, 'basic'), (4, 'basic2'), (4, 'diag'),
2664+
(4, 'overlap'), (4, 'overlap2'), (4, 'full')])
26642665
def test_adjoint_F(self, nd):
26652666
self.run_adjoint_F(nd)
26662667

0 commit comments

Comments
 (0)