Jeff Squyres wrote:
> On Mar 28, 2009, at 5:31 AM, François PELLEGRINI wrote:
>> MPI_Comm_size (MPI_COMM_WORLD, &procglbnbr);
>> MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum);
>> dataloctab = malloc (2 * (procglbnbr + 1) * sizeof (int));
>> dataglbtab = dataloctab + 2;
> Why +2? Shouldn't it be +procglbnbr?
I think this is okay. There is a local buffer (2 elements long) and a
global buffer (2*np long, into which Allgather elements are placed).
They're concatenated. So, glb starts 2 elements after local.