X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/590318407e836806e085a6083479cb940668e5f9..3ac0bae5c2a2349ec8c42e6c8b14265e74741b69:/src/smpi/bindings/smpi_pmpi_type.cpp diff --git a/src/smpi/bindings/smpi_pmpi_type.cpp b/src/smpi/bindings/smpi_pmpi_type.cpp index d7061c29e1..7155047890 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -338,6 +338,6 @@ int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size) CHECK_NEGATIVE(1, MPI_ERR_COUNT, incount) CHECK_TYPE(2, datatype) CHECK_COMM(3) - *size=incount*datatype->get_extent(); + *size = incount * std::max(datatype->size(), datatype->get_extent()); return MPI_SUCCESS; }