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

ROMIO: improve handling of large datatypes



MPI-3 introduced MPI_Count and MPI_Type_size_x.  Use these new routines
throughout ROMIO to support large datatypes.

Still to do:
- update other ADIO drivers
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent e518cb4c
......@@ -43,7 +43,7 @@ void ADIOI_Print_flatlist_node(ADIOI_Flatlist_node *flatlist_node_p)
return;
}
fprintf(stderr, "print flatlist node count = %d (idx,blocklen)\n",
flatlist_node_p->count);
(int)flatlist_node_p->count);
for (i = 0; i < flatlist_node_p->count; i++)
{
if (i % 5 == 0 && i != 0)
......
......@@ -21,7 +21,7 @@ void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count,
{
off_t err_lseek = -1;
ssize_t err = -1;
int datatype_size;
MPI_Count datatype_size;
ADIO_Offset len, bytes_xfered=0;
size_t rd_count;
static char myname[] = "ADIOI_GEN_READCONTIG";
......@@ -30,8 +30,8 @@ void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count,
#ifdef AGGREGATION_PROFILE
MPE_Log_event (5034, 0, NULL);
#endif
MPI_Type_size(datatype, &datatype_size);
len = (ADIO_Offset)datatype_size * (ADIO_Offset)count;
MPI_Type_size_x(datatype, &datatype_size);
len = datatype_size * (ADIO_Offset)count;
if (file_ptr_type == ADIO_INDIVIDUAL) {
offset = fd->fp_ind;
......
......@@ -281,8 +281,8 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype
ADIO_Offset *end_offset_ptr, int
*contig_access_count_ptr)
{
int filetype_size, etype_size;
unsigned buftype_size;
MPI_Count filetype_size, etype_size;
MPI_Count buftype_size;
int i, j, k;
ADIO_Offset i_offset;
ADIO_Offset frd_size=0, old_frd_size=0;
......@@ -306,10 +306,10 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
MPI_Type_size(fd->filetype, &filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_lb(fd->filetype, &filetype_lb);
MPI_Type_size(datatype, (int*)&buftype_size);
MPI_Type_size_x(datatype, &buftype_size);
etype_size = fd->etype_size;
if ( ! filetype_size ) {
......@@ -359,7 +359,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype
#ifdef RDCOLL_DEBUG
{
int ii;
DBG_FPRINTF(stderr, "flattened %3d : ", flat_file->count );
DBG_FPRINTF(stderr, "flattened %3lld : ", flat_file->count );
for (ii=0; ii<flat_file->count; ii++) {
DBG_FPRINTF(stderr, "%16qd:%-16qd", flat_file->indices[ii], flat_file->blocklens[ii] );
}
......
......@@ -55,7 +55,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
int n_etypes_in_filetype;
ADIO_Offset n_filetypes, etype_in_filetype, st_n_filetypes, size_in_filetype;
ADIO_Offset abs_off_in_filetype=0, new_frd_size, frd_size=0, st_frd_size;
int filetype_size, etype_size, buftype_size, partial_read;
MPI_Count filetype_size, etype_size, buftype_size, partial_read;
MPI_Aint filetype_extent, buftype_extent;
int buf_count, buftype_is_contig, filetype_is_contig;
ADIO_Offset userbuf_off, req_len, sum;
......@@ -85,7 +85,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
MPI_Type_size(fd->filetype, &filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
if ( ! filetype_size ) {
#ifdef HAVE_STATUS_SET_BYTES
MPIR_Status_set_bytes(status, datatype, 0);
......@@ -95,7 +95,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
}
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size(datatype, &buftype_size);
MPI_Type_size_x(datatype, &buftype_size);
MPI_Type_extent(datatype, &buftype_extent);
etype_size = fd->etype_size;
......
......@@ -54,7 +54,7 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype,
to be all contiguous. */
}
MPI_Type_size(fd->etype, &(fd->etype_size));
MPI_Type_size_x(fd->etype, &(fd->etype_size));
fd->disp = disp;
/* reset MPI-IO file pointer to point to the first byte that can
......
......@@ -21,7 +21,7 @@ void ADIOI_GEN_WriteContig(ADIO_File fd, const void *buf, int count,
{
off_t err_lseek = -1;
ssize_t err = -1;
int datatype_size;
MPI_Count datatype_size;
ADIO_Offset len, bytes_xfered=0;
size_t wr_count;
static char myname[] = "ADIOI_GEN_WRITECONTIG";
......@@ -31,7 +31,7 @@ void ADIOI_GEN_WriteContig(ADIO_File fd, const void *buf, int count,
MPE_Log_event (5036, 0, NULL);
#endif
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
len = (ADIO_Offset)datatype_size * (ADIO_Offset)count;
if (file_ptr_type == ADIO_INDIVIDUAL) {
......
......@@ -35,7 +35,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
int n_etypes_in_filetype;
ADIO_Offset n_filetypes, etype_in_filetype, size, sum;
ADIO_Offset abs_off_in_filetype=0, size_in_filetype;
int filetype_size, etype_size, buftype_size;
MPI_Count filetype_size, etype_size, buftype_size;
MPI_Aint filetype_extent, buftype_extent, indx;
int buf_count, buftype_is_contig, filetype_is_contig;
ADIO_Offset off, disp;
......@@ -58,7 +58,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
MPI_Type_size(fd->filetype, &filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
if ( ! filetype_size ) {
#ifdef HAVE_STATUS_SET_BYTES
MPIR_Status_set_bytes(status, datatype, 0);
......@@ -73,7 +73,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
#endif
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size(datatype, &buftype_size);
MPI_Type_size_x(datatype, &buftype_size);
MPI_Type_extent(datatype, &buftype_extent);
etype_size = fd->etype_size;
......
......@@ -122,13 +122,14 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
int n_etypes_in_filetype;
ADIO_Offset num, size, n_filetypes, etype_in_filetype, st_n_filetypes;
ADIO_Offset abs_off_in_filetype=0;
int filetype_size, etype_size, buftype_size;
MPI_Count filetype_size, etype_size, buftype_size;
MPI_Aint filetype_extent, buftype_extent;
int buf_count, buftype_is_contig, filetype_is_contig;
ADIO_Offset userbuf_off;
ADIO_Offset off, req_off, disp, end_offset=0, writebuf_off, start_off;
char *writebuf;
unsigned bufsize, writebuf_len, max_bufsize, write_sz;
unsigned writebuf_len, max_bufsize, write_sz;
MPI_Aint bufsize;
ADIO_Status status1;
ADIO_Offset new_bwr_size, new_fwr_size, st_fwr_size, fwr_size=0, bwr_size, req_len;
static char myname[] = "ADIOI_GEN_WriteStrided";
......@@ -155,7 +156,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
MPI_Type_size(fd->filetype, &filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
if ( ! filetype_size ) {
#ifdef HAVE_STATUS_SET_BYTES
MPIR_Status_set_bytes(status, datatype, 0);
......@@ -165,11 +166,11 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
}
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size(datatype, &buftype_size);
MPI_Type_size_x(datatype, &buftype_size);
MPI_Type_extent(datatype, &buftype_extent);
etype_size = fd->etype_size;
ADIOI_Assert((buftype_size * count) == ((ADIO_Offset)(unsigned)buftype_size * (ADIO_Offset)count));
ADIOI_Assert((buftype_size * count) == ((ADIO_Offset)buftype_size * (ADIO_Offset)count));
bufsize = buftype_size * count;
/* get max_bufsize from the info object. */
......@@ -285,6 +286,10 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
/* this could happen, for example, with subarray types that are
* actually fairly contiguous */
if (buftype_is_contig && bufsize <= fwr_size) {
/* though MPI api has an integer 'count' parameter, derived
* datatypes might describe more bytes than can fit into an integer.
* Other WriteContig calls in this path are operating on data
* sieving buffer */
ADIO_WriteContig(fd, buf, bufsize, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
offset, status, error_code);
......@@ -475,6 +480,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
fd->fp_sys_posn = -1; /* set it to null. */
#ifdef HAVE_STATUS_SET_BYTES
/* datatypes returning negagive values, probably related to tt 1893 */
MPIR_Status_set_bytes(status, datatype, bufsize);
/* This is a temporary way of filling in status. The right way is to
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
......
......@@ -23,7 +23,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
int n_etypes_in_filetype;
ADIO_Offset size, n_filetypes, etype_in_filetype;
ADIO_Offset abs_off_in_filetype=0, req_len;
int filetype_size, etype_size, buftype_size;
MPI_Count filetype_size, etype_size, buftype_size;
MPI_Aint filetype_extent, buftype_extent;
int buf_count, buftype_is_contig, filetype_is_contig;
ADIO_Offset userbuf_off;
......@@ -35,7 +35,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
ADIOI_Datatype_iscontig(buftype, &buftype_is_contig);
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
MPI_Type_size(fd->filetype, &filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
if ( ! filetype_size ) {
#ifdef HAVE_STATUS_SET_BYTES
MPIR_Status_set_bytes(status, buftype, 0);
......@@ -45,7 +45,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
}
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size(buftype, &buftype_size);
MPI_Type_size_x(buftype, &buftype_size);
MPI_Type_extent(buftype, &buftype_extent);
etype_size = fd->etype_size;
......
......@@ -16,7 +16,7 @@ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp)
ADIOI_Flatlist_node *flat_file;
int i;
ADIO_Offset n_filetypes, etype_in_filetype, sum, abs_off_in_filetype=0, size_in_filetype;
unsigned n_etypes_in_filetype, filetype_size, etype_size;
MPI_Count n_etypes_in_filetype, filetype_size, etype_size;
int filetype_is_contig;
MPI_Aint filetype_extent;
......@@ -29,7 +29,7 @@ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp)
flat_file = ADIOI_Flatlist;
while (flat_file->type != fd->filetype) flat_file = flat_file->next;
MPI_Type_size(fd->filetype, (int*)&filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
n_etypes_in_filetype = filetype_size/etype_size;
n_filetypes = offset / n_etypes_in_filetype;
etype_in_filetype = offset % n_etypes_in_filetype;
......
......@@ -21,7 +21,8 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
#ifdef HAVE_MPIR_TYPE_FLATTEN
MPI_Aint flatten_idx;
#endif
int curr_index=0, is_contig;
MPI_Count curr_index=0;
int is_contig;
ADIOI_Flatlist_node *flat, *prev=0;
/* check if necessary to flatten. */
......@@ -60,7 +61,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
flat->count = ADIOI_Count_contiguous_blocks(datatype, &curr_index);
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: count %#X, cur_idx = %#X\n",flat->count,curr_index);
DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: count %#z, cur_idx = %#X\n",flat->count,curr_index);
#endif
/* DBG_FPRINTF(stderr, "%d\n", flat->count);*/
......@@ -104,7 +105,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
* Assumption: input datatype is not a basic!!!!
*/
void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
ADIO_Offset st_offset, int *curr_index)
ADIO_Offset st_offset, MPI_Count *curr_index)
{
int i, j, k, m, n, num, basic_num, prev_index;
int combiner, old_combiner, old_is_contig;
......@@ -112,8 +113,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
/* By using ADIO_Offset we preserve +/- sign and
avoid >2G integer arithmetic problems */
ADIO_Offset top_count;
/* By using unsigned we avoid >2G integer arithmetic problems */
unsigned old_size;
MPI_Count old_size;
MPI_Aint old_extent;/* Assume extents are non-negative */
int *ints;
MPI_Aint *adds; /* Make no assumptions about +/- sign on these */
......@@ -223,7 +223,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
/* simplest case, made up of basic or contiguous types */
j = *curr_index;
flat->indices[j] = st_offset;
MPI_Type_size(types[0], (int*)&old_size);
MPI_Type_size_x(types[0], &old_size);
flat->blocklens[j] = top_count * old_size;
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple flat->indices[%#X] %#llX, flat->blocklens[%#X] %#llX\n",j, flat->indices[j], j, flat->blocklens[j]);
......@@ -271,7 +271,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
ADIO_Offset blocklength = ints[1], stride = ints[2];
j = *curr_index;
flat->indices[j] = st_offset;
MPI_Type_size(types[0], (int*)&old_size);
MPI_Type_size_x(types[0], &old_size);
flat->blocklens[j] = blocklength * old_size;
for (i=j+1; i<j+top_count; i++) {
flat->indices[i] = flat->indices[i-1] + stride * old_size;
......@@ -334,7 +334,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
ADIO_Offset blocklength = ints[1];
j = *curr_index;
flat->indices[j] = st_offset;
MPI_Type_size(types[0], (int*)&old_size);
MPI_Type_size_x(types[0], &old_size);
flat->blocklens[j] = blocklength * old_size;
for (i=j+1; i<j+top_count; i++) {
flat->indices[i] = flat->indices[i-1] + adds[0];
......@@ -539,7 +539,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
if (prev_index == *curr_index) {
/* simplest case, indexed type made up of basic or contiguous types */
j = *curr_index;
MPI_Type_size(types[0], (int*)&old_size);
MPI_Type_size_x(types[0], &old_size);
for (i=j; i<j+top_count; i++) {
/* By using ADIO_Offset we preserve +/- sign and
avoid >2G integer arithmetic problems */
......@@ -612,7 +612,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
ADIO_Offset blocklength = ints[1+n];
j = *curr_index;
flat->indices[j] = st_offset + adds[n];
MPI_Type_size(types[n], (int*)&old_size);
MPI_Type_size_x(types[n], &old_size);
flat->blocklens[j] = blocklength * old_size;
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#X] %#llX, flat->blocklens[%#X] %#llX\n",n,adds[n],j, flat->indices[j], j, flat->blocklens[j]);
......@@ -673,7 +673,7 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
/* current type is basic or contiguous */
j = *curr_index;
flat->indices[j] = st_offset;
MPI_Type_size(types[0], (int*)&old_size);
MPI_Type_size_x(types[0], &old_size);
flat->blocklens[j] = old_size;
#ifdef FLATTEN_DEBUG
......@@ -740,7 +740,8 @@ int ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, int *curr_index)
*curr_index = blks;
return blks;
#else
int count=0, i, n, num, basic_num, prev_index;
int i, n, num, basic_num, prev_index;
MPI_Count count=0;
int top_count, combiner, old_combiner, old_is_contig;
int nints, nadds, ntypes, old_nints, old_nadds, old_ntypes;
int *ints;
......
......@@ -16,7 +16,7 @@ void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset)
{
ADIOI_Flatlist_node *flat_file;
int i, flag;
unsigned filetype_size;
MPI_Count filetype_size;
int etype_size, filetype_is_contig;
MPI_Aint filetype_extent;
ADIO_Offset disp, byte_offset, sum=0, size_in_file, n_filetypes, frd_size;
......@@ -30,7 +30,7 @@ void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset)
flat_file = ADIOI_Flatlist;
while (flat_file->type != fd->filetype) flat_file = flat_file->next;
MPI_Type_size(fd->filetype, (int*)&filetype_size);
MPI_Type_size_x(fd->filetype, &filetype_size);
MPI_Type_extent(fd->filetype, &filetype_extent);
disp = fd->disp;
......
......@@ -14,18 +14,18 @@
* implementation fills status with something other than bytes (globus2 might
* do this) */
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype,
int nbytes)
MPI_Count nbytes)
{
ADIOI_UNREFERENCED_ARG(datatype);
/* it's ok that ROMIO stores number-of-bytes in status, not
* count-of-copies, as long as MPI_GET_COUNT knows what to do */
if (status != MPI_STATUS_IGNORE)
MPI_Status_set_elements(status, MPI_BYTE, nbytes);
MPI_Status_set_elements_x(status, MPI_BYTE, nbytes);
return MPI_SUCCESS;
}
#elif defined(MPILAM) || defined(MPISGI)
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype,
int nbytes)
MPI_Count nbytes)
{
/* Bogusness to silence compiler warnings */
if (datatype == MPI_DATATYPE_NULL);
......
......@@ -209,7 +209,7 @@ typedef struct ADIOI_FileD {
ADIO_Offset disp; /* reqd. for MPI-IO */
MPI_Datatype etype; /* reqd. for MPI-IO */
MPI_Datatype filetype; /* reqd. for MPI-IO */
int etype_size; /* in bytes */
MPI_Count etype_size; /* in bytes */
ADIOI_Hints *hints; /* structure containing fs-indep. info values */
MPI_Info info;
......
......@@ -104,7 +104,7 @@ enum {
typedef struct ADIOI_Fl_node {
MPI_Datatype type;
int count; /* no. of contiguous blocks */
MPI_Count count; /* no. of contiguous blocks */
ADIO_Offset *blocklens; /* array of contiguous block lengths (bytes)*/
ADIO_Offset *indices; /* array of byte offsets of each block */
struct ADIOI_Fl_node *next; /* pointer to next node */
......@@ -318,7 +318,7 @@ typedef struct {
void ADIOI_SetFunctions(ADIO_File fd);
void ADIOI_Flatten_datatype(MPI_Datatype type);
void ADIOI_Flatten(MPI_Datatype type, ADIOI_Flatlist_node *flat,
ADIO_Offset st_offset, int *curr_index);
ADIO_Offset st_offset, MPI_Count *curr_index);
void ADIOI_Delete_flattened(MPI_Datatype datatype);
int ADIOI_Count_contiguous_blocks(MPI_Datatype type, int *curr_index);
void ADIOI_Complete_async(int *error_code);
......@@ -558,7 +558,10 @@ void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset size, int *error_code);
int ADIOI_Error(ADIO_File fd, int error_code, char *string);
int MPIR_Err_setmsg( int, int, const char *, const char *, const char *, ... );
int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state);
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, int nbytes);
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, MPI_Count nbytes);
#ifdef HAVE_MPIR_TYPE_GET_CONTIG_BLOCKS
MPI_Count MPIR_Type_get_contig_blocks(MPI_Datatype datatype, MPI_Count *nr_blocks_p);
#endif
int ADIOI_Uses_generic_read(ADIO_File fd);
int ADIOI_Uses_generic_write(ADIO_File fd);
int ADIOI_Err_create_code(const char *myname, const char *filename, int my_errno);
......
......@@ -74,7 +74,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
MPI_Datatype datatype, char *myname, MPI_Request *request)
{
int error_code, bufsize, buftype_is_contig, filetype_is_contig;
int datatype_size;
MPI_Count datatype_size;
ADIO_Status status;
ADIO_File adio_fh;
ADIO_Offset off;
......@@ -98,7 +98,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
}
/* --END ERROR HANDLING-- */
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_INTEGRAL_ETYPE(adio_fh, count, datatype_size, myname, error_code);
......
......@@ -46,7 +46,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
int error_code, bufsize, buftype_is_contig, filetype_is_contig;
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_IREAD_SHARED";
int datatype_size, incr;
MPI_Count datatype_size, incr;
MPI_Status status;
ADIO_Offset off, shared_fp;
MPI_Offset nbytes=0;
......@@ -61,7 +61,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
MPIO_CHECK_DATATYPE(adio_fh, datatype, myname, error_code);
/* --END ERROR HANDLING-- */
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_INTEGRAL_ETYPE(adio_fh, count, datatype_size, myname, error_code);
......
......@@ -81,7 +81,7 @@ int MPIOI_File_iwrite(MPI_File fh,
MPI_Request *request)
{
int error_code, bufsize, buftype_is_contig, filetype_is_contig;
int datatype_size;
MPI_Count datatype_size;
ADIO_Status status;
ADIO_Offset off;
ADIO_File adio_fh;
......@@ -104,7 +104,7 @@ int MPIOI_File_iwrite(MPI_File fh,
}
/* --END ERROR HANDLING-- */
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_INTEGRAL_ETYPE(adio_fh, count, datatype_size, myname, error_code);
......
......@@ -46,7 +46,8 @@ int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count,
{
int error_code, bufsize, buftype_is_contig, filetype_is_contig;
ADIO_File adio_fh;
int datatype_size, incr;
int incr;
MPI_Count datatype_size;
ADIO_Status status;
ADIO_Offset off, shared_fp;
static char myname[] = "MPI_FILE_IWRITE_SHARED";
......@@ -61,7 +62,7 @@ int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count,
MPIO_CHECK_DATATYPE(adio_fh, datatype, myname, error_code);
/* --END ERROR HANDLING-- */
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_INTEGRAL_ETYPE(adio_fh, count, datatype_size, myname, error_code);
......
......@@ -71,7 +71,7 @@ int MPIOI_File_read(MPI_File fh,
MPI_Status *status)
{
int error_code, bufsize, buftype_is_contig, filetype_is_contig;
int datatype_size;
MPI_Count datatype_size;
ADIO_File adio_fh;
ADIO_Offset off;
void *xbuf=NULL, *e32_buf=NULL;
......@@ -95,7 +95,7 @@ int MPIOI_File_read(MPI_File fh,
}
/* --END ERROR HANDLING-- */
MPI_Type_size(datatype, &datatype_size);
MPI_Type_size_x(datatype, &datatype_size);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_COUNT_SIZE(adio_fh, count, datatype_size, myname, error_code);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment