diff --git a/.github/workflows/pytest-core-mpi.yml b/.github/workflows/pytest-core-mpi.yml index 01ef13a065..1a0d977bbe 100644 --- a/.github/workflows/pytest-core-mpi.yml +++ b/.github/workflows/pytest-core-mpi.yml @@ -41,6 +41,7 @@ jobs: - name: Test with pytest run: | + python3 scripts/clear_devito_cache.py python3 -m pytest --cov --cov-config=.coveragerc --cov-report=xml -m parallel tests/ - name: Upload coverage to Codecov diff --git a/devito/types/sparse.py b/devito/types/sparse.py index 7144f74e6a..121678f674 100644 --- a/devito/types/sparse.py +++ b/devito/types/sparse.py @@ -169,7 +169,8 @@ def _dist_gather_mask(self, dmap=None): ret = list(self._dist_scatter_mask(dmap=dmap)) mask = ret[self._sparse_position] inds = np.unique(mask, return_index=True)[1] - ret[self._sparse_position] = inds.tolist() + inds.sort() + ret[self._sparse_position] = [mask[i] for i in inds] return tuple(ret)