Skip to content

Commit fd9fbb3

Browse files
committed
mpi: Minor tidying.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent 0ebff47 commit fd9fbb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/pfasst/mpi_communicator.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ namespace pfasst
108108

109109
virtual void post()
110110
{
111-
// we'll use blocking send/recv for status info
111+
// noop: send/recv for status info is blocking
112112
}
113113

114114
virtual void send()
115115
{
116+
// don't send forward if: single processor run, or we're the last processor
116117
if (mpi->size() == 1) { return; }
117118
if (mpi->rank() == mpi->size() - 1) { return; }
118-
// if (get_converged(mpi->rank())) { return; }
119119

120120
int iconverged = converged.at(mpi->rank()) ? 1 : 0;
121121

@@ -131,8 +131,10 @@ namespace pfasst
131131

132132
virtual void recv()
133133
{
134+
// don't recv if: single processor run, or we're the first processor
134135
if (mpi->size() == 1) { return; }
135136
if (mpi->rank() == 0) { return; }
137+
136138
if (get_converged(mpi->rank()-1)) {
137139
LOG(DEBUG) << "mpi rank " << this->comm->rank() << " skipping status recv";
138140
return;

0 commit comments

Comments
 (0)