10#include "MpiSendRecv.h"
18 MpiLogger::MpiLogger(MPI::Intracomm& comm)
19 : communicatorPtr_(&comm),
26 void MpiLogger::begin()
28 communicatorPtr_->Barrier();
29 rank_ = communicatorPtr_->Get_rank();
30 size_ = communicatorPtr_->Get_size();
33 recv<int>(*communicatorPtr_, data, rank_ - 1, 0);
35 std::cout << std::endl;
45 if (rank_ < size_ - 1) {
46 send<int>(*communicatorPtr_, rank_, rank_ + 1, 0);
48 communicatorPtr_->Barrier();
Utility classes for scientific computation.