From 4bea3e5d9dbc059873acf99aaadd16ced7ebff7e Mon Sep 17 00:00:00 2001 From: Rene Halver <r.halver@fz-juelich.de> Date: Tue, 4 Apr 2023 12:19:35 +0200 Subject: [PATCH] put debug messages in the correct environment --- include/ALL_Histogram.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/ALL_Histogram.hpp b/include/ALL_Histogram.hpp index f4c204d..139c131 100644 --- a/include/ALL_Histogram.hpp +++ b/include/ALL_Histogram.hpp @@ -459,9 +459,11 @@ template <class T, class W> void Histogram_LB<T, W>::find_neighbors() { MPI_Cart_rank(this->globalComm, offset_coords, &rank_offset); +#ifdef ALL_DEBUG_ENABLED MPI_Barrier(this->globalComm); if (this->localRank == 0) std::cout << "HISTOGRAM: neighbor_find y-communication" << std::endl; +#endif // wait for communication MPI_Wait(&sreq, &sstat); MPI_Wait(&rreq, &rstat); @@ -505,9 +507,11 @@ template <class T, class W> void Histogram_LB<T, W>::find_neighbors() { MPI_Cart_rank(this->globalComm, offset_coords, &rank_offset); +#ifdef ALL_DEBUG_ENABLED MPI_Barrier(this->globalComm); if (this->localRank == 0) std::cout << "HISTOGRAM: neighbor_find y-communication 2" << std::endl; +#endif // wait for communication MPI_Wait(&sreq, &sstat); MPI_Wait(&rreq, &rstat); @@ -567,9 +571,11 @@ template <class T, class W> void Histogram_LB<T, W>::find_neighbors() { MPI_Cart_rank(this->globalComm, offset_coords, &rank_offset); +#ifdef ALL_DEBUG_ENABLED MPI_Barrier(this->globalComm); if (this->localRank == 0) std::cout << "HISTOGRAM: neighbor_find z-communication" << std::endl; +#endif // wait for communication MPI_Wait(&sreq, &sstat); MPI_Wait(&rreq, &rstat); @@ -637,16 +643,19 @@ template <class T, class W> void Histogram_LB<T, W>::find_neighbors() { MPI_Cart_rank(this->globalComm, offset_coords, &rank_offset); +#ifdef ALL_DEBUG_ENABLED MPI_Barrier(this->globalComm); if (this->localRank == 0) std::cout << "HISTOGRAM: neighbor_find z-communication 2" << std::endl; +#endif // wait for communication MPI_Wait(&sreq, &sstat); MPI_Wait(&rreq, &rstat); +#ifdef ALL_DEBUG_ENABLED if (this->localRank == 0) std::cout << "HISTOGRAM: neighbor_find z-communication 2" << std::endl; - +#endif // iterate about neighbor borders to determine the neighborship relation nNeighbors.at(5) = 0; for (int y = 0; y < this->global_dims.at(1); ++y) { -- GitLab