diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 20:16:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 20:16:20 (GMT) |
commit | b1514ea26de7e262a8b010129687dd18b55fa6b1 (patch) | |
tree | 5ed0b60487a6352c364d38f2b5e818db91503c27 /src/H5S.c | |
parent | 8aa24fc44a873655183ecab4b3bf54bbd708d7b8 (diff) | |
download | hdf5-b1514ea26de7e262a8b010129687dd18b55fa6b1.zip hdf5-b1514ea26de7e262a8b010129687dd18b55fa6b1.tar.gz hdf5-b1514ea26de7e262a8b010129687dd18b55fa6b1.tar.bz2 |
[svn-r5680] Purpose:
New feature.
Description:
There is some discussion among the SAF team as to whether it is better
to use MPI derived types for raw data transfers (thus needing a
MPI_File_set_view() call), or whether it is better to use a sequence of
low-level MPI types (i.e. MPI_BYTE) for the raw data transfer.
Solution:
Added an in internal flag to determine whether derived types are preferred
(the default), or whether they should be avoided. An environment variable
("HDF5_MPI_PREFER_DERIVED_TYPES") can be set by users to control whether MPI
types should be used or not. Set the environment variable to "0" (i.e.:
'setenv HDF5_MPI_PREFER_DERIVED_TYPES 0' to avoid using MPI derived types.
Platforms tested:
IRIX64 6.5 (modi4) w/parallel
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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 */ |