diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b48cbd292ff479d590be5c2749e8778f14cf576..c3e06ca08d40557cd2c50e10ea47ac201dcaccab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,8 +33,8 @@ test_python2_with_coverage: stage: test script: - python setup.py install --user -f - - mpiexec -n 2 --bind-to none nosetests -q --with-coverage --cover-package=nifty4 --cover-branches --cover-erase 2> /dev/null - - nosetests -q --with-coverage --cover-package=nifty4 --cover-branches 2> /dev/null + - mpiexec -n 2 --bind-to none nosetests -q --with-coverage --cover-package=nifty4 --cover-erase 2> /dev/null + - nosetests -q --with-coverage --cover-package=nifty4 2> /dev/null - > coverage report --omit "*plotting*" - > diff --git a/nifty4/data_objects/distributed_do.py b/nifty4/data_objects/distributed_do.py index b0ed4a9bf954d51d3b0d19f0ea6e26387ef605a1..fb238e3a5f85b1f0493802a2a0c74fa2bdd74504 100644 --- a/nifty4/data_objects/distributed_do.py +++ b/nifty4/data_objects/distributed_do.py @@ -59,32 +59,32 @@ class data_object(object): self._distaxis = distaxis self._data = data - def _sanity_checks(self): - # check whether the distaxis is consistent - if self._distaxis < -1 or self._distaxis >= len(self._shape): - raise ValueError - itmp = np.array(self._distaxis) - otmp = np.empty(ntask, dtype=np.int) - _comm.Allgather(itmp, otmp) - if np.any(otmp != self._distaxis): - raise ValueError - # check whether the global shape is consistent - itmp = np.array(self._shape) - otmp = np.empty((ntask, len(self._shape)), dtype=np.int) - _comm.Allgather(itmp, otmp) - for i in range(ntask): - if np.any(otmp[i, :] != self._shape): - raise ValueError - # check shape of local data - if self._distaxis < 0: - if self._data.shape != self._shape: - raise ValueError - else: - itmp = np.array(self._shape) - itmp[self._distaxis] = _shareSize(self._shape[self._distaxis], - ntask, rank) - if np.any(self._data.shape != itmp): - raise ValueError +# def _sanity_checks(self): +# # check whether the distaxis is consistent +# if self._distaxis < -1 or self._distaxis >= len(self._shape): +# raise ValueError +# itmp = np.array(self._distaxis) +# otmp = np.empty(ntask, dtype=np.int) +# _comm.Allgather(itmp, otmp) +# if np.any(otmp != self._distaxis): +# raise ValueError +# # check whether the global shape is consistent +# itmp = np.array(self._shape) +# otmp = np.empty((ntask, len(self._shape)), dtype=np.int) +# _comm.Allgather(itmp, otmp) +# for i in range(ntask): +# if np.any(otmp[i, :] != self._shape): +# raise ValueError +# # check shape of local data +# if self._distaxis < 0: +# if self._data.shape != self._shape: +# raise ValueError +# else: +# itmp = np.array(self._shape) +# itmp[self._distaxis] = _shareSize(self._shape[self._distaxis], +# ntask, rank) +# if np.any(self._data.shape != itmp): +# raise ValueError @property def dtype(self):