From c13c94df27df7b15573eaf45da2db1379bc8bcc5 Mon Sep 17 00:00:00 2001 From: Ruth Aydt Date: Mon, 17 Mar 2014 20:49:10 -0500 Subject: [svn-r24819] Make changes to that if < 3 processes, Map and Named DataType objects still get created & code will run. --- examples/h5ff_client_M7.2-pep_demo.c | 8 +++++--- 1 file 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 ); -- cgit v0.12