You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pfasst/mpi_communicator_impl.hpp
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -96,12 +96,13 @@ namespace pfasst
96
96
returnthis->converged.at(rank);
97
97
}
98
98
99
-
voidMPIStatus::post()
99
+
voidMPIStatus::post(int tag)
100
100
{
101
101
// noop: send/recv for status info is blocking
102
+
UNUSED(tag);
102
103
}
103
104
104
-
voidMPIStatus::send()
105
+
voidMPIStatus::send(int tag)
105
106
{
106
107
// don't send forward if: single processor run, or we're the last processor
107
108
if (mpi->size() == 1) { return; }
@@ -110,13 +111,13 @@ namespace pfasst
110
111
int iconverged = converged.at(mpi->rank()) ? IStatus::CONVERGED : IStatus::NOT_CONVERGED;
111
112
int dest_rank = (mpi->rank() + 1) % mpi->size();
112
113
113
-
CLOG(DEBUG, "Controller") << "sending converged status to rank " << dest_rank << " with tag '1': " << ((bool)iconverged == IStatus::CONVERGED);
114
-
int err = MPI_Send(&iconverged, sizeof(int), MPI_INT, dest_rank, 1, mpi->comm);
114
+
CLOG(DEBUG, "Controller") << "sending converged status to rank " << dest_rank << " with tag " << tag << ": " << ((bool)iconverged == IStatus::CONVERGED);
115
+
int err = MPI_Send(&iconverged, 1, MPI_INT, dest_rank, tag, mpi->comm);
// don't recv if: single processor run, or we're the first processor
122
123
if (mpi->size() == 1) { return; }
@@ -130,10 +131,10 @@ namespace pfasst
130
131
MPI_Status stat = MPI_Status_factory();
131
132
int iconverged = IStatus::NOT_CONVERGED;
132
133
int src_rank = (mpi->rank() - 1) % mpi->size();
133
-
CLOG(DEBUG, "Controller") << "recieving converged status from rank " << src_rank << " with tag '1'";
134
-
int err = MPI_Recv(&iconverged, sizeof(iconverged), MPI_INT, src_rank, 1, mpi->comm, &stat);
134
+
//CLOG(DEBUG, "Controller") << "receiving converged status from rank " << src_rank << " with tag '1'";
135
+
int err = MPI_Recv(&iconverged, 1, MPI_INT, src_rank, tag, mpi->comm, &stat);
135
136
check_mpi_error(err);
136
-
CLOG(DEBUG, "Controller") << "recieved converged status from rank " << src_rank << " with tag '1': " << ((bool)iconverged == IStatus::CONVERGED);
137
+
CLOG(DEBUG, "Controller") << "received converged status from rank " << src_rank << " with tag "<< tag << ": " << ((bool)iconverged == IStatus::CONVERGED);
0 commit comments