Commit c66f9012 authored by Rob Latham's avatar Rob Latham
Browse files

Increase size of internal datatype values



Trying to find all places in the datatype/dataloop code that put size of
datatype into an integer.  It's easy, even under MPI-2, to describe more
than an integers worth of data with an MPI datatype.

since Dataloop code calls other dataloop code, just go ahead and make
everything a DLOOP_Count type

Fixes #1890
Fixes #1893
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent e527fa1d
......@@ -77,7 +77,8 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
MPI_C_COMPLEX, MPI_C_DOUBLE_COMPLEX, MPI_C_LONG_DOUBLE_COMPLEX,
};
MPI_Datatype matched_datatype = MPI_DATATYPE_NULL;
int i, tsize;
int i;
MPI_Aint tsize;
MPIU_THREADPRIV_DECL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_MATCH_SIZE);
......
......@@ -97,13 +97,13 @@ Input Parameters:
@*/
void PREPEND_PREFIX(Dataloop_copy)(void *dest,
void *src,
int size)
DLOOP_Size size)
{
DLOOP_Offset ptrdiff;
#ifdef DLOOP_DEBUG_MEMORY
DLOOP_dbg_printf("DLOOP_Dataloop_copy: copying from %x to %x (%d bytes).\n",
(int) src, (int) dest, size);
DLOOP_dbg_printf("DLOOP_Dataloop_copy: copying from %x to %x (%z bytes).\n",
(int) src, (int) dest, (size_t)size);
#endif
/* copy region first */
......@@ -286,7 +286,7 @@ Input Parameters:
void PREPEND_PREFIX(Dataloop_alloc)(int kind,
DLOOP_Count count,
DLOOP_Dataloop **new_loop_p,
int *new_loop_sz_p)
MPI_Aint *new_loop_sz_p)
{
PREPEND_PREFIX(Dataloop_alloc_and_copy)(kind,
count,
......@@ -317,15 +317,15 @@ Input Parameters:
void PREPEND_PREFIX(Dataloop_alloc_and_copy)(int kind,
DLOOP_Count count,
DLOOP_Dataloop *old_loop,
int old_loop_sz,
DLOOP_Size old_loop_sz,
DLOOP_Dataloop **new_loop_p,
int *new_loop_sz_p)
DLOOP_Size *new_loop_sz_p)
{
int new_loop_sz = 0;
DLOOP_Size new_loop_sz = 0;
int align_sz = 8; /* default aligns everything to 8-byte boundaries */
int epsilon;
int loop_sz = sizeof(DLOOP_Dataloop);
int off_sz = 0, blk_sz = 0, ptr_sz = 0, extent_sz = 0;
DLOOP_Size loop_sz = sizeof(DLOOP_Dataloop);
DLOOP_Size off_sz = 0, blk_sz = 0, ptr_sz = 0, extent_sz = 0;
char *pos;
DLOOP_Dataloop *new_loop;
......@@ -386,7 +386,7 @@ void PREPEND_PREFIX(Dataloop_alloc_and_copy)(int kind,
}
#ifdef DLOOP_DEBUG_MEMORY
DLOOP_dbg_printf("DLOOP_Dataloop_alloc_and_copy: new loop @ %x (tot sz = %d, loop = %d, off = %d, blk = %d, ptr = %d, extent = %d, old = %d)\n",
DLOOP_dbg_printf("DLOOP_Dataloop_alloc_and_copy: new loop @ %x (tot sz = %z, loop = %z, off = %z, blk = %z, ptr = %z, extent = %z, old = %z)\n",
(int) new_loop,
new_loop_sz,
loop_sz,
......@@ -505,17 +505,17 @@ Input Parameters:
old_loop_p (count elements).
@*/
void PREPEND_PREFIX(Dataloop_struct_alloc)(DLOOP_Count count,
int old_loop_sz,
DLOOP_Size old_loop_sz,
int basic_ct,
DLOOP_Dataloop **old_loop_p,
DLOOP_Dataloop **new_loop_p,
int *new_loop_sz_p)
DLOOP_Size *new_loop_sz_p)
{
int new_loop_sz = 0;
DLOOP_Size new_loop_sz = 0;
int align_sz = 8; /* default aligns everything to 8-byte boundaries */
int epsilon;
int loop_sz = sizeof(DLOOP_Dataloop);
int off_sz, blk_sz, ptr_sz, extent_sz, basic_sz;
DLOOP_Size loop_sz = sizeof(DLOOP_Dataloop);
DLOOP_Size off_sz, blk_sz, ptr_sz, extent_sz, basic_sz;
DLOOP_Dataloop *new_loop;
......@@ -567,7 +567,7 @@ void PREPEND_PREFIX(Dataloop_struct_alloc)(DLOOP_Count count,
}
#ifdef DLOOP_DEBUG_MEMORY
DLOOP_dbg_printf("DLOOP_Dataloop_struct_alloc: new loop @ %x (tot sz = %d, loop = %d, off = %d, blk = %d, ptr = %d, extent = %d, basics = %d, old = %d)\n",
DLOOP_dbg_printf("DLOOP_Dataloop_struct_alloc: new loop @ %x (tot sz = %z, loop = %z, off = %z, blk = %z, ptr = %z, extent = %z, basics = %z, old = %z)\n",
(int) new_loop,
new_loop_sz,
loop_sz,
......@@ -603,7 +603,7 @@ void PREPEND_PREFIX(Dataloop_struct_alloc)(DLOOP_Count count,
Returns 0 on success, -1 on failure.
@*/
void PREPEND_PREFIX(Dataloop_dup)(DLOOP_Dataloop *old_loop,
int old_loop_sz,
DLOOP_Count old_loop_sz,
DLOOP_Dataloop **new_loop_p)
{
DLOOP_Dataloop *new_loop;
......
......@@ -12,13 +12,13 @@
static void DLOOP_Dataloop_create_named(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag);
void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
......@@ -31,13 +31,15 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
MPI_Aint *aints;
DLOOP_Dataloop *old_dlp;
int old_dlsz, old_dldepth;
MPI_Aint old_dlsz;
int old_dldepth;
int dummy1, dummy2, dummy3, type0_combiner, ndims;
MPI_Datatype tmptype;
MPI_Aint stride;
MPI_Aint *disps;
DLOOP_Size *blklen;
MPIR_Type_get_envelope_impl(type, &nr_ints, &nr_aints, &nr_types, &combiner);
......@@ -222,13 +224,17 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
DLOOP_Free(disps);
break;
case MPI_COMBINER_INDEXED:
blklen = (DLOOP_Size *) DLOOP_Malloc(ints[0] * sizeof(DLOOP_Size));
for (i = 0; i < ints[0]; i++)
blklen[i] = ints[1+i];
PREPEND_PREFIX(Dataloop_create_indexed)(ints[0] /* count */,
&ints[1] /* blklens */,
blklen /* blklens */,
&ints[ints[0]+1] /* disp */,
0 /* disp not in bytes */,
types[0] /* oldtype */,
dlp_p, dlsz_p, dldepth_p,
flag);
DLOOP_Free(blklen);
break;
case MPI_COMBINER_HINDEXED_INTEGER:
case MPI_COMBINER_HINDEXED:
......@@ -243,8 +249,11 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
disps = aints;
}
blklen = (DLOOP_Size *) DLOOP_Malloc(ints[0] * sizeof(DLOOP_Size));
for (i=0; i< ints[0]; i++)
blklen[i] = (DLOOP_Size) ints[1+i];
PREPEND_PREFIX(Dataloop_create_indexed)(ints[0] /* count */,
&ints[1] /* blklens */,
blklen /* blklens */,
disps,
1 /* disp in bytes */,
types[0] /* oldtype */,
......@@ -254,6 +263,7 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
if (combiner == MPI_COMBINER_HINDEXED_INTEGER) {
DLOOP_Free(disps);
}
DLOOP_Free(blklen);
break;
case MPI_COMBINER_STRUCT_INTEGER:
......@@ -372,7 +382,7 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
@*/
static void DLOOP_Dataloop_create_named(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
......
......@@ -11,53 +11,56 @@
/* Dataloop construction functions */
void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_contiguous)(int count,
int PREPEND_PREFIX(Dataloop_create_contiguous)(DLOOP_Count count,
MPI_Datatype oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_vector)(int count,
int blocklength,
int PREPEND_PREFIX(Dataloop_create_vector)(DLOOP_Count count,
DLOOP_Size blocklength,
MPI_Aint stride,
int strideinbytes,
MPI_Datatype oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_blockindexed)(int count,
int blklen,
int PREPEND_PREFIX(Dataloop_create_blockindexed)(DLOOP_Count count,
DLOOP_Size blklen,
const void *disp_array,
int dispinbytes,
MPI_Datatype oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_indexed)(int count,
const int *blocklength_array,
/* we bump up the size of the blocklength array because create_struct might use
* create_indexed in an optimization, and in course of doing so, generate a
* request of a large blocklength. */
int PREPEND_PREFIX(Dataloop_create_indexed)(DLOOP_Count count,
const DLOOP_Size *blocklength_array,
const void *displacement_array,
int dispinbytes,
MPI_Datatype oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_struct)(int count,
int PREPEND_PREFIX(Dataloop_create_struct)(DLOOP_Count count,
const int *blklen_array,
const MPI_Aint *disp_array,
const MPI_Datatype *oldtype_array,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
int PREPEND_PREFIX(Dataloop_create_pairtype)(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag);
......@@ -81,7 +84,7 @@ int PREPEND_PREFIX(Type_convert_darray)(int size,
MPI_Datatype *newtype);
DLOOP_Count PREPEND_PREFIX(Type_indexed_count_contig)(DLOOP_Count count,
const int *blocklength_array,
const DLOOP_Count *blocklength_array,
const void *displacement_array,
int dispinbytes,
DLOOP_Offset old_extent);
......
......@@ -19,7 +19,7 @@ static void DLOOP_Type_blockindexed_array_copy(DLOOP_Count count,
Dataloop_create_blockindexed - create blockindexed dataloop
Arguments:
+ int count
+ DLOOP_Count count
. void *displacement_array (array of either MPI_Aints or ints)
. int displacement_in_bytes (boolean)
. MPI_Datatype old_type
......@@ -31,18 +31,19 @@ static void DLOOP_Type_blockindexed_array_copy(DLOOP_Count count,
.N Errors
.N Returns 0 on success, -1 on failure.
@*/
int PREPEND_PREFIX(Dataloop_create_blockindexed)(int icount,
int iblklen,
int PREPEND_PREFIX(Dataloop_create_blockindexed)(DLOOP_Count icount,
DLOOP_Count iblklen,
const void *disp_array,
int dispinbytes,
DLOOP_Type oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag)
{
int err, is_builtin, is_vectorizable = 1;
int i, new_loop_sz, old_loop_depth;
int i, old_loop_depth;
DLOOP_Size new_loop_sz;
DLOOP_Count contig_count, count, blklen;
DLOOP_Offset old_extent, eff_disp0, eff_disp1, last_stride;
......@@ -201,7 +202,7 @@ int PREPEND_PREFIX(Dataloop_create_blockindexed)(int icount,
else
{
DLOOP_Dataloop *old_loop_ptr = NULL;
int old_loop_sz = 0;
MPI_Aint old_loop_sz = 0;
DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr, flag);
DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz, flag);
......
......@@ -22,20 +22,21 @@
.N Errors
.N Returns 0 on success, -1 on failure.
@*/
int PREPEND_PREFIX(Dataloop_create_contiguous)(int icount,
int PREPEND_PREFIX(Dataloop_create_contiguous)(DLOOP_Count icount,
DLOOP_Type oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag)
{
DLOOP_Count count;
int is_builtin, apply_contig_coalescing = 0;
int new_loop_sz, new_loop_depth;
int new_loop_depth;
DLOOP_Size new_loop_sz;
DLOOP_Dataloop *new_dlp;
count = (DLOOP_Count) icount; /* avoid subsequent casting */
count = icount;
is_builtin = (DLOOP_Handle_hasloop_macro(oldtype)) ? 0 : 1;
......@@ -103,7 +104,7 @@ int PREPEND_PREFIX(Dataloop_create_contiguous)(int icount,
{
/* user-defined base type (oldtype) */
DLOOP_Dataloop *old_loop_ptr;
int old_loop_sz = 0;
MPI_Aint old_loop_sz = 0;
DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr, flag);
DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz, flag);
......
......@@ -11,7 +11,7 @@
static void DLOOP_Type_indexed_array_copy(DLOOP_Count count,
DLOOP_Count contig_count,
const int *input_blocklength_array,
const DLOOP_Size *input_blocklength_array,
const void *input_displacement_array,
DLOOP_Count *output_blocklength_array,
DLOOP_Offset *out_disp_array,
......@@ -23,7 +23,7 @@ static void DLOOP_Type_indexed_array_copy(DLOOP_Count count,
Arguments:
+ int icount
. int *iblocklength_array
. DLOOP_Size *iblocklength_array
. void *displacement_array (either ints or MPI_Aints)
. int dispinbytes
. MPI_Datatype oldtype
......@@ -36,18 +36,20 @@ static void DLOOP_Type_indexed_array_copy(DLOOP_Count count,
.N Returns 0 on success, -1 on error.
@*/
int PREPEND_PREFIX(Dataloop_create_indexed)(int icount,
const int *blocklength_array,
int PREPEND_PREFIX(Dataloop_create_indexed)(DLOOP_Count icount,
const DLOOP_Size *blocklength_array,
const void *displacement_array,
int dispinbytes,
MPI_Datatype oldtype,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
DLOOP_Size *dlsz_p,
int *dldepth_p,
int flag)
{
int err, is_builtin;
int i, new_loop_sz, old_loop_depth, blksz;
int old_loop_depth;
MPI_Aint i;
DLOOP_Size new_loop_sz, blksz;
DLOOP_Count first;
DLOOP_Count old_type_count = 0, contig_count, count;
......@@ -120,7 +122,7 @@ int PREPEND_PREFIX(Dataloop_create_indexed)(int icount,
((!dispinbytes && ((int *) displacement_array)[first] == 0) ||
(dispinbytes && ((MPI_Aint *) displacement_array)[first] == 0)))
{
err = PREPEND_PREFIX(Dataloop_create_contiguous)((int) old_type_count,
err = PREPEND_PREFIX(Dataloop_create_contiguous)(old_type_count,
oldtype,
dlp_p,
dlsz_p,
......@@ -143,7 +145,7 @@ int PREPEND_PREFIX(Dataloop_create_indexed)(int icount,
else
disp_arr_tmp = &(((const int *)displacement_array)[first]);
err = PREPEND_PREFIX(Dataloop_create_blockindexed)(1,
(int) old_type_count,
old_type_count,
disp_arr_tmp,
dispinbytes,
oldtype,
......@@ -228,7 +230,7 @@ int PREPEND_PREFIX(Dataloop_create_indexed)(int icount,
else
{
DLOOP_Dataloop *old_loop_ptr = NULL;
int old_loop_sz = 0;
MPI_Aint old_loop_sz = 0;
DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr, flag);
DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz, flag);
......@@ -299,7 +301,7 @@ int PREPEND_PREFIX(Dataloop_create_indexed)(int icount,
*/
static void DLOOP_Type_indexed_array_copy(DLOOP_Count count,
DLOOP_Count contig_count,
const int *in_blklen_array,
const DLOOP_Size *in_blklen_array,
const void *in_disp_array,
DLOOP_Count *out_blklen_array,
DLOOP_Offset *out_disp_array,
......@@ -384,7 +386,7 @@ static void DLOOP_Type_indexed_array_copy(DLOOP_Count count,
* Extent passed in is for the original type.
*/
DLOOP_Count PREPEND_PREFIX(Type_indexed_count_contig)(DLOOP_Count count,
const int *blocklength_array,
const DLOOP_Count *blocklength_array,
const void *displacement_array,
int dispinbytes,
DLOOP_Offset old_extent)
......
......@@ -38,7 +38,7 @@
@*/
int PREPEND_PREFIX(Dataloop_create_pairtype)(MPI_Datatype type,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
......
......@@ -12,30 +12,30 @@
#endif
static int DLOOP_Dataloop_create_struct_memory_error(void);
static int DLOOP_Dataloop_create_unique_type_struct(int count,
static int DLOOP_Dataloop_create_unique_type_struct(DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
int type_pos,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag);
static int DLOOP_Dataloop_create_basic_all_bytes_struct(
int count,
DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag);
static int DLOOP_Dataloop_create_flattened_struct(int count,
static int DLOOP_Dataloop_create_flattened_struct(DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag);
......@@ -64,12 +64,12 @@ Output Parameters:
or corrected in this code at this time.
@*/
int PREPEND_PREFIX(Dataloop_create_struct)(int count,
int PREPEND_PREFIX(Dataloop_create_struct)(DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
......@@ -79,8 +79,9 @@ int PREPEND_PREFIX(Dataloop_create_struct)(int count,
first_derived = MPI_DATATYPE_NULL;
/* variables used in general case only */
int loop_idx, new_loop_sz, new_loop_depth;
int old_loop_sz = 0, old_loop_depth = 0;
int loop_idx, new_loop_depth;
int old_loop_depth = 0;
MPI_Aint new_loop_sz, old_loop_sz = 0;
DLOOP_Dataloop *new_dlp, *curpos;
......@@ -259,7 +260,8 @@ int PREPEND_PREFIX(Dataloop_create_struct)(int count,
if (DLOOP_Handle_hasloop_macro(oldtypes[i]))
{
int tmp_loop_depth, tmp_loop_sz;
int tmp_loop_depth;
MPI_Aint tmp_loop_sz;
DLOOP_Handle_get_loopdepth_macro(oldtypes[i], tmp_loop_depth, flag);
DLOOP_Handle_get_loopsize_macro(oldtypes[i], tmp_loop_sz, flag);
......@@ -326,7 +328,8 @@ int PREPEND_PREFIX(Dataloop_create_struct)(int count,
if (is_builtin)
{
DLOOP_Dataloop *dummy_dlp;
int dummy_sz, dummy_depth;
int dummy_depth;
MPI_Aint dummy_sz;
/* LBs and UBs already taken care of -- skip them */
if (oldtypes[i] == MPI_LB || oldtypes[i] == MPI_UB)
......@@ -405,24 +408,25 @@ static int DLOOP_Dataloop_create_struct_memory_error(void)
}
/* --END ERROR HANDLING-- */
static int DLOOP_Dataloop_create_unique_type_struct(int count,
static int DLOOP_Dataloop_create_unique_type_struct(DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
int type_pos,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
/* the same type used more than once in the array; type_pos
* indexes to the first of these.
*/
int i, err, *tmp_blklens, cur_pos = 0;
int i, err, cur_pos = 0;
DLOOP_Size *tmp_blklens;
DLOOP_Offset *tmp_disps;
/* count is an upper bound on number of type instances */
tmp_blklens = (int *) DLOOP_Malloc(count * sizeof(int));
tmp_blklens = (DLOOP_Size *) DLOOP_Malloc(count * sizeof(DLOOP_Size));
/* --BEGIN ERROR HANDLING-- */
if (!tmp_blklens) {
/* TODO: ??? */
......@@ -468,21 +472,21 @@ static int DLOOP_Dataloop_create_unique_type_struct(int count,
}
static int DLOOP_Dataloop_create_basic_all_bytes_struct(
int count,
DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
int i, err, cur_pos = 0;
int *tmp_blklens;
DLOOP_Size *tmp_blklens;
MPI_Aint *tmp_disps;
/* count is an upper bound on number of type instances */
tmp_blklens = (int *) DLOOP_Malloc(count * sizeof(int));
tmp_blklens = (DLOOP_Size *) DLOOP_Malloc(count * sizeof(DLOOP_Size));
/* --BEGIN ERROR HANDLING-- */
if (!tmp_blklens)
......@@ -529,23 +533,25 @@ static int DLOOP_Dataloop_create_basic_all_bytes_struct(
return err;
}
static int DLOOP_Dataloop_create_flattened_struct(int count,
static int DLOOP_Dataloop_create_flattened_struct(DLOOP_Count count,
const int *blklens,
const MPI_Aint *disps,
const DLOOP_Type *oldtypes,
DLOOP_Dataloop **dlp_p,
int *dlsz_p,
MPI_Aint *dlsz_p,
int *dldepth_p,
int flag)
{
/* arbitrary types, convert to bytes and use indexed */
int i, err, *tmp_blklens, nr_blks = 0;
int i, err, nr_blks = 0;
DLOOP_Size *tmp_blklens;
MPI_Aint *tmp_disps; /* since we're calling another fn that takes
this type as an input parameter */
DLOOP_Offset bytes;
DLOOP_Segment *segp;