diff --git a/devito/mpi/distributed.py b/devito/mpi/distributed.py index a0479b3032..4b7ec1662b 100644 --- a/devito/mpi/distributed.py +++ b/devito/mpi/distributed.py @@ -259,8 +259,10 @@ def __init__(self, shape, dimensions, input_comm=None, topology=None): self._topology = tuple(1 for _ in range(len(shape))) # The domain decomposition - self._decomposition = [Decomposition(np.array_split(range(i), j), c) - for i, j, c in zip(shape, self.topology, self.mycoords)] + self._decomposition = [ + Decomposition(np.array_split(np.arange(i, dtype=d.dtype), j), c) + for i, j, c, d in zip(shape, self.topology, self.mycoords, dimensions) + ] @property def comm(self):