A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Pack_size is meant to return the upper bound of the size.
[simgrid.git]
/
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
d7061c2
..
7155047
100644
(file)
--- 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<long>(datatype->size(), datatype->get_extent()
);
return MPI_SUCCESS;
}