summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-03-26 20:14:09 (GMT)
committerGitHub <noreply@github.com>2021-03-26 20:14:09 (GMT)
commitcb0a883f6d3ce976f8d485c8e44996d7264fce54 (patch)
treecd892be63e9adf7ca572aaa74d104ed5663748b8 /src
parentda5aca29ff8e8e858eda0c030bf48cf64ac95519 (diff)
downloadhdf5-cb0a883f6d3ce976f8d485c8e44996d7264fce54.zip
hdf5-cb0a883f6d3ce976f8d485c8e44996d7264fce54.tar.gz
hdf5-cb0a883f6d3ce976f8d485c8e44996d7264fce54.tar.bz2
Minor parallel improvements (#519)
* Improve MPI error reporting, handled failed operations in parallel tests more nicely, and clean up MPI_Allreduce for determining whether to break collective I/O * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/H5Dmpio.c2
-rw-r--r--src/H5Eprivate.h13
2 files changed, 5 insertions, 10 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 5f8a586..448e92d 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -413,7 +413,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, co
* collective I/O
*/
if (MPI_SUCCESS !=
- (mpi_code = MPI_Allreduce(&local_cause, &global_cause, 2, MPI_UNSIGNED, MPI_BOR, io_info->comm)))
+ (mpi_code = MPI_Allreduce(local_cause, global_cause, 2, MPI_UNSIGNED, MPI_BOR, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code)
} /* end else */
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index c3c440f..4cd8b70 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -168,20 +168,15 @@ typedef struct H5E_t H5E_t;
extern char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
extern int H5E_mpi_error_str_len;
-#define HMPI_ERROR(mpierr) \
- { \
- MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
- HERROR(H5E_INTERNAL, H5E_MPIERRSTR, "%s", H5E_mpi_error_str); \
- }
#define HMPI_DONE_ERROR(retcode, str, mpierr) \
{ \
- HMPI_ERROR(mpierr); \
- HDONE_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+ MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
+ HDONE_ERROR(H5E_INTERNAL, H5E_MPI, retcode, "%s: MPI error string is '%s'", str, H5E_mpi_error_str); \
}
#define HMPI_GOTO_ERROR(retcode, str, mpierr) \
{ \
- HMPI_ERROR(mpierr); \
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+ MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, "%s: MPI error string is '%s'", str, H5E_mpi_error_str); \
}
#endif /* H5_HAVE_PARALLEL */