[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPI-2.1 corrections, Batch 2 / AlltoallW



Dear group,

>
>
> 9:  Page 165, lines 25--38 read
> int MPI_Alltoallw(void *sendbuf, int sendcounts[], int sdispls[], MPI_Datatype sendtypes[], void *recvbuf, int recvcounts[], int rdispls[], MPI_Datatype recvtypes[], MPI_Comm comm)
>
> MPI_ALLTOALLW(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPES, RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPES, COMM, IERROR)
> <type> SENDBUF(*), RECVBUF(*)
> INTEGER SENDCOUNTS(*), SDISPLS(*), SENDTYPES(*), RECVCOUNTS(*), RDISPLS(*), RECVTYPES(*), COMM, IERROR
>
> void MPI::Comm::Alltoallw(const void* sendbuf, const int sendcounts[], const int sdispls[], const MPI::Datatype sendtypes[], void* recvbuf, const int recvcounts[], const int rdispls[], const MPI::Datatype recvtypes[]) const = 0
>
> but should read
>
> int MPI_Alltoallw(void *sendbuf, int sendcounts[], MPI_Aint sdispls[], MPI_Datatype sendtypes[], void *recvbuf, int recvcounts[], MPI_Aint rdispls[], MPI_Datatype recvtypes[], MPI_Comm comm)
>
> MPI_ALLTOALLW(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPES, RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPES, COMM, IERROR)
> <type> SENDBUF(*), RECVBUF(*)
> INTEGER SENDCOUNTS(*), SENDTYPES(*), RECVCOUNTS(*), RECVTYPES(*), COMM, IERROR
> INTEGER (KIND=MPI_ADDRESS_KIND) SDISPLS(*), RDISPLS(*)
>
> void MPI::Comm::Alltoallw(const void* sendbuf, const int sendcounts[], const MPI::Aint sdispls[], const MPI::Datatype sendtypes[], void* recvbuf, const int recvcounts[], const MPI::Aint rdispls[], const MPI::Datatype recvtypes[]) const = 0
>

I have severe problems to change interface of MPI_Alltoallw for the following reasons:

(*) After this change, running MPI-2 programs will fail. And it's really difficult
      to inform users about this in advance. And it may cause problems with the
      software of Independent Software Vendors which cannot be simply recompiled.
(*) The software will not be portable since different version of MPI_Alltoallw
       may be available.
(*) It makes a very bad impression to users if standard interfaces, which are published in
      several books and all MPI-2 documents, are simply changed.
(*) The displacements of MPI_Alltoallv, MPI_Allgatherv, ...
      are given also in int's.
    OK, it's clear to me that the displacements in the corresponding
    routines are relative to the extent of the corresponding data type.
    But there isn't any difference in the value if the data type is MPI_BYTE, MPI_PACKED,
    MPI_CHAR, ...
(*)  A similar problem was caused by MPI_ADDRESS,  MPI_TYPE_HVECTOR, ...
       in the Fortran version of MPI-1. This problem was solved by new functions and
       not by changing the interfaces.
(*) Also the size of (send/recv) counts are not sufficient for 64-bit environments.
      You may get problems also for data types MPI_INT, MPI_FLOAT, .... on
       large 64-bit systems.
      Thus, it would be consequent to change also the count arguments to MPI_Aint
       if you refer to problems on 64-bit systems.

Conclusion:

I don't expect that you will change the type of count arguments. Nevertheless,
I would prefer to add a new function (which is really not hard to implement additionally)
instead of changing the interface. Possibly, we have to add some additional small functions
(we have seen severe application problems in the use of communicators when
dynamically spawning and terminating processes by MPI_Comm_spawn) within
the MPI-2.1 correction process.

Sorry for boring you if you have discussed all these arguments before.
Best regards

Hubert

______________________________________________________________________________

   Hubert Ritzdorf

   NEC Europe Ltd.
   C&C Research Laboratories