From 0bd053e0ac5c802fcd063d33577504f70c620379 Mon Sep 17 00:00:00 2001 From: Luke Roberts Date: Mon, 18 Nov 2024 17:42:53 -0700 Subject: [PATCH] remove unused --- src/bvals/comms/boundary_communication.cpp | 4 -- src/bvals/comms/coalesced_buffers.cpp | 43 ---------------------- src/bvals/comms/coalesced_buffers.hpp | 2 - 3 files changed, 49 deletions(-) diff --git a/src/bvals/comms/boundary_communication.cpp b/src/bvals/comms/boundary_communication.cpp index bd8b792d08be..7e3c0a638a40 100644 --- a/src/bvals/comms/boundary_communication.cpp +++ b/src/bvals/comms/boundary_communication.cpp @@ -273,10 +273,6 @@ TaskStatus SetBounds(std::shared_ptr> &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(md); if (rebuild) { diff --git a/src/bvals/comms/coalesced_buffers.cpp b/src/bvals/comms/coalesced_buffers.cpp index 61f04dcc9a6a..35a43bc6b97d 100644 --- a/src/bvals/comms/coalesced_buffers.cpp +++ b/src/bvals/comms/coalesced_buffers.cpp @@ -222,49 +222,6 @@ bool CoalescedBuffer::TryReceiveAndUnpack(const std::set &vars) { return true; } -//---------------------------------------------------------------------------------------- -void CoalescedBuffer::Compare(const std::set &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); diff --git a/src/bvals/comms/coalesced_buffers.hpp b/src/bvals/comms/coalesced_buffers.hpp index e0481a56838c..10ea67a862cd 100644 --- a/src/bvals/comms/coalesced_buffers.hpp +++ b/src/bvals/comms/coalesced_buffers.hpp @@ -98,8 +98,6 @@ struct CoalescedBuffer { void PackAndSend(const std::set &vars); bool TryReceiveAndUnpack(const std::set &vars); - - void Compare(const std::set &vars); }; struct CoalescedBuffersRank {