- smpi_datatype_create(new_type, size *
- smpi_datatype_size(old_type),1, subtype, DT_FLAG_DATA);
+ if (old_type->has_subtype == 1)
+ XBT_WARN("indexed contains a complex type - not yet handled");
+
+ if(!contiguous){
+ s_smpi_mpi_indexed_t* subtype = smpi_datatype_indexed_create( blocklens,
+ indices,
+ count,
+ old_type,
+ smpi_datatype_size(old_type));
+
+ smpi_datatype_create(new_type, size *
+ smpi_datatype_size(old_type),1, subtype, DT_FLAG_DATA);
+}else{
+ smpi_datatype_create(new_type, size *
+ smpi_datatype_size(old_type),0, NULL, DT_FLAG_DATA|DT_FLAG_CONTIGUOUS);
+}