diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-01-02 17:48:48 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-01-02 17:48:48 (GMT) |
commit | 774098afa6c27dc3800e36d4e6a0a5dc0988e30e (patch) | |
tree | 39ee8046b40050b93c034db964ae15a81a23f506 | |
parent | 00990e28f3bd0f65433081f30901d22b4ed6302c (diff) | |
download | hdf5-774098afa6c27dc3800e36d4e6a0a5dc0988e30e.zip hdf5-774098afa6c27dc3800e36d4e6a0a5dc0988e30e.tar.gz hdf5-774098afa6c27dc3800e36d4e6a0a5dc0988e30e.tar.bz2 |
updated defined constants
-rw-r--r-- | src/H5Dmpio.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index e1c0edb..f6b1692 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -83,6 +83,10 @@ /* Macros to represent the regularity of the selection for multiple chunk IO case. */ #define H5D_CHUNK_SELECT_REG 1 +/* Macros for reason's to not enable read-proc-and-bcast. */ +#define H5D_MPIO_PROC0_BCAST 0x00 +#define H5D_MPIO_NOT_H5S_ALL 0x01 +#define H5D_MPIO_GREATER_THAN_2GB 0x02 /******************/ /* Local Typedefs */ @@ -281,9 +285,9 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, const H5S_t *mem_space, const H5D_type_info_t *type_info) { H5FD_mpio_xfer_t io_xfer_mode; /* MPI I/O transfer mode */ - unsigned local_cause[2] = {0,0}; /* [0] Local reason(s) for breaking collective mode */ - /* [1] Flag if dataset is both: H5S_ALL and small */ - unsigned global_cause[2] = {0,0}; /* Global reason(s) for breaking collective mode */ + unsigned local_cause[2] = {0,H5D_MPIO_PROC0_BCAST}; /* [0] Local reason(s) for breaking collective mode */ + /* [1] Flag if dataset is both: H5S_ALL and small */ + unsigned global_cause[2] = {0,H5D_MPIO_PROC0_BCAST}; /* Global reason(s) for breaking collective mode */ htri_t ret_value = SUCCEED; /* Return value */ hbool_t H5FD_MPIO_Proc0_BCast; /* Flag if dataset is both: H5S_ALL and < 2GB */ @@ -354,7 +358,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, /* Flag to do a MPI_Bcast of the data from one proc instead of * having all the processes involved in the persistent I/O. */ - local_cause[1] |= 0x01; + local_cause[1] |= H5D_MPIO_NOT_H5S_ALL; } else { @@ -367,7 +371,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, H5D__get_storage_size(io_info->dset, &dset_storage_size); if(dset_storage_size > ((hsize_t)(H5_2GB) - 1) ) { - local_cause[1] |= 0x02; + local_cause[1] |= H5D_MPIO_GREATER_THAN_2GB; } } @@ -393,7 +397,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, ret_value = global_cause[0] > 0 ? FALSE : TRUE; /* read-proc0-and-bcast if collective and H5S_ALL */ - if(global_cause[0] == 0 && global_cause[1] == 0) + if(global_cause[0] == 0 && global_cause[1] == H5D_MPIO_PROC0_BCAST) H5FD_MPIO_Proc0_BCast = TRUE; /* Set Flag if dataset is both: H5S_ALL and < 2GB in the API context */ |