Avoid assert and rely on error handler doing the correct thing.

Checking int return types of MPI functions is inefficient. The default
error handler will abort the problem. If somebody changes that, then
they should know what they are doing.
This commit is contained in:
Markus Blatt 2023-11-08 16:48:40 +01:00
parent 6d70d090a8
commit 1e8b51f118

View File

@ -111,19 +111,13 @@ public:
void receive([[maybe_unused]] unsigned peerRank)
{
#if HAVE_MPI
// Use return code for error detection
// According to MPI standard the ERROR field
// might not be initialized unless for operations
// that return multiple statuses, see Section 3.7.5
// of the standard
[[maybe_unused]] auto result = MPI_Recv(data_,
MPI_Recv(data_,
static_cast<int>(mpiDataSize_),
mpiDataType_,
static_cast<int>(peerRank),
0, // tag
MPI_COMM_WORLD,
MPI_STATUS_IGNORE);
assert(!result);
#endif // HAVE_MPI
}