Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Bogus memcpy or bogus valgrind record
From: Jed Brown (jed_at_[hidden])
Date: 2009-04-29 15:40:54

Jeff Squyres wrote:

> But I'm able to replicate your error (but shouldn't the 2nd buffer be
> the 1st + size (not 2)?) -- let me dig into it a bit... we definitely
> shouldn't be getting invalid writes in the convertor, etc.

As Eugene pointed out earlier, it is fine.

  dataloctab = malloc (2 * (procglbnbr + 1) * sizeof (int));
  dataglbtab = dataloctab + 2;

dataloctab is the 2-element send buffer, dataglbtab is the receive
buffer of length 2*procglbnbr.