From 33f7141f6d9018142fdcbf95d2bd788082640a51 Mon Sep 17 00:00:00 2001 From: WickedJack99 Date: Sun, 29 Jun 2025 21:21:12 +0200 Subject: [PATCH] . --- lab12/exc4/jacobi.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lab12/exc4/jacobi.cpp b/lab12/exc4/jacobi.cpp index 096746b..708a23d 100644 --- a/lab12/exc4/jacobi.cpp +++ b/lab12/exc4/jacobi.cpp @@ -61,10 +61,11 @@ int Jacobi::upperOffset() const void Jacobi::exchangeHaloLayers(Matrix &phi) { - if (rank_ == (numProc_ - 2)) { + if (rank_ == (numProc_ - 2)) + { std::cout << is_first_on_node_ << std::endl; } - + if (is_first_on_node_) { exchangeHaloLayersNodeMPIProcFirst(phi); @@ -157,6 +158,10 @@ void Jacobi::exchangeHaloLayersNodeMPIProcFirst(Matrix &phi) while (states->shmStates[1] == SharedmemState::Unread) { + if (rank_ == (numProc_ - 2)) + { + std::cout << "t" << std::endl; + } MPI_Win_sync(win_); } @@ -245,6 +250,10 @@ Jacobi::Result Jacobi::run(const Matrix &init, double eps, int maxNumIter) dist = 0; exchangeHaloLayers(phi[t0]); + if (rank_ == (numProc_ - 2)) + { + std::cout << "exchangeHaloLayers finished" << std::endl; + } for (int i = 1; i < numRows - 1; ++i) {