Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Nov 19, 2024
1 parent 06bd5d3 commit 0bd053e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.
4 changes: 0 additions & 4 deletions src/bvals/comms/boundary_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ TaskStatus SetBounds(std::shared_ptr<MeshData<Real>> &md) {
Mesh *pmesh = md->GetMeshPointer();
auto &cache = md->GetBvarsCache().GetSubCache(bound_type, false);

// if (pmesh->do_coalesced_comms) {
// pmesh->pcoalesced_comms->Compare(md.get(), bound_type);
// }

auto [rebuild, nbound] = CheckReceiveBufferCacheForRebuild<bound_type, false>(md);

if (rebuild) {
Expand Down
43 changes: 0 additions & 43 deletions src/bvals/comms/coalesced_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,49 +222,6 @@ bool CoalescedBuffer::TryReceiveAndUnpack(const std::set<Uid_t> &vars) {
return true;
}

//----------------------------------------------------------------------------------------
void CoalescedBuffer::Compare(const std::set<Uid_t> &vars) {
PARTHENON_REQUIRE(coalesced_comm_buffer.GetState() == BufferState::received,
"Combined buffer not in correct state");
PARTHENON_REQUIRE(sparse_status_buffer.GetState() == BufferState::received,
"Combined buffer not in correct state");
const auto &var_set = vars.size() == 0 ? all_vars : vars;
// Allocate and free buffers as required
int idx{0};
auto &stat = sparse_status_buffer.buffer();
for (auto uid : var_set) {
for (auto &[bnd_id, pvbbuf] : coalesced_info_buf.at(uid)) {
if (stat[idx] == 1) {
PARTHENON_REQUIRE(pvbbuf->GetState() == BufferState::received,
"State doesn't agree.");
} else {
PARTHENON_REQUIRE(pvbbuf->GetState() == BufferState::received_null,
"State doesn't agree.");
}
idx++;
}
}

auto &bids = GetBndIdsOnDevice(vars);
Kokkos::parallel_for(
PARTHENON_AUTO_LABEL,
Kokkos::TeamPolicy<>(parthenon::DevExecSpace(), bids.size(), Kokkos::AUTO),
KOKKOS_LAMBDA(parthenon::team_mbr_t team_member) {
const int b = team_member.league_rank();
if (bids[b].buf_allocated) {
const int buf_size = bids[b].size();
Real *com_buf = &(bids[b].coalesced_buf(bids[b].start_idx()));
Real *buf = &(bids[b].buf(0));
Kokkos::parallel_for(Kokkos::TeamThreadRange<>(team_member, buf_size),
[&](const int idx) {
PARTHENON_REQUIRE(buf[idx] == com_buf[idx], "Bad value");
});
}
});
coalesced_comm_buffer.Stale();
sparse_status_buffer.Stale();
}

//----------------------------------------------------------------------------------------
void CoalescedBuffer::AddVarBoundary(BndId &bnd_id) {
auto key = GetChannelKey(bnd_id);
Expand Down
2 changes: 0 additions & 2 deletions src/bvals/comms/coalesced_buffers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ struct CoalescedBuffer {
void PackAndSend(const std::set<Uid_t> &vars);

bool TryReceiveAndUnpack(const std::set<Uid_t> &vars);

void Compare(const std::set<Uid_t> &vars);
};

struct CoalescedBuffersRank {
Expand Down

0 comments on commit 0bd053e

Please sign in to comment.