[Dune-devel] [Dune-Commit] [Commit] dune-common - 82609fb: [parallel, bugfix] don't create empty MessageInformation

Markus Blatt markus at dr-blatt.de
Sat Jan 18 12:54:19 CET 2014


Hi,

I am not sure what the problem is that you are trying to fix. An
example program that triggers the error would be helpful here or
information about what error is thrown where.

Anyway, I don't think that this competely resolves the problem. At
least not for the case where the index sets for sending and receiving
are not the same (Think of e.g. repartitioning data). In this
situation one of noSend and noRecv might be zero and the other one
positive. This situation is not detected.

Markus

On Fri, Jan 17, 2014 at 03:34:07PM +0100, Christian Engwer wrote:
> New commit, appeared at Fri Jan 17 15:34:07 2014 +0100
> as part of the following ref changes:
> 
>     branch refs/heads/master    updated from 20ef1b8 -> 82609fb
> 
> Browsable version: http://cgit.dune-project.org/repositories/dune-common/commit/?id=82609fbcd3b8a49cdc5dc8cd640f55609622586e
> 
> ======================================================================
> 
> commit 82609fbcd3b8a49cdc5dc8cd640f55609622586e
> Author: Christian Engwer <christi at dune-project.org>
> Date:   Fri Jan 17 15:36:56 2014 +0100
> 
>     [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.
> 
>  dune/common/parallel/communicator.hh | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> 
> 
> diff --git a/dune/common/parallel/communicator.hh b/dune/common/parallel/communicator.hh
> index 831fcda..a973978 100644
> --- a/dune/common/parallel/communicator.hh
> +++ b/dune/common/parallel/communicator.hh
> @@ -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],
> 
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
> 

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140118/b4e7742a/attachment.sig>


More information about the Dune-devel mailing list