Skip to content

Commit

Permalink
Add madness gop fences.
Browse files Browse the repository at this point in the history
  • Loading branch information
bimalgaudel committed Jan 26, 2024
1 parent 65b681c commit d06d103
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/tot_array_fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,11 @@ auto general_product(TA::DistArray<TileA, TA::DensePolicy> A,
TileA, TileB>;
TA_ASSERT(setup.valid());

auto& world = TA::get_default_world();

A.make_replicated();
B.make_replicated();
TA::get_default_world().gop.fence();
world.gop.fence();

TA::Tensor<TileA> tensorA{A.trange().tiles_range()};
for (auto&& ix : tensorA.range()) tensorA(ix) = A.find_local(ix).get(false);
Expand Down Expand Up @@ -485,9 +487,9 @@ auto general_product(TA::DistArray<TileA, TA::DensePolicy> A,
}

using TileC = typename decltype(result_tensor)::value_type;
TA::DistArray<TileC, TA::DensePolicy> C(TA::get_default_world(),
result_trange);
TA::DistArray<TileC, TA::DensePolicy> C(world, result_trange);
C.make_replicated();
world.gop.fence();
for (auto it : C) it = result_tensor(it.index());
return C;
}
Expand Down

0 comments on commit d06d103

Please sign in to comment.