The pack/unpack will return 1 only if all data has been packed/unpacked. We have to make
sure we provide exactly the amount of data these functions expect, otherwise they will return 0. This commit was SVN r11484.
Этот коммит содержится в:
родитель
338134b535
Коммит
3312aa4b0a
@ -73,7 +73,7 @@ int MPI_Pack(void *inbuf, int incount, MPI_Datatype datatype,
|
||||
|
||||
/* Prepare the iovec with all informations */
|
||||
invec.iov_base = (char*) outbuf + (*position);
|
||||
invec.iov_len = outsize - (*position);
|
||||
invec.iov_len = size;
|
||||
|
||||
/* Do the actual packing */
|
||||
iov_count = 1;
|
||||
|
@ -71,7 +71,7 @@ int MPI_Pack_external(char *datarep, void *inbuf, int incount,
|
||||
|
||||
/* Prepare the iovec with all informations */
|
||||
invec.iov_base = (char*) outbuf + (*position);
|
||||
invec.iov_len = outsize - (*position);
|
||||
invec.iov_len = size;
|
||||
|
||||
/* Do the actual packing */
|
||||
iov_count = 1;
|
||||
|
@ -77,7 +77,7 @@ int MPI_Unpack(void *inbuf, int insize, int *position,
|
||||
|
||||
/* Prepare the iovec with all informations */
|
||||
outvec.iov_base = (char*) inbuf + (*position);
|
||||
outvec.iov_len = insize - (*position);
|
||||
outvec.iov_len = size;
|
||||
|
||||
/* Do the actual unpacking */
|
||||
iov_count = 1;
|
||||
|
@ -68,7 +68,7 @@ int MPI_Unpack_external (char *datarep, void *inbuf, MPI_Aint insize,
|
||||
|
||||
/* Prepare the iovec with all informations */
|
||||
outvec.iov_base = (char*) inbuf + (*position);
|
||||
outvec.iov_len = insize - (*position);
|
||||
outvec.iov_len = size;
|
||||
|
||||
/* Do the actual unpacking */
|
||||
iov_count = 1;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user