Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
leak-- (duplicate of a predefined datatype can be released)
authordegomme <augustin.degomme@unibas.ch>
Thu, 28 Apr 2016 13:37:09 +0000 (15:37 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Thu, 28 Apr 2016 14:59:48 +0000 (16:59 +0200)
src/smpi/smpi_mpi_dt.cpp

index 3002836..559db5e 100644 (file)
@@ -179,6 +179,7 @@ int smpi_datatype_dup(MPI_Datatype datatype, MPI_Datatype* new_t)
   *new_t= xbt_new(s_smpi_mpi_datatype_t,1);
   memcpy(*new_t, datatype, sizeof(s_smpi_mpi_datatype_t));
   (*new_t)->in_use=1;
+  (*new_t)->flags &= ~DT_FLAG_PREDEFINED;
   if (datatype->sizeof_substruct){
     (*new_t)->substruct=xbt_malloc(datatype->sizeof_substruct);
     memcpy((*new_t)->substruct, datatype->substruct, datatype->sizeof_substruct);