fix NBC_Copy for legitimate zero size messages
this fixes a regression from open-mpi/ompi@9a70765f27
Этот коммит содержится в:
родитель
ec44a25070
Коммит
0bd765eddd
@ -9,6 +9,8 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
|
* Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef __NBC_INTERNAL_H__
|
#ifndef __NBC_INTERNAL_H__
|
||||||
@ -501,7 +503,10 @@ static inline int NBC_Copy(void *src, int srccount, MPI_Datatype srctype, void *
|
|||||||
} else {
|
} else {
|
||||||
/* we have to pack and unpack */
|
/* we have to pack and unpack */
|
||||||
res = MPI_Pack_size(srccount, srctype, comm, &size);
|
res = MPI_Pack_size(srccount, srctype, comm, &size);
|
||||||
if (MPI_SUCCESS != res || 0 == size) { printf("MPI Error in MPI_Pack_size() (%i:%i)\n", res, size); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; }
|
if (MPI_SUCCESS != res) { printf("MPI Error in MPI_Pack_size() (%i:%i)\n", res, size); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res; }
|
||||||
|
if (0 == size) {
|
||||||
|
return NBC_OK;
|
||||||
|
}
|
||||||
packbuf = malloc(size);
|
packbuf = malloc(size);
|
||||||
if (NULL == packbuf) { printf("Error in malloc()\n"); return res; }
|
if (NULL == packbuf) { printf("Error in malloc()\n"); return res; }
|
||||||
pos=0;
|
pos=0;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user