Skip to content

Commit

Permalink
CI: leftover parallel mark missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout authored and FabioLuporini committed May 29, 2024
1 parent 0512906 commit 35aea7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion devito/types/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def __indices_setup__(cls, *args, **kwargs):
else:
sparse_dim = Dimension(name='p_%s' % kwargs["name"])

dimensions = as_tuple(kwargs.get('dimensions', sparse_dim))
dimensions = as_tuple(kwargs.get('dimensions'))
if not dimensions:
dimensions = (sparse_dim,)

if args:
return tuple(dimensions), tuple(args)
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def test_min_max_sparse(self):
assert np.isclose(term1/term2 - 1, 0.0, rtol=0.0, atol=1e-5)

@pytest.mark.parallel(mode=4)
def test_min_max_mpi(self):
def test_min_max_mpi(self, mode):
grid = Grid(shape=(100, 100))

f = Function(name='f', grid=grid)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_error_checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_stability(expr):

@switchconfig(safe_math=True)
@pytest.mark.parallel(mode=2)
def test_stability_mpi():
def test_stability_mpi(mode):
grid = Grid(shape=(10, 10))

f = Function(name='f', grid=grid, space_order=2) # noqa
Expand Down
7 changes: 5 additions & 2 deletions tests/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ def test_rebuild(self, sptype):

# Rebuild with different name as an alias
sp2 = sp._rebuild(name="sr2", alias=True)
assert sp2.name == "sr2"
assert sp2.dimensions == sp.dimensions
for subf in sp2._sub_functions:
if getattr(sp2, subf) is not None:
assert getattr(sp2, subf).name.startswith("sr2_")
Expand All @@ -434,10 +436,11 @@ def test_rebuild(self, sptype):
# Rebuild with different name and dimensions. This is expected to recreate
# the SubFunctions as well
sp2 = sp._rebuild(name="sr3", dimensions=None)
assert sp2.name == "sr3"
assert sp2.dimensions == sp.dimensions
for subf in sp2._sub_functions:
if getattr(sp2, subf) is not None:
assert getattr(sp2, subf).name.startswith("sr3_")
assert np.all(getattr(sp2, subf).data == 0)
assert getattr(sp2, subf) == getattr(sp, subf)

@pytest.mark.parametrize('sptype', _sptypes)
def test_subs(self, sptype):
Expand Down

0 comments on commit 35aea7c

Please sign in to comment.