Skip to content

Commit

Permalink
Add some debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Oct 30, 2024
1 parent 17f25e0 commit cff847b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bvals/comms/bnd_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ BndId BndId::GetSend(MeshBlock *pmb, const NeighborBlock &nb,
return out;
}

void BndId::PrintInfo(const std::string &start) {
printf("%s var %s (%i -> %i) starting at %i with size %i (Total combined buffer size = %i, buffer size = %i) [rank = %i]\n",
start.c_str(), Variable<Real>::GetLabel(var_id()).c_str(), send_gid(), recv_gid(),
start_idx(), size(), combined_buf.size(), buf.size(), Globals::my_rank);
}

BndInfo BndInfo::GetSendBndInfo(MeshBlock *pmb, const NeighborBlock &nb,
std::shared_ptr<Variable<Real>> v,
CommBuffer<buf_pool_t<Real>::owner_t> *buf) {
Expand Down
2 changes: 2 additions & 0 deletions src/bvals/comms/bnd_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ struct BndId {

buf_pool_t<Real>::weak_t buf; // comm buffer from pool
BufArray1D<Real> combined_buf; // Combined buffer

void PrintInfo(const std::string &start);

KOKKOS_DEFAULTED_FUNCTION
BndId() = default;
Expand Down

0 comments on commit cff847b

Please sign in to comment.