39#define MPI_BOOL MPI_Select_unsigned_integer_datatype<sizeof(bool)>::datatype
49 MPI_Send(
const_cast<char *
>(itemToSend.
c_str()),
61 MPI_Send(
const_cast<int *
>(itemsToSend.
data()),
75 MPI_Isend(
const_cast<int *
>(itemsToSend.
data()),
90 MPI_Send(
const_cast<double *
>(itemsToSend.
data()),
104 MPI_Isend(
const_cast<double *
>(itemsToSend.
data()),
119 MPI_Send(&itemToSend,
129 return aSend(precice::refToSpan<const double>(itemToSend), rankReceiver);
136 MPI_Send(&itemToSend,
146 return aSend(precice::refToSpan<const int>(itemToSend), rankReceiver);
153 MPI_Send(&itemToSend,
167 MPI_Isend(
const_cast<bool *
>(&itemToSend),
185 MPI_Get_count(&status, MPI_CHAR, &length);
188 MPI_Recv(
const_cast<char *
>(itemToReceive.
data()),
195 PRECICE_DEBUG(
"Received \"{}\" from rank {}", itemToReceive, rankSender);
204 MPI_Recv(itemsToReceive.
data(),
205 itemsToReceive.
size(),
219 MPI_Recv(itemsToReceive.
data(),
220 itemsToReceive.
size(),
234 MPI_Irecv(itemsToReceive.
data(),
235 itemsToReceive.
size(),
251 MPI_Recv(&itemToReceive,
258 PRECICE_DEBUG(
"Received {} from rank {}", itemToReceive, rankSender);
263 return aReceive(precice::refToSpan<double>(itemToReceive), rankSender);
272 MPI_Recv(&itemToReceive,
279 PRECICE_DEBUG(
"Received {} from rank {}", itemToReceive, rankSender);
288 MPI_Irecv(&itemToReceive,
305 MPI_Recv(&itemToReceive,
312 PRECICE_DEBUG(
"Received {} from rank {}", itemToReceive, rankSender);
321 MPI_Irecv(&itemToReceive,
#define PRECICE_DEBUG(...)
#define PRECICE_TRACE(...)
virtual int adjustRank(Rank rank) const
Adjusts the given rank bases on the _rankOffset.
virtual void receive(std::string &itemToReceive, Rank rankSender) override
Receives a std::string from process with given rank.
virtual PtrRequest aReceive(precice::span< double > itemsToReceive, int rankSender) override
Asynchronously receives an array of double values.
virtual MPI_Comm & communicator(Rank rank)=0
Returns the communicator.
virtual PtrRequest aSend(precice::span< const int > itemsToSend, Rank rankReceiver) override
Asynchronously sends an array of integer values.
virtual void send(std::string const &itemToSend, Rank rankReceiver) override
Sends a std::string to process with given rank.
virtual Rank rank(int rank)=0
A C++ 11 implementation of the non-owning C++20 std::span type.
constexpr pointer data() const noexcept
constexpr size_type size() const noexcept
contains the data communication abstraction layer.
std::shared_ptr< Request > PtrRequest
static MPI_Datatype datatype
static MPI_Datatype datatype
static MPI_Datatype datatype
static MPI_Datatype datatype