From 8eb1dd81f53db215cf73319dc485f120addefe2d Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Mon, 17 Jun 2013 18:13:26 +0200 Subject: [PATCH 1/1] if we send 0 data, don't bother with subtypes --- src/smpi/smpi_mpi_dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1