summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-31 18:00:19 (GMT)
committerGitHub <noreply@github.com>2023-10-31 18:00:19 (GMT)
commit90893d28c2f2a795facba1e20eb99addae007f2d (patch)
tree58a755d76e01f5cd5aefe5400234e09712adf20c /src
parent71d8975b54310631bf8354e8a2e6751c03e4b2ba (diff)
downloadhdf5-90893d28c2f2a795facba1e20eb99addae007f2d.zip
hdf5-90893d28c2f2a795facba1e20eb99addae007f2d.tar.gz
hdf5-90893d28c2f2a795facba1e20eb99addae007f2d.tar.bz2
Drop MPI-2 support (#3643) (#3802)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dmpio.c16
-rw-r--r--src/H5FDmpio.c162
-rw-r--r--src/H5FDmpio.h12
-rw-r--r--src/H5Fmodule.h2
-rw-r--r--src/H5Smpio.c51
-rw-r--r--src/H5mpi.c19
6 files changed, 47 insertions, 215 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 5c2ee87..16243fa 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -4065,7 +4065,6 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
int mpi_rank, int H5_ATTR_NDEBUG_UNUSED mpi_size,
unsigned char ***chunk_msg_bufs, int *chunk_msg_bufs_len)
{
-#if H5_CHECK_MPI_VERSION(3, 0)
H5D_filtered_collective_chunk_info_t *chunk_table = NULL;
H5S_sel_iter_t *mem_iter = NULL;
unsigned char **msg_send_bufs = NULL;
@@ -4300,20 +4299,12 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
* post a non-blocking receive to receive it
*/
if (msg_flag) {
-#if H5_CHECK_MPI_VERSION(3, 0)
MPI_Count msg_size = 0;
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&status, MPI_BYTE, &msg_size)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements_x failed", mpi_code)
H5_CHECK_OVERFLOW(msg_size, MPI_Count, int);
-#else
- int msg_size = 0;
-
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&status, MPI_BYTE, &msg_size)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
-#endif
-
if (msg_size <= 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "invalid chunk modification message size");
@@ -4466,13 +4457,6 @@ done:
#endif
FUNC_LEAVE_NOAPI(ret_value)
-#else
- FUNC_ENTER_PACKAGE
- HERROR(
- H5E_DATASET, H5E_WRITEERROR,
- "unable to send chunk modification data between MPI ranks - MPI version < 3 (MPI_Ibarrier missing)")
- FUNC_LEAVE_NOAPI(FAIL)
-#endif
} /* end H5D__mpio_share_chunk_modification_data() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index ed704c2..7141550 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Purpose: This is the MPI-2 I/O driver.
+ * Purpose: This is the MPI I/O driver.
*/
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
@@ -363,12 +363,12 @@ H5FD__mpio_term(void)
* only in the parallel HDF5 library and is not collective.
*
* comm is the MPI communicator to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * defined in MPI_FILE_OPEN of MPI. This function makes a
* duplicate of comm. Any modification to comm after this function
* call returns has no effect on the access property list.
*
* info is the MPI Info object to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * defined in MPI_FILE_OPEN of MPI. This function makes a
* duplicate of info. Any modification to info after this
* function call returns has no effect on the access property
* list.
@@ -1222,20 +1222,13 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
MPI_Status mpi_stat; /* Status from I/O operation */
MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
int size_i; /* Integer copy of 'size' to read */
-#if H5_CHECK_MPI_VERSION(3, 0)
- MPI_Count bytes_read = 0; /* Number of bytes read in */
- MPI_Count type_size; /* MPI datatype used for I/O's size */
- MPI_Count io_size; /* Actual number of bytes requested */
- MPI_Count n;
-#else
- int bytes_read = 0; /* Number of bytes read in */
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
- int n;
-#endif
- bool use_view_this_time = false;
- bool derived_type = false;
- bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
+ MPI_Count bytes_read = 0; /* Number of bytes read in */
+ MPI_Count type_size; /* MPI datatype used for I/O's size */
+ MPI_Count io_size; /* Actual number of bytes requested */
+ MPI_Count n;
+ bool use_view_this_time = false;
+ bool derived_type = false;
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
@@ -1393,11 +1386,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Only retrieve bytes read if this rank _actually_ participated in I/O */
if (!rank0_bcast || (rank0_bcast && file->mpi_rank == 0)) {
/* How many bytes were actually read? */
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_read))) {
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read))) {
-#endif
if (rank0_bcast && file->mpi_rank == 0) {
/* If MPI_Get_elements(_x) fails for a rank 0 bcast strategy,
* push an error, but continue to participate in the following
@@ -1418,19 +1407,11 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
* of the data. (QAK - 2019/1/2)
*/
if (rank0_bcast)
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_COUNT, 0, file->comm))
-#else
- if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_INT, 0, file->comm))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", 0)
- /* Get the type's size */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* Get the type's size */
if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code)
/* Compute the actual number of bytes requested */
@@ -1486,19 +1467,13 @@ static herr_t
H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size,
const void *buf)
{
- H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
- MPI_Offset mpi_off;
- MPI_Status mpi_stat; /* Status from I/O operation */
- MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
-#if H5_CHECK_MPI_VERSION(3, 0)
- MPI_Count bytes_written;
- MPI_Count type_size; /* MPI datatype used for I/O's size */
- MPI_Count io_size; /* Actual number of bytes requested */
-#else
- int bytes_written;
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
-#endif
+ H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
+ MPI_Offset mpi_off;
+ MPI_Status mpi_stat; /* Status from I/O operation */
+ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
+ MPI_Count bytes_written;
+ MPI_Count type_size; /* MPI datatype used for I/O's size */
+ MPI_Count io_size; /* Actual number of bytes requested */
int size_i;
bool use_view_this_time = false;
bool derived_type = false;
@@ -1642,19 +1617,11 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
} /* end else */
/* How many bytes were actually written? */
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_written)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
- /* Get the type's size */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* Get the type's size */
if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code)
/* Compute the actual number of bytes requested */
@@ -1858,7 +1825,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
HMPI_GOTO_ERROR(FAIL, "MPI_Get_address for s_bufs[] - mpi_bufs_base failed", mpi_code)
/*... and then subtract mpi_bufs_base_Aint from it. */
-#if ((MPI_VERSION > 3) || ((MPI_VERSION == 3) && (MPI_SUBVERSION >= 1)))
+#if H5_CHECK_MPI_VERSION(3, 1)
mpi_bufs[i] = MPI_Aint_diff(mpi_bufs[i], mpi_bufs_base_Aint);
#else
mpi_bufs[i] = mpi_bufs[i] - mpi_bufs_base_Aint;
@@ -2085,18 +2052,11 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
H5FD_mpio_collective_opt_t coll_opt_mode; /* whether we are doing collective or independent I/O */
int size_i;
-#if MPI_VERSION >= 3
- MPI_Count bytes_read = 0; /* Number of bytes read in */
- MPI_Count type_size; /* MPI datatype used for I/O's size */
- MPI_Count io_size; /* Actual number of bytes requested */
- MPI_Count n;
-#else
- int bytes_read = 0; /* Number of bytes read in */
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
- int n;
-#endif
- bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
+ MPI_Count bytes_read = 0; /* Number of bytes read in */
+ MPI_Count type_size; /* MPI datatype used for I/O's size */
+ MPI_Count io_size; /* Actual number of bytes requested */
+ MPI_Count n;
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
@@ -2226,11 +2186,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Only retrieve bytes read if this rank _actually_ participated in I/O */
if (!rank0_bcast || (rank0_bcast && file->mpi_rank == 0)) {
/* How many bytes were actually read? */
-#if MPI_VERSION >= 3
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, buf_type, &bytes_read)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
} /* end if */
@@ -2243,19 +2199,11 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
* the bcast. (NAF - 2021/9/15)
*/
if (rank0_bcast)
-#if MPI_VERSION >= 3
if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_COUNT, 0, file->comm))
-#else
- if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_INT, 0, file->comm))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", 0)
- /* Get the type's size */
-#if MPI_VERSION >= 3
+ /* Get the type's size */
if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(buf_type, &type_size)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_size(buf_type, &type_size)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code)
/* Compute the actual number of bytes requested */
@@ -2275,13 +2223,8 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
do {
assert(i >= 0);
-#if MPI_VERSION >= 3
io_size = MIN(n, (MPI_Count)s_sizes[i]);
bytes_read = (MPI_Count)s_sizes[i] - io_size;
-#else
- io_size = MIN(n, (int)s_sizes[i]);
- bytes_read = (int)s_sizes[i] - io_size;
-#endif
assert(bytes_read >= 0);
memset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
@@ -2359,20 +2302,12 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code)
- /* How many bytes were actually read? */
-#if MPI_VERSION >= 3
+ /* How many bytes were actually read? */
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, MPI_BYTE, &bytes_read)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
- /* Compute the actual number of bytes requested */
-#if MPI_VERSION >= 3
+ /* Compute the actual number of bytes requested */
io_size = (MPI_Count)size;
-#else
- io_size = (int)size;
-#endif
/* Check for read failure */
if (bytes_read < 0 || bytes_read > io_size)
@@ -3008,18 +2943,11 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
void *mpi_bufs_base = NULL;
char unused = 0; /* Unused, except for non-NULL pointer value */
-#if H5_CHECK_MPI_VERSION(3, 0)
MPI_Count bytes_read = 0; /* Number of bytes read in */
MPI_Count type_size; /* MPI datatype used for I/O's size */
MPI_Count io_size; /* Actual number of bytes requested */
MPI_Count n;
-#else
- int bytes_read = 0; /* Number of bytes read in */
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
- int n;
-#endif
- bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
+ bool rank0_bcast = false; /* If read-with-rank0-and-bcast flag was used */
#ifdef H5FDmpio_DEBUG
bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
bool H5FD_mpio_debug_r_flag = (H5FD_mpio_debug_flags_s[(int)'r'] && H5FD_MPIO_TRACE_THIS_RANK(file));
@@ -3209,11 +3137,7 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
/* Only retrieve bytes read if this rank _actually_ participated in I/O */
if (!rank0_bcast || (rank0_bcast && file->mpi_rank == 0)) {
/* How many bytes were actually read? */
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, final_mtype, &bytes_read))) {
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read))) {
-#endif
if (rank0_bcast && file->mpi_rank == 0) {
/* If MPI_Get_elements(_x) fails for a rank 0 bcast strategy,
* push an error, but continue to participate in the following
@@ -3234,19 +3158,11 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
* of the data. (QAK - 2019/1/2)
*/
if (rank0_bcast)
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_COUNT, 0, file->comm))
-#else
- if (MPI_SUCCESS != MPI_Bcast(&bytes_read, 1, MPI_INT, 0, file->comm))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", 0);
- /* Get the type's size */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* Get the type's size */
if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(final_mtype, &type_size)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_size(final_mtype, &type_size)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code);
/* Compute the actual number of bytes requested */
@@ -3382,15 +3298,9 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
char unused = 0; /* Unused, except for non-NULL pointer value */
H5_flexible_const_ptr_t mbb;
-#if H5_CHECK_MPI_VERSION(3, 0)
MPI_Count bytes_written;
MPI_Count type_size; /* MPI datatype used for I/O's size */
MPI_Count io_size; /* Actual number of bytes requested */
-#else
- int bytes_written;
- int type_size; /* MPI datatype used for I/O's size */
- int io_size; /* Actual number of bytes requested */
-#endif
#ifdef H5FDmpio_DEBUG
bool H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] && H5FD_MPIO_TRACE_THIS_RANK(file));
@@ -3559,20 +3469,12 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code);
- /* How many bytes were actually written */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* How many bytes were actually written */
if (MPI_SUCCESS != (mpi_code = MPI_Get_elements_x(&mpi_stat, final_mtype, &bytes_written)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code);
- /* Get the type's size */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* Get the type's size */
if (MPI_SUCCESS != (mpi_code = MPI_Type_size_x(final_mtype, &type_size)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_size(final_mtype, &type_size)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_size failed", mpi_code);
/* Compute the actual number of bytes requested */
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 96a9366..60deec2 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -48,8 +48,8 @@ H5_DLL hid_t H5FD_mpio_init(void);
* \brief Stores MPI IO communicator information to the file access property list
*
* \fapl_id
- * \param[in] comm MPI-2 communicator
- * \param[in] info MPI-2 info object
+ * \param[in] comm MPI communicator
+ * \param[in] info MPI info object
* \returns \herr_t
*
* \details H5Pset_fapl_mpio() stores the user-supplied MPI IO parameters \p
@@ -61,12 +61,12 @@ H5_DLL hid_t H5FD_mpio_init(void);
* and is not a collective function.
*
* \p comm is the MPI communicator to be used for file open, as defined
- * in \c MPI_File_open of MPI-2. This function makes a duplicate of the
+ * in \c MPI_File_open of MPI. This function makes a duplicate of the
* communicator, so modifications to \p comm after this function call
* returns have no effect on the file access property list.
*
* \p info is the MPI Info object to be used for file open, as defined
- * in MPI_File_open() of MPI-2. This function makes a duplicate copy of
+ * in MPI_File_open() of MPI. This function makes a duplicate copy of
* the Info object, so modifications to the Info object after this
* function call returns will have no effect on the file access
* property list.
@@ -96,8 +96,8 @@ H5_DLL herr_t H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
* \brief Returns MPI IO communicator information
*
* \fapl_id
- * \param[out] comm MPI-2 communicator
- * \param[out] info MPI-2 info object
+ * \param[out] comm MPI communicator
+ * \param[out] info MPI info object
* \returns \herr_t
*
* \details If the file access property list is set to the #H5FD_MPIO driver,
diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h
index 8a3f8df..40ff6b4 100644
--- a/src/H5Fmodule.h
+++ b/src/H5Fmodule.h
@@ -1045,7 +1045,7 @@
* The file access properties managed by #H5Pset_fapl_mpio and retrieved by
* #H5Pget_fapl_mpio are the MPI communicator, comm, and the MPI info object, info. comm and
* info are used for file open. info is an information object much like an HDF5 property list. Both
- * are defined in MPI_FILE_OPEN of MPI-2.
+ * are defined in MPI_FILE_OPEN of MPI.
*
* The communicator and the info object are saved in the file access property list fapl_id.
* fapl_id can then be passed to MPI_FILE_OPEN to create and/or open the file.
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 10a9cd5..1e0fef5 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -197,13 +197,9 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
int *inner_blocks = NULL; /* Arrays for MPI datatypes when "large" datatype needed */
MPI_Aint *inner_disps = NULL;
MPI_Datatype *inner_types = NULL;
-#if MPI_VERSION < 3
- int *blocks = NULL; /* Array of block sizes for MPI hindexed create call */
- hsize_t u; /* Local index variable */
-#endif
- hsize_t bigio_count; /* Transition point to create derived type */
- int mpi_code; /* MPI error code */
- herr_t ret_value = SUCCEED; /* Return value */
+ hsize_t bigio_count; /* Transition point to create derived type */
+ int mpi_code; /* MPI error code */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -216,24 +212,10 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
/* Check whether standard or BIGIO processing will be employeed */
if (bigio_count >= num_points) {
-#if H5_CHECK_MPI_VERSION(3, 0)
/* Create an MPI datatype for the whole point selection */
if (MPI_SUCCESS !=
(mpi_code = MPI_Type_create_hindexed_block((int)num_points, 1, disp, elmt_type, new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code)
-#else
- /* Allocate block sizes for MPI datatype call */
- if (NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * num_points)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks");
-
- for (u = 0; u < num_points; u++)
- blocks[u] = 1;
-
- /* Create an MPI datatype for the whole point selection */
- if (MPI_SUCCESS !=
- (mpi_code = MPI_Type_create_hindexed((int)num_points, blocks, disp, elmt_type, new_type)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
-#endif
/* Commit MPI datatype for later use */
if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type)))
@@ -267,43 +249,20 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
if (NULL == (inner_disps = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * (size_t)total_types)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks");
-#if MPI_VERSION < 3
- /* Allocate block sizes for MPI datatype call */
- if (NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * bigio_count)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks");
-
- for (u = 0; u < bigio_count; u++)
- blocks[u] = 1;
-#endif
-
for (i = 0; i < num_big_types; i++) {
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block((int)bigio_count, 1,
&disp[(hsize_t)i * bigio_count],
elmt_type, &inner_types[i])))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code);
-#else
- if (MPI_SUCCESS !=
- (mpi_code = MPI_Type_create_hindexed((int)bigio_count, blocks, &disp[i * bigio_count],
- elmt_type, &inner_types[i])))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
-#endif
inner_blocks[i] = 1;
inner_disps[i] = 0;
} /* end for*/
if (remaining_points) {
-#if H5_CHECK_MPI_VERSION(3, 0)
if (MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block(
remaining_points, 1, &disp[(hsize_t)num_big_types * bigio_count],
elmt_type, &inner_types[num_big_types])))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code);
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)remaining_points, blocks,
- &disp[num_big_types * bigio_count],
- elmt_type, &inner_types[num_big_types])))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
-#endif
inner_blocks[num_big_types] = 1;
inner_disps[num_big_types] = 0;
}
@@ -323,10 +282,6 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint *
done:
if (elmt_type_created)
MPI_Type_free(&elmt_type);
-#if MPI_VERSION < 3
- if (blocks)
- H5MM_free(blocks);
-#endif
if (inner_types)
H5MM_free(inner_types);
if (inner_blocks)
diff --git a/src/H5mpi.c b/src/H5mpi.c
index 005a99a..2725ec5 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -619,17 +619,12 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co
const int displacements[], MPI_Datatype recv_type, bool allgather, int root,
MPI_Comm comm, int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries)
{
- size_t recv_buf_num_entries = 0;
- void *recv_buf = NULL;
-#if H5_CHECK_MPI_VERSION(3, 0)
+ size_t recv_buf_num_entries = 0;
+ void *recv_buf = NULL;
MPI_Count type_lb;
MPI_Count type_extent;
-#else
- MPI_Aint type_lb;
- MPI_Aint type_extent;
-#endif
- int mpi_code;
- herr_t ret_value = SUCCEED;
+ int mpi_code;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -637,12 +632,8 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co
if (allgather || (mpi_rank == root))
assert(out_buf && out_buf_num_entries);
- /* Retrieve the extent of the MPI Datatype being used */
-#if H5_CHECK_MPI_VERSION(3, 0)
+ /* Retrieve the extent of the MPI Datatype being used */
if (MPI_SUCCESS != (mpi_code = MPI_Type_get_extent_x(recv_type, &type_lb, &type_extent)))
-#else
- if (MPI_SUCCESS != (mpi_code = MPI_Type_get_extent(recv_type, &type_lb, &type_extent)))
-#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Type_get_extent(_x) failed", mpi_code)
if (type_extent < 0)