Skip to content

Commit

Permalink
Mod to mpi_array.local_test.LndarrayTest.test_views_2d unit test to g…
Browse files Browse the repository at this point in the history
…ive more informative failure output.
  • Loading branch information
Shane-J-Latham committed Jun 4, 2017
1 parent d5cd48d commit 4384ec1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mpi_array/local_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_views_2d(self):
and :meth:`mpi_array.local.lndarray.rank_view_h`.
"""

lshape = _np.array((10, 17, 6), dtype="int64")
lshape = _np.array((4, 3), dtype="int64")
gshape = lshape * _shape_factors(_mpi.COMM_WORLD.size, lshape.size)
decomp = CartesianDecomposition(shape=gshape, halo=2)

Expand All @@ -271,8 +271,9 @@ def test_views_2d(self):
lary.decomp.shared_mem_comm.barrier()
if lary.decomp.shared_mem_comm.size > 1:
self.assertTrue(_np.any(lary.rank_view_h != lary.decomp.rank_comm.rank))
self.assertTrue(
_np.all(lary.rank_view_h[lary.decomp.rank_view_relative_slice_n] == lary.rank_view_n)
self.assertSequenceEqual(
lary.rank_view_h[lary.decomp.rank_view_relative_slice_n].tolist(),
lary.rank_view_n.tolist()
)


Expand Down

0 comments on commit 4384ec1

Please sign in to comment.