summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuth Aydt <aydt@hdfgroup.org>2014-03-18 02:12:04 (GMT)
committerRuth Aydt <aydt@hdfgroup.org>2014-03-18 02:12:04 (GMT)
commit88437143334511c15d273b6aa606eb0145a1a2a0 (patch)
tree69aafafbe83bcfd543ee5b782a07c1bedd4d4793
parentc13c94df27df7b15573eaf45da2db1379bc8bcc5 (diff)
downloadhdf5-88437143334511c15d273b6aa606eb0145a1a2a0.zip
hdf5-88437143334511c15d273b6aa606eb0145a1a2a0.tar.gz
hdf5-88437143334511c15d273b6aa606eb0145a1a2a0.tar.bz2
[svn-r24820] Change so only rank 0 prefetches objects, the does Bcast of replica_id to other ranks.
Untested on DAOS-LUSTRE
-rw-r--r--examples/h5ff_client_M7.2-pep_demo.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/examples/h5ff_client_M7.2-pep_demo.c b/examples/h5ff_client_M7.2-pep_demo.c
index c846ecd..1a9f93b 100644
--- a/examples/h5ff_client_M7.2-pep_demo.c
+++ b/examples/h5ff_client_M7.2-pep_demo.c
@@ -403,9 +403,12 @@ int main( int argc, char **argv ) {
space_p_id = H5Dget_space( dset_p_id ); assert ( space_p_id >= 0 ); /* Space info doesn't get prefetched, so read it here */
if ( use_daos_lustre ) {
- /* FOR NOW: All ranks prefetch synchronously. TODO: change so only one - async - then share replica_id */
- fprintf( stderr, "APP-r%d: prefetch /G-prefeteched/D.\n", my_rank );
- ret = H5Dprefetch_ff( dset_p_id, rc_id, &dset_p_replica, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
+ /* FOR NOW: Rank 0 prefetches synchronously, then bcasts replica_id. TODO: change to async. */
+ if ( my_rank == 0 ) {
+ fprintf( stderr, "APP-r%d: prefetch /G-prefeteched/D.\n", my_rank );
+ ret = H5Dprefetch_ff( dset_p_id, rc_id, &dset_p_replica, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
+ }
+ MPI_Bcast( &dset_p_replica, 1, MPI_UINT64_T, 0, MPI_COMM_WORLD );
dxpl_p_id = H5Pcreate( H5P_DATASET_XFER );
ret = H5Pset_read_replica( dxpl_p_id, dset_p_replica ); ASSERT_RET;
} else {
@@ -423,9 +426,12 @@ int main( int argc, char **argv ) {
assert( map_p_id >= 0 );
if ( use_daos_lustre ) {
- /* FOR NOW: All ranks prefetch synchronously. TODO: change so only one - async - then share replica_id */
- fprintf( stderr, "APP-r%d: prefetch /M-prefeteched/D.\n", my_rank );
- ret = H5Mprefetch_ff( map_p_id, rc_id, &map_p_replica, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
+ /* FOR NOW: Rank 0 prefetches synchronously then bcasts replica_id. TODO: change to async */
+ if ( my_rank == 0 ) {
+ fprintf( stderr, "APP-r%d: prefetch /G-prefeteched/M.\n", my_rank );
+ ret = H5Mprefetch_ff( map_p_id, rc_id, &map_p_replica, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
+ }
+ MPI_Bcast( &map_p_replica, 1, MPI_UINT64_T, 0, MPI_COMM_WORLD );
mxpl_p_id = H5Pcreate( H5P_DATASET_XFER );
ret = H5Pset_read_replica( mxpl_p_id, map_p_replica ); ASSERT_RET;
} else {