summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5D.c6
-rw-r--r--src/H5S.c14
-rw-r--r--src/H5Sprivate.h6
3 files changed, 24 insertions, 2 deletions
diff --git a/src/H5D.c b/src/H5D.c
index d9d0b78..c5550d7 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1378,7 +1378,8 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
* mem-and-file-dataspace-xfer functions
* (the latter in case the arguments to sconv_funcs
* turn out to be inappropriate for MPI-IO). */
- if (dataset->ent.file->shared->access_parms->driver == H5F_LOW_MPIO) {
+ if (H5_mpi_opt_types_g &&
+ H5F_LOW_MPIO==dataset->ent.file->shared->access_parms->driver) {
sconv->read = H5S_mpio_spaces_read;
}
#endif /*HAVE_PARALLEL*/
@@ -1730,7 +1731,8 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
* mem-and-file-dataspace-xfer functions
* (the latter in case the arguments to sconv_funcs
* turn out to be inappropriate for MPI-IO). */
- if (dataset->ent.file->shared->access_parms->driver == H5F_LOW_MPIO) {
+ if (H5_mpi_opt_types_g &&
+ H5F_LOW_MPIO==dataset->ent.file->shared->access_parms->driver) {
sconv->write = H5S_mpio_spaces_write;
}
#endif /*HAVE_PARALLEL*/
diff --git a/src/H5S.c b/src/H5S.c
index 7ff39bb..a30f422 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -16,6 +16,7 @@ static char RcsId[] = "@(#)$Revision$";
/* $Id$ */
+#define _H5S_IN_H5S_C
#include <H5private.h> /* Generic Functions */
#include <H5Iprivate.h> /* ID Functions */
#include <H5Eprivate.h> /* Error handling */
@@ -39,6 +40,11 @@ static H5S_conv_t **H5S_conv_g = NULL;
static size_t H5S_aconv_g = 0; /*entries allocated*/
static size_t H5S_nconv_g = 0; /*entries used*/
+#ifdef HAVE_PARALLEL
+/* Global var whose value comes from environment variable */
+hbool_t H5_mpi_opt_types_g = FALSE;
+#endif
+
/*--------------------------------------------------------------------------
NAME
@@ -72,6 +78,14 @@ H5S_init_interface(void)
"unable to register one or more conversion functions");
}
+ {
+ /* Allow MPI buf-and-file-type optimizations? */
+ const char *s = getenv ("HDF5_MPI_OPT_TYPES");
+ if (s && isdigit(*s)) {
+ H5_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0);
+ }
+ }
+
FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 24dd4f6..fba178a 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -344,6 +344,12 @@ hbool_t H5S_hyper_select_valid (const H5S_t *space);
const struct H5O_efl_t *efl, size_t elmt_size,
const H5S_t *file_space, const H5S_t *mem_space,
const H5D_transfer_t xfer_mode, const void *buf);
+
+#ifndef _H5S_IN_H5S_C
+ /* Global var whose value comes from environment variable */
+ extern hbool_t H5_mpi_opt_types_g;
+#endif /* _H5S_IN_H5S_C */
+
#endif
#endif