Skip to content

Commit 4a646d0

Browse files
committed
size_of(DistArray) produces different results for differnt number of ranks, adjust the unit test
1 parent a211c68 commit 4a646d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/dist_array.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,10 @@ BOOST_AUTO_TEST_CASE(size_of) {
10001000

10011001
auto sz0 = TiledArray::size_of<MemorySpace::Host>(array);
10021002
world.gop.sum(sz0);
1003-
BOOST_REQUIRE(sz0 == 56688);
1003+
if (world.size() == 1)
1004+
BOOST_REQUIRE(sz0 == 56688);
1005+
else
1006+
BOOST_REQUIRE(sz0 > 56688);
10041007
}
10051008

10061009
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)