|
Boost Users : |
Subject: Re: [Boost-users] Boost.MPI: question about documentation of gather()
From: Riccardo Murri (riccardo.murri_at_[hidden])
Date: 2010-12-13 09:18:24
Hi,
On Sun, Dec 12, 2010 at 8:29 AM, H Magnet <spam.wax_at_[hidden]> wrote:
> I am trying to debug my simple code (gathering of double arrays onto master).
> and naturally I opened gather online help:
>
> http://www.boost.org/doc/libs/1_45_0/doc/html/boost/mpi/gather.html
>
> In Parameters section, for 'in_values', it is stating that if
> gathering arrays of values, 'in_values' should be pointing to a
> storage of n*comm.size() values
>
> Shouldn't this be n*size_of(T) or something in those lines?
Good catch. I think that phrase actually belongs in the "out_values"
description, and accidentally slipped into the "in_values" one.
For gathering arrays, "out_values" should point to a storage of
n*comm.size() values == comm.size() * n * sizeof(T) bytes, because
you're receiving n values from each rank.
"in_values" should always point to n values == n * sizeof(T) bytes.
Best regards,
Riccardo
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net