[mpich-discuss] MPI_Gather error

Prashanth prashanth.dumpuri at gmail.com
Tue Nov 16 12:31:45 CST 2010


Jayesh,
  Thanks for your immediate response. MPI_IN_PLACE for 1 processor and using
different arrays for the sendbuff and recbuff fixed it. And sorry for not
checking the MPICH2 versions in Windows and Linux. I was running an earlier
version of MPICH2 in linux. Also, I would appreciate it if you (or someone
else) can answer the following question:
   I'm running my code on a Quad core machine. Given this, why does mpiexec
-n 6 <my code.exe> still run and work fine?
Thanks again
Prashanth

On Tue, Nov 16, 2010 at 12:11 PM, Jayesh Krishna <jayesh at mcs.anl.gov> wrote:

> Hi,
>  The error usually occurs when you use the same buffer to send and receive
> data and don't use the MPI_IN_PLACE option (In your code pass MPI_IN_PLACE
> as the value of sendbuf in root.).
>  You might (should) get the same error with the latest version of MPICH2 on
> Linux too.
>  Let us know if it works for you.
>
> Regards,
> Jayesh
> ----- Original Message -----
> From: Prashanth <prashanth.dumpuri at gmail.com>
> To: mpich-discuss at mcs.anl.gov
> Sent: Tue, 16 Nov 2010 11:26:36 -0600 (CST)
> Subject: [mpich-discuss] MPI_Gather error
>
> All,
>   I have been using MPICH2 in linux and recently switched to Windows XP. My
> code worked fine under Linux but in Windows I get the following error
> message:
>
> Fatal error in PMPI_Gather: Invalid buffer pointer, error stack:
> PMPI_Gather(786): MPI_Gather(sbug=04785FF8, scount=1, MPI_INT,
> rbuf=04785FF8, rcount=1, MPI_INT, root=0, MPI_COMM_WORLD) failed
> PMPI_Gather(729): Buffers must not be aliased.
>
> ( here is line in the code where i get the above error:
>
>
> MPI_Gather((void*)&recvcnts[rank],1,MPI_INT,(void*)recvcnts,1,MPI_INT,0,MPI_COMM_WORLD);
>
> i have defined recvcnts to be an integer array )
>
> Please note that the above line and code works fine in Linux. Any help on
> this will be greatly appreciated.
>
> Thanks
> Prashanth
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20101116/ca76e9bd/attachment.htm>


More information about the mpich-discuss mailing list