summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 8297909..1b88e5a 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -41,8 +41,9 @@ static size_t H5S_aconv_g = 0; /*entries allocated*/
static size_t H5S_nconv_g = 0; /*entries used*/
#ifdef H5_HAVE_PARALLEL
-/* Global var whose value can be set from environment variable also */
-hbool_t H5_mpi_opt_types_g = TRUE;
+/* Global vars whose value can be set from environment variable also */
+hbool_t H5S_mpi_opt_types_g = TRUE;
+hbool_t H5S_mpi_prefer_derived_types_g = TRUE;
#endif /* H5_HAVE_PARALLEL */
/* Declare a free list to manage the H5S_simple_t struct */
@@ -94,9 +95,14 @@ H5S_init_interface(void)
{
/* Allow MPI buf-and-file-type optimizations? */
const char *s = HDgetenv ("HDF5_MPI_OPT_TYPES");
- if (s && HDisdigit(*s)) {
- H5_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0);
- }
+ if (s && HDisdigit(*s))
+ H5S_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0);
+ }
+ {
+ /* Prefer MPI derived types for collective data transfers? */
+ const char *s = HDgetenv ("HDF5_MPI_PREFER_DERIVED_TYPES");
+ if (s && HDisdigit(*s))
+ H5S_mpi_prefer_derived_types_g = (int)HDstrtol (s, NULL, 0);
}
#endif /* H5_HAVE_PARALLEL */