From 871061d68e33de220214abb23c2f2af6324766ac Mon Sep 17 00:00:00 2001 From: Mathias Louboutin Date: Wed, 26 Jan 2022 06:17:01 -0500 Subject: [PATCH] CI: mpi, clear devito cache before run --- .github/workflows/pytest-core-mpi.yml | 1 + devito/types/sparse.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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)