diff --git a/src/bvals/comms/bnd_info.cpp b/src/bvals/comms/bnd_info.cpp index f58855d6cfdf..e3b73f12239e 100644 --- a/src/bvals/comms/bnd_info.cpp +++ b/src/bvals/comms/bnd_info.cpp @@ -328,8 +328,8 @@ 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, buf_allocated = %i) [rank = %i]\n", start.c_str(), Variable::GetLabel(var_id()).c_str(), send_gid(), - recv_gid(), start_idx(), size(), combined_buf.size(), buf.size(), - buf_allocated, Globals::my_rank); + recv_gid(), start_idx(), size(), combined_buf.size(), buf.size(), buf_allocated, + Globals::my_rank); } BndInfo BndInfo::GetSendBndInfo(MeshBlock *pmb, const NeighborBlock &nb, diff --git a/src/bvals/comms/bnd_info.hpp b/src/bvals/comms/bnd_info.hpp index c069dec7d383..41c94a3f9ce4 100644 --- a/src/bvals/comms/bnd_info.hpp +++ b/src/bvals/comms/bnd_info.hpp @@ -82,7 +82,7 @@ struct BndId { bool buf_allocated; buf_pool_t::weak_t buf; // comm buffer from pool BufArray1D combined_buf; // Combined buffer - + void PrintInfo(const std::string &start); KOKKOS_DEFAULTED_FUNCTION @@ -102,7 +102,7 @@ struct BndId { } } - bool SameBVChannel(const BndId& other) { + bool SameBVChannel(const BndId &other) { // Don't want to compare start_idx, so -1 for (int i = 0; i < NDAT - 1; ++i) { if (data[i] != other.data[i]) return false; diff --git a/src/bvals/comms/boundary_communication.cpp b/src/bvals/comms/boundary_communication.cpp index 654064e6f582..bbc4643b5fdf 100644 --- a/src/bvals/comms/boundary_communication.cpp +++ b/src/bvals/comms/boundary_communication.cpp @@ -159,17 +159,17 @@ TaskStatus SendBoundBufs(std::shared_ptr> &md) { else buf.SendNullLocal(); } - + // Send the combined buffers pmesh->pcombined_buffers->PackAndSend(md.get(), bound_type); - } else { + } else { for (int ibuf = 0; ibuf < cache.buf_vec.size(); ++ibuf) { auto &buf = *cache.buf_vec[ibuf]; if (sending_nonzero_flags_h(ibuf) || !Globals::sparse_config.enabled) buf.Send(); else buf.SendNull(); - } + } } return TaskStatus::complete; } @@ -236,13 +236,13 @@ TaskStatus ReceiveBoundBufs(std::shared_ptr> &md) { all_received = pbuf->TryReceiveLocal() && all_received; nreceived += pbuf->TryReceiveLocal(); }); - } else { + } else { int nreceived{0}; std::for_each(std::begin(cache.buf_vec), std::end(cache.buf_vec), [&all_received, &nreceived](auto pbuf) { all_received = pbuf->TryReceive() && all_received; nreceived += pbuf->TryReceive(); - }); + }); } int ibound = 0; if (Globals::sparse_config.enabled && all_received) { diff --git a/src/bvals/comms/combined_buffers.hpp b/src/bvals/comms/combined_buffers.hpp index 509195a7faa9..d8598174d2f8 100644 --- a/src/bvals/comms/combined_buffers.hpp +++ b/src/bvals/comms/combined_buffers.hpp @@ -73,7 +73,10 @@ struct CombinedBuffersRankPartition { void AllocateCombinedBuffer(); - bool IsAvailableForWrite() { return sparse_status_buffer.IsAvailableForWrite() && combined_comm_buffer.IsAvailableForWrite(); } + bool IsAvailableForWrite() { + return sparse_status_buffer.IsAvailableForWrite() && + combined_comm_buffer.IsAvailableForWrite(); + } ParArray1D &GetBndIdsOnDevice(const std::set &vars); diff --git a/src/mesh/mesh.cpp b/src/mesh/mesh.cpp index 31ad6a68d369..e8b1857a6a0a 100644 --- a/src/mesh/mesh.cpp +++ b/src/mesh/mesh.cpp @@ -89,7 +89,8 @@ Mesh::Mesh(ParameterInput *pin, ApplicationInput *app_in, Packages_t &packages, brdisp(Globals::nranks), bddisp(Globals::nranks), pcombined_buffers(std::make_shared(this)), receive_type{pin->GetOrAddString("parthenon/mesh", "receive_type", "iprobe")}, - do_combined_comms{pin->GetOrAddBoolean("parthenon/mesh", "do_combined_comms", false)} { + do_combined_comms{ + pin->GetOrAddBoolean("parthenon/mesh", "do_combined_comms", false)} { // Allow for user overrides to default Parthenon functions if (app_in->InitUserMeshData != nullptr) { InitUserMeshData = app_in->InitUserMeshData;