Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
if we send 0 data, don't bother with subtypes
authorAugustin Degomme <degomme@idpann.imag.fr>
Mon, 17 Jun 2013 16:13:26 +0000 (18:13 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Tue, 18 Jun 2013 12:06:12 +0000 (14:06 +0200)
src/smpi/smpi_mpi_dt.c

index b233c41..22be36c 100644 (file)
@@ -286,7 +286,7 @@ void smpi_datatype_create(MPI_Datatype* new_type, int size,int lb, int ub, int h
                           void *struct_type, int flags){
   MPI_Datatype new_t= xbt_new(s_smpi_mpi_datatype_t,1);
   new_t->size = size;
-  new_t->has_subtype = has_subtype;
+  new_t->has_subtype = size>0? has_subtype:0;
   new_t->lb = lb;
   new_t->ub = ub;
   new_t->flags = flags;