diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmpio.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 1a768c2..73237b7 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1454,10 +1454,10 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add int mpi_code; /* mpi return code */ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */ int size_i; /* Integer copy of 'size' to read */ - int bytes_read; /* Number of bytes read in */ + MPI_Count bytes_read; /* Number of bytes read in */ int n; - int type_size; /* MPI datatype used for I/O's size */ - int io_size; /* Actual number of bytes requested */ + MPI_Count type_size; /* MPI datatype used for I/O's size */ + MPI_Count io_size; /* Actual number of bytes requested */ H5P_genplist_t *plist = NULL; /* Property list pointer */ hbool_t use_view_this_time = FALSE; herr_t ret_value = SUCCEED; @@ -1574,16 +1574,11 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add } /* How many bytes were actually read? */ - /* [This works because the "basic elements" we use for all our MPI derived - * types are MPI_BYTE. We should be using the 'buf_type' for the MPI - * datatype in this call though... (We aren't because using it causes - * the LANL "qsc" machine to dump core - 12/19/03) - QAK] - */ - if (MPI_SUCCESS != (mpi_code=MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read))) + if (MPI_SUCCESS != (mpi_code=MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_read))) HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code) /* Get the type's size */ - if (MPI_SUCCESS != (mpi_code=MPI_Type_size(buf_type,&type_size))) + if (MPI_SUCCESS != (mpi_code=MPI_Type_size_x(buf_type,&type_size))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code) /* Compute the actual number of bytes requested */ @@ -1739,9 +1734,10 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, MPI_Status mpi_stat; /* Status from I/O operation */ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */ int mpi_code; /* MPI return code */ - int size_i, bytes_written; - int type_size; /* MPI datatype used for I/O's size */ - int io_size; /* Actual number of bytes requested */ + MPI_Count bytes_written; + int size_i; + MPI_Count type_size; /* MPI datatype used for I/O's size */ + MPI_Count io_size; /* Actual number of bytes requested */ hbool_t use_view_this_time = FALSE; H5P_genplist_t *plist = NULL; /* Property list pointer */ herr_t ret_value = SUCCEED; @@ -1868,16 +1864,11 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, } /* How many bytes were actually written? */ - /* [This works because the "basic elements" we use for all our MPI derived - * types are MPI_BYTE. We should be using the 'buf_type' for the MPI - * datatype in this call though... (We aren't because using it causes - * the LANL "qsc" machine to dump core - 12/19/03) - QAK] - */ - if(MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written))) + if(MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_written))) HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code) /* Get the type's size */ - if(MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size))) + if(MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code) /* Compute the actual number of bytes requested */ |