Skip to content

Commit

Permalink
tests: Reinstate testing parameters for adjoint
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Feb 10, 2024
1 parent b4429a4 commit 024e82b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion devito/mpi/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ def _call_remainder(self, remainder):
class Basic2HaloExchangeBuilder(BasicHaloExchangeBuilder):

"""
A BasicHaloExchangeBuilder making use of pre-allocated buffers.
A BasicHaloExchangeBuilder making use of pre-allocated buffers for
message size.
Generates:
Expand Down
7 changes: 4 additions & 3 deletions tests/test_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2643,12 +2643,12 @@ def run_adjoint_F(self, nd):
preset='layers-isotropic', dtype=np.float64)
# Run forward operator
rec, u, _ = solver.forward()
# printf(norm(u))
assert np.isclose(norm(u) / Eu, 1.0)
assert np.isclose(norm(rec) / Erec, 1.0)

# Run adjoint operator
srca, v, _ = solver.adjoint(rec=rec)

assert np.isclose(norm(v) / Ev, 1.0)
assert np.isclose(norm(srca) / Esrca, 1.0)

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

@pytest.mark.parametrize('nd', [3])
@pytest.mark.parallel(mode=[(4, 'basic2')])
@pytest.mark.parametrize('nd', [1, 2, 3])
@pytest.mark.parallel(mode=[(4, 'basic'), (4, 'basic2'), (4, 'diag'),
(4, 'overlap'), (4, 'overlap2'), (4, 'full')])
def test_adjoint_F(self, nd):
self.run_adjoint_F(nd)

Expand Down

0 comments on commit 024e82b

Please sign in to comment.