From d1f1f1315db2d623b87c2360b7913157b2cde53d Mon Sep 17 00:00:00 2001 From: Nils Deppe Date: Wed, 11 Sep 2024 21:43:23 -0400 Subject: [PATCH] Improve error message for SPSC inbox insertion failure --- src/Evolution/DiscontinuousGalerkin/InboxTags.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Evolution/DiscontinuousGalerkin/InboxTags.hpp b/src/Evolution/DiscontinuousGalerkin/InboxTags.hpp index 456083f5175b..9728761e5152 100644 --- a/src/Evolution/DiscontinuousGalerkin/InboxTags.hpp +++ b/src/Evolution/DiscontinuousGalerkin/InboxTags.hpp @@ -152,9 +152,17 @@ struct BoundaryCorrectionAndGhostCellsInbox { if (UNLIKELY(not gsl::at(inbox->boundary_data_in_directions, neighbor_index) .try_emplace(time_step_id, std::move(data.second), std::move(data.first)))) { - ERROR("Failed to emplace data into inbox. neighbor_id: (" - << neighbor_id.direction() << ',' << neighbor_id.id() - << ") at TimeStepID: " << time_step_id); + ERROR( + "Failed to emplace data into inbox. neighbor_id: (" + << neighbor_id.direction() << ',' << neighbor_id.id() + << ") at TimeStepID: " << time_step_id << " the size of the inbox is " + << gsl::at(inbox->boundary_data_in_directions, neighbor_index).size() + << " the message count is " + << gsl::at(inbox->boundary_data_in_directions, neighbor_index) + .message_count.load() + << " and the number of neighbors is " + << gsl::at(inbox->boundary_data_in_directions, neighbor_index) + .number_of_neighbors.load()); } // Notes: // 1. fetch_add does a post-increment.