From: lederman@breeze.cs.wisc.edu (Steve Huss-Lederman)
Newsgroups: comp.parallel.mpi
Subject: Re: MPI_Allgather
Date: 16 Nov 1998 15:28:03 GMT
Organization: U of Wisconsin CS Dept
Message-Id: <72pga3$qs2@spool.cs.wisc.edu>
References: <364F2AB9.AEDB9213@club-internet.fr>


In article <364F2AB9.AEDB9213@club-internet.fr>,
Guillaume Alleon  <alleon@club-internet.fr> wrote:
>I have written a matvec algorithm using MPI. To perform the job
>I use new intermediate datatype. At some point, I use some
>MPI_Allgather on some row communicator where I use as
>argument two different MPI_Datatypes (input/output). This s working
>on SGI and IBM using native MPI implementation. When I use mpich
>I get an error message. What is correct ?
>when I look mpich/src/coll/allgather.c there is :
>  if (sendtype != recvtype)
>    return MPIR_ERROR(comm_ptr, MPI_ERR_TYPE, myname)
>
>When I comment this two lines, my program is valid but ...

MPICH is following the standard (assuming there isn't a subtle bug
here).  MPI states that the input and output buffers must be disjoint.
This test does not guarantee this is true but certainly if the test
fails then there is an overlap.  I'm not sure why this failed for you
since you use "two different MPI_Datatypes".

In MPI-2 the Forum recognized this problem.  There is a new special
argument called MPI_IN_PLACE for this case.  Chap. 4 and esp. section
4.5 of MPI - The complete Reference, vol 1 describes this.

Steve

