13
13
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
14
14
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
15
15
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
16
- * Copyright (c) 2014 Research Organization for Information Science
16
+ * Copyright (c) 2014-2015 Research Organization for Information Science
17
17
* and Technology (RIST). All rights reserved.
18
18
* $COPYRIGHT$
19
19
*
@@ -36,7 +36,7 @@ int32_t ompi_datatype_create_subarray(int ndims,
36
36
const ompi_datatype_t * oldtype ,
37
37
ompi_datatype_t * * newtype )
38
38
{
39
- MPI_Datatype last_type ;
39
+ ompi_datatype_t * last_type ;
40
40
int32_t i , step , end_loop ;
41
41
MPI_Aint size , displ , extent ;
42
42
@@ -102,6 +102,7 @@ int32_t ompi_datatype_create_subarray(int ndims,
102
102
* newtype = ompi_datatype_create ( last_type -> super .desc .used );
103
103
ompi_datatype_add ( * newtype , last_type , 1 , displ * extent , size * extent );
104
104
ompi_datatype_destroy ( & last_type );
105
+ opal_datatype_resize ( & (* newtype )-> super , 0 , size * extent );
105
106
106
107
return OMPI_SUCCESS ;
107
108
}
0 commit comments