Skip to content
Snippets Groups Projects
Commit 6a11873e authored by Gilles Gouaillardet's avatar Gilles Gouaillardet
Browse files

MPI_Sendrecv_replace: correctly handle large data


Because MPI_Sendrecv_replace() uses PMPI_Sendrecv() with MPI_PACKED
under the hood, the data to be exchanged size = MPI_Type_size(datatype) * count
must fit in a signed integer.
Otherwise, PMPI_Sendrecv()
 - fails with an error message if (int)size < 0
 - silently truncate the data if (int)size >= 0

Refs. open-mpi/ompi#8862

Thanks Jakub Benda for reporting this issue and suggesting a fix.

Signed-off-by: default avatarGilles Gouaillardet <gilles@rist.or.jp>
parent 02b20108
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment