From: Augustin Degomme Date: Mon, 17 Jun 2013 16:13:26 +0000 (+0200) Subject: if we send 0 data, don't bother with subtypes X-Git-Tag: v3_9_90~253 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8eb1dd81f53db215cf73319dc485f120addefe2d?hp=964e31805a6409921f1e3a2cd497c15898b4b62b if we send 0 data, don't bother with subtypes --- diff --git a/src/smpi/smpi_mpi_dt.c b/src/smpi/smpi_mpi_dt.c index b233c413d4..22be36c59c 100644 --- a/src/smpi/smpi_mpi_dt.c +++ b/src/smpi/smpi_mpi_dt.c @@ -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;