1
1

Sorry, previous commit was in the wrong directory. This is the real fix (have

to undo 1822).

The verification of recvcount==0 and rank = root was braking
inter-communicator scatter, since the root (root==MPI_ROOT) might very well
have recvcount=0. The same fix has been applied to gather.c just the other way
round. 
 
Fixes the bug reported on the mainling list by Martin Audet. If there is a
1.2.7 this fix might be worthwhile porting it over.

Please note, that while the test works now for basic and for inter, we get a
0byte malloc warning from the inter module, which we still have to fix in a
separate patch.

This commit was SVN r18123.
Этот коммит содержится в:
Edgar Gabriel 2008-04-10 15:03:14 +00:00
родитель f87830767a
Коммит 5989fa570c
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -123,7 +124,7 @@ int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
/* Do we need to do anything? */ /* Do we need to do anything? */
if ((0 == sendcount && if ((0 == sendcount && MPI_ROOT != root &&
(ompi_comm_rank(comm) != root || (ompi_comm_rank(comm) != root ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE != sendbuf))) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE != sendbuf))) ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf && (ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf &&

Просмотреть файл

@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -118,7 +119,7 @@ int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
/* Do we need to do anything? */ /* Do we need to do anything? */
if ((0 == recvcount && if ((0 == recvcount && MPI_ROOT != root &&
(ompi_comm_rank(comm) != root || (ompi_comm_rank(comm) != root ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE != recvbuf))) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE != recvbuf))) ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf && (ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf &&