Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix size of allocated buffer
authorAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 09:20:03 +0000 (11:20 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 18:03:31 +0000 (20:03 +0200)
src/smpi/bindings/smpi_pmpi_type.cpp

index 5aa26ad..d7061c2 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "private.hpp"
 #include "smpi_datatype_derived.hpp"
+#include "smpi_comm.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
@@ -337,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->size();
+  *size=incount*datatype->get_extent();
   return MPI_SUCCESS;
 }