summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-03-17 23:14:34 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-03-17 23:14:34 (GMT)
commit6bdd8d9a00b272fdc8ee8dea84e5b0d47eae3977 (patch)
treec008027c403f3c31f0345d699aec98775b7b806e
parentaa5578c53a47f75c29a8199fd17be51e96325e32 (diff)
downloadhdf5-6bdd8d9a00b272fdc8ee8dea84e5b0d47eae3977.zip
hdf5-6bdd8d9a00b272fdc8ee8dea84e5b0d47eae3977.tar.gz
hdf5-6bdd8d9a00b272fdc8ee8dea84e5b0d47eae3977.tar.bz2
[svn-r24817] update 7.2 demo example.
- fix bug. - bump tr id by 1 fix mopen when parent does not exist
-rw-r--r--examples/h5ff_client_M7.2-pep_demo.c62
-rw-r--r--src/H5VLiod_map.c1
2 files changed, 32 insertions, 31 deletions
diff --git a/examples/h5ff_client_M7.2-pep_demo.c b/examples/h5ff_client_M7.2-pep_demo.c
index 5d60ef5..4e5f355 100644
--- a/examples/h5ff_client_M7.2-pep_demo.c
+++ b/examples/h5ff_client_M7.2-pep_demo.c
@@ -93,15 +93,15 @@ int main( int argc, char **argv ) {
file_id = H5Fcreate_ff( file_name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id, H5_EVENT_STACK_NULL ); assert( file_id >= 0 );
/* Get read context */
- version = 0;
- rc_id0 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET; assert( version == 0 );
+ version = 1;
+ rc_id0 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET; assert( version == 1 );
/****
- * Transaction 1: Rank 0 creates three H5Groups in the H5File
+ * Transaction 2: Rank 0 creates three H5Groups in the H5File
****/
if ( my_rank == 0 ) {
- tr_num = 1;
+ tr_num = 2;
/* Create a local transaction for transaction number and start it with a single tr leader (the default). */
fprintf( stderr, "APP-r%d: Create and start tr %lu\n", my_rank, tr_num );
@@ -120,7 +120,7 @@ int main( int argc, char **argv ) {
}
/* Acquire a read handle for container version and create a read context. */
- version = 1;
+ version = 2;
if (verbose) fprintf( stderr, "APP-r%d: Try to acquire read context %lu\n", my_rank, version );
rc_id1 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
while ( rc_id1 < 0 ) {
@@ -128,7 +128,7 @@ int main( int argc, char **argv ) {
sleep( 1 );
rc_id1 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
}
- assert( rc_id1 >= 0 ); assert ( version == 1 );
+ assert( rc_id1 >= 0 ); assert ( version == 2 );
fprintf( stderr, "APP-r%d: Acquired read context %lu\n", my_rank, version );
/* Release the read handle and close read context on previous CV */
@@ -139,11 +139,11 @@ int main( int argc, char **argv ) {
if (verbose) print_container_contents( file_id, rc_id1, "/", my_rank );
/****
- * Transaction 2 - 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, Rank 0 creates "D", Rank 1 creates "M", Rank 2 creates "T"
****/
if ( my_rank < 3 ) {
- tr_num = 2;
+ tr_num = 3;
num_tr_leaders = ( (comm_size < 4) ? comm_size : 3 );
/* Create a local transaction for transaction number and start it. */
@@ -192,7 +192,7 @@ int main( int argc, char **argv ) {
}
/* Acquire a read handle for container version and create a read context. */
- version = 2;
+ version = 3;
if (verbose) fprintf( stderr, "APP-r%d: Try to acquire read context %lu\n", my_rank, version );
rc_id2 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
while ( rc_id2 < 0 ) {
@@ -200,16 +200,16 @@ int main( int argc, char **argv ) {
sleep( 1 );
rc_id2 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
}
- assert( rc_id2 >= 0 ); assert ( version == 2 );
+ assert( rc_id2 >= 0 ); assert ( version == 3 );
fprintf( stderr, "APP-r%d: Acquired read context %lu\n", my_rank, version );
/* Release the read handle and close read context on previous CV */
- fprintf( stderr, "APP-r%d: Release read context 1\n", my_rank );
+ fprintf( stderr, "APP-r%d: Release read context 2\n", my_rank );
ret = H5RCrelease( rc_id1, H5_EVENT_STACK_NULL); ASSERT_RET;
ret = H5RCclose( rc_id1 ); ASSERT_RET;
/****
- * Rank 0 persists CV 2
+ * Rank 0 persists CV 3
*
* Satisfies: An application will create multiple transactions in a container, then persist them
* from the BB to persistent storage.
@@ -224,10 +224,10 @@ int main( int argc, char **argv ) {
if (verbose) print_container_contents( file_id, rc_id2, "/", my_rank );
/****
- * Transaction 3 - All ranks update Dataset and Map objects in the 3 Groups
+ * Transaction 4 - All ranks update Dataset and Map objects in the 3 Groups
****/
- tr_num = 3;
+ tr_num = 4;
num_tr_leaders = comm_size;
/* Create a local transaction for transaction number and start it. */
@@ -252,9 +252,9 @@ int main( int argc, char **argv ) {
ret = H5TRclose( tr_id ); ASSERT_RET;
ret = H5Pclose( trspl_id ); ASSERT_RET;
- /* If verbose mode, get RC 3 and print CV 3 */
+ /* If verbose mode, get RC 4 and print CV 4 */
if ( verbose ) {
- version = 3;
+ version = 4;
fprintf( stderr, "APP-r%d: Try to acquire read context %lu\n", my_rank, version );
rc_id3 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
while ( rc_id3 < 0 ) {
@@ -262,22 +262,22 @@ int main( int argc, char **argv ) {
sleep( 1 );
rc_id3 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
}
- assert( rc_id3 >= 0 ); assert ( version == 3 );
+ assert( rc_id3 >= 0 ); assert ( version == 4 );
fprintf( stderr, "APP-r%d: Acquired read context %lu\n", my_rank, version );
print_container_contents( file_id, rc_id3, "/", my_rank );
- /* Release the read handle and close read context on CV 3 */
- fprintf( stderr, "APP-r%d: Release read context 3\n", my_rank );
+ /* Release the read handle and close read context on CV 4 */
+ fprintf( stderr, "APP-r%d: Release read context 4\n", my_rank );
ret = H5RCrelease( rc_id3, H5_EVENT_STACK_NULL); ASSERT_RET;
ret = H5RCclose( rc_id3 ); ASSERT_RET;
}
/****
- * Transaction 4 (based on CV 2) - All ranks update Dataset and Map objects in the 3 Groups
+ * Transaction 5 (based on CV 3) - All ranks update Dataset and Map objects in the 3 Groups
****/
- tr_num = 4;
+ tr_num = 5;
num_tr_leaders = comm_size;
/* Create a local transaction for transaction number and start it. */
@@ -303,7 +303,7 @@ int main( int argc, char **argv ) {
ret = H5Pclose( trspl_id ); ASSERT_RET;
/* Acquire a read handle for container version and create a read context. */
- version = 4;
+ version = 5;
if (verbose) fprintf( stderr, "APP-r%d: Try to acquire read context %lu\n", my_rank, version );
rc_id4 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
while ( rc_id4 < 0 ) {
@@ -311,18 +311,18 @@ int main( int argc, char **argv ) {
sleep( 1 );
rc_id4 = H5RCacquire( file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL );
}
- assert( rc_id4 >= 0 ); assert ( version == 4 );
+ assert( rc_id4 >= 0 ); assert ( version == 5 );
fprintf( stderr, "APP-r%d: Acquired read context %lu\n", my_rank, version );
- /* Release the read handle and close read context on CV 2 */
- fprintf( stderr, "APP-r%d: Release read context 2\n", my_rank );
+ /* Release the read handle and close read context on CV 3 */
+ fprintf( stderr, "APP-r%d: Release read context 3\n", my_rank );
ret = H5RCrelease( rc_id2, H5_EVENT_STACK_NULL); ASSERT_RET;
ret = H5RCclose( rc_id2 ); ASSERT_RET;
if (verbose) print_container_contents( file_id, rc_id4, "/", my_rank );
/****
- * Highest rank persists CV 4, then evicts objects under G-prefetched and G-stored.
+ * Highest rank persists CV 5, then evicts objects under G-prefetched and G-stored.
*
* Satisfies: An application will create multiple transactions in a container, then persist them
* from the burst buffer storate to persistent storage, then evict several of the objects in the IOD
@@ -330,7 +330,7 @@ int main( int argc, char **argv ) {
****/
if ( my_rank == comm_size-1 ) {
- fprintf( stderr, "APP-r%d: Persist cv 4.\n", my_rank );
+ fprintf( stderr, "APP-r%d: Persist cv 5.\n", my_rank );
print_container_contents( file_id, rc_id4, "/", my_rank );
ret = H5RCpersist(rc_id4, H5_EVENT_STACK_NULL); ASSERT_RET;
@@ -341,12 +341,12 @@ int main( int argc, char **argv ) {
/* TODO: Add code showing BB space in use */
}
-
+
/* All ranks print container here. For rank == comm_size, this will be after objects have been evicted */
if (verbose) print_container_contents( file_id, rc_id4, "/", my_rank );
- /* Release the read handle and close read context on CV 4 */
- fprintf( stderr, "APP-r%d: Release read context 4\n", my_rank );
+ /* Release the read handle and close read context on CV 5 */
+ fprintf( stderr, "APP-r%d: Release read context 5\n", my_rank );
ret = H5RCrelease( rc_id4, H5_EVENT_STACK_NULL); ASSERT_RET;
ret = H5RCclose( rc_id4 ); ASSERT_RET;
@@ -1007,7 +1007,7 @@ evict_group_members_updates( hid_t file_id, hid_t rc_id, const char* grp_path, i
assert( type_id >= 0 );
if ( use_daos_lustre ) {
- ret = H5Mevict_ff( type_id, cv, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
+ ret = H5Tevict_ff( type_id, cv, H5P_DEFAULT, H5_EVENT_STACK_NULL ); ASSERT_RET;
fprintf( stderr, "%s: evicted updates for object %s\n", preface, path_to_object );
} else {
fprintf( stderr, "%s: DAOS-POSIX - Won't evict updates for object %s\n", preface, path_to_object );
diff --git a/src/H5VLiod_map.c b/src/H5VLiod_map.c
index 2f88c3d..78df0e8 100644
--- a/src/H5VLiod_map.c
+++ b/src/H5VLiod_map.c
@@ -348,6 +348,7 @@ done:
output.iod_id = IOD_OBJ_INVALID;
output.keytype_id = FAIL;
output.valtype_id = FAIL;
+ output.mcpl_id = FAIL;
HG_Handler_start_output(op_data->hg_handle, &output);
}