diff options
author | Ruth Aydt <aydt@hdfgroup.org> | 2014-03-18 01:49:10 (GMT) |
---|---|---|
committer | Ruth Aydt <aydt@hdfgroup.org> | 2014-03-18 01:49:10 (GMT) |
commit | c13c94df27df7b15573eaf45da2db1379bc8bcc5 (patch) | |
tree | 24c5f48a501ec9a3e0680b9db66cb19589f35278 | |
parent | 7286dfd0fde71019565a6abe00012a0d44c54241 (diff) | |
download | hdf5-c13c94df27df7b15573eaf45da2db1379bc8bcc5.zip hdf5-c13c94df27df7b15573eaf45da2db1379bc8bcc5.tar.gz hdf5-c13c94df27df7b15573eaf45da2db1379bc8bcc5.tar.bz2 |
[svn-r24819] Make changes to that if < 3 processes, Map and Named DataType objects still get created & code will run.
-rw-r--r-- | examples/h5ff_client_M7.2-pep_demo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/h5ff_client_M7.2-pep_demo.c b/examples/h5ff_client_M7.2-pep_demo.c index f99880c..c846ecd 100644 --- a/examples/h5ff_client_M7.2-pep_demo.c +++ b/examples/h5ff_client_M7.2-pep_demo.c @@ -141,7 +141,7 @@ int main( int argc, char **argv ) { if (verbose) print_container_contents( file_id, rc_id2, "/", my_rank );
/****
- * Transaction 3 - In each of the 3 Groups, Rank 0 creates "D", Rank 1 creates "M", Rank 2 creates "T"
+ * Transaction 3 - In each of the 3 Groups, create "D"(rnk 0), "M"(rnk 1 or 0), "T" (rnk 2 or 1 or 0)
****/
if ( my_rank < 3 ) {
@@ -171,11 +171,13 @@ int main( int argc, char **argv ) { create_dataset( glog_id, "D", tr_id, glog_path, my_rank, 1 );
create_dataset( gpre_id, "D", tr_id, gpre_path, my_rank, 2 );
create_dataset( gsto_id, "D", tr_id, gsto_path, my_rank, 3 );
- } else if ( my_rank == 1 ) {
+ }
+ if ( ( my_rank == 1 ) || ( ( my_rank == 0 ) && ( comm_size == 1 ) ) ) {
create_map( glog_id, "M", tr_id, glog_path, my_rank, 1 );
create_map( gpre_id, "M", tr_id, gpre_path, my_rank, 2 );
create_map( gsto_id, "M", tr_id, gsto_path, my_rank, 3 );
- } else if ( my_rank == 2 ) {
+ }
+ if ( ( my_rank == 2 ) || ( ( my_rank == 1 ) && ( comm_size == 2 ) ) || ( ( my_rank == 0 ) && ( comm_size == 1 ) ) ) {
create_committed_datatype( glog_id, "T", tr_id, glog_path, my_rank );
create_committed_datatype( gpre_id, "T", tr_id, gpre_path, my_rank );
create_committed_datatype( gsto_id, "T", tr_id, gsto_path, my_rank );
|