Skip to content
Snippets Groups Projects
Commit 56a9a73c authored by Christian Engwer's avatar Christian Engwer Committed by Markus Blatt
Browse files

[parallel,bugfix] don't create empty MessageInformation


when we try to send data, it might happen, that for some reason we don't want to any data.
This happens, when the dynamic size of our CommPolicy is 0. In that case we must not add a
MessageInformation, otherwise we get an MPI error.(cherry picked from commit 82609fbc)

Signed-off-by: default avatarMarkus Blatt <markus@dr-blatt.de>
parent bf58752c
No related branches found
No related tags found
No related merge requests found
......@@ -1160,7 +1160,8 @@ namespace Dune
interfacePair != end; ++interfacePair) {
int noSend = MessageSizeCalculator<Data,Flag>() (interfacePair->second.first);
int noRecv = MessageSizeCalculator<Data,Flag>() (interfacePair->second.second);
messageInformation_.insert(std::make_pair(interfacePair->first,
if (noSend + noRecv > 0)
messageInformation_.insert(std::make_pair(interfacePair->first,
std::make_pair(MessageInformation(bufferSize_[0],
noSend*sizeof(typename CommPolicy<Data>::IndexedType)),
MessageInformation(bufferSize_[1],
......@@ -1195,8 +1196,8 @@ namespace Dune
interfacePair != end; ++interfacePair) {
int noSend = MessageSizeCalculator<Data,Flag>() (source, interfacePair->second.first);
int noRecv = MessageSizeCalculator<Data,Flag>() (dest, interfacePair->second.second);
messageInformation_.insert(std::make_pair(interfacePair->first,
if (noSend + noRecv > 0)
messageInformation_.insert(std::make_pair(interfacePair->first,
std::make_pair(MessageInformation(bufferSize_[0],
noSend*sizeof(typename CommPolicy<Data>::IndexedType)),
MessageInformation(bufferSize_[1],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment