summaryrefslogtreecommitdiffstats
path: root/examples/h5ff_client_prefetch.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-03-17 21:40:23 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-03-17 21:40:23 (GMT)
commitaa5578c53a47f75c29a8199fd17be51e96325e32 (patch)
treeb65ba22cc78ca7b5dbb9bd7005b1aeb69e6c65ec /examples/h5ff_client_prefetch.c
parent570271da6ab1504bb9b86e8fbb6d839277ec3aa8 (diff)
downloadhdf5-aa5578c53a47f75c29a8199fd17be51e96325e32.zip
hdf5-aa5578c53a47f75c29a8199fd17be51e96325e32.tar.gz
hdf5-aa5578c53a47f75c29a8199fd17be51e96325e32.tar.bz2
[svn-r24815] Skip over TR0 in file_create.
Use TR1 to create root group and co. update examples (still missing demo programs).
Diffstat (limited to 'examples/h5ff_client_prefetch.c')
-rw-r--r--examples/h5ff_client_prefetch.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/examples/h5ff_client_prefetch.c b/examples/h5ff_client_prefetch.c
index 50a627b..a808c1f 100644
--- a/examples/h5ff_client_prefetch.c
+++ b/examples/h5ff_client_prefetch.c
@@ -88,14 +88,14 @@ int main(int argc, char **argv) {
sid = H5Screate_simple(1, dims, NULL);
dtid = H5Tcopy(H5T_STD_I32LE);
- /* acquire container version 0 - EXACT.
+ /* acquire container version 1 - EXACT.
This can be asynchronous, but here we need the acquired ID
right after the call to start the transaction so we make synchronous. */
- version = 0;
+ version = 1;
rid1 = H5RCacquire(file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL);
- assert(0 == version);
+ assert(1 == version);
- /* start transaction 1 with default Leader/Delegate model. Leader
+ /* start transaction 2 with default Leader/Delegate model. Leader
which is rank 0 here starts the transaction. It can be
asynchronous, but we make it synchronous here so that the
Leader can tell its delegates that the transaction is
@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
hid_t rid_temp;
/* create transaction object */
- tid1 = H5TRcreate(file_id, rid1, (uint64_t)1);
+ tid1 = H5TRcreate(file_id, rid1, (uint64_t)2);
assert(tid1);
ret = H5TRstart(tid1, H5P_DEFAULT, e_stack);
assert(0 == ret);
@@ -153,7 +153,7 @@ int main(int argc, char **argv) {
assert(0 == ret);
/* create transaction object */
- tid2 = H5TRcreate(file_id, rid_temp, (uint64_t)2);
+ tid2 = H5TRcreate(file_id, rid_temp, (uint64_t)3);
assert(tid2);
ret = H5TRstart(tid2, H5P_DEFAULT, e_stack);
assert(0 == ret);
@@ -169,16 +169,16 @@ int main(int argc, char **argv) {
assert(H5Tclose_ff(dtid, e_stack) == 0);
assert(H5Dclose_ff(did, e_stack) == 0);
- /* release container version 1. This is async. */
+ /* release container version 2. This is async. */
ret = H5RCrelease(rid_temp, e_stack);
assert(0 == ret);
ret = H5RCclose(rid_temp);
assert(0 == ret);
- version = 2;
+ version = 3;
}
- /* release container version 0. This is async. */
+ /* release container version 1. This is async. */
ret = H5RCrelease(rid1, e_stack);
assert(0 == ret);
@@ -188,9 +188,9 @@ int main(int argc, char **argv) {
H5ESclear(e_stack);
printf("%d events in event stack. Completion status = %d\n", num_events, status);
- /* Process 0 tells other procs that container version 2 is acquired */
+ /* Process 0 tells other procs that container version 3 is acquired */
MPI_Bcast(&version, 1, MPI_UINT64_T, 0, MPI_COMM_WORLD);
- assert(2 == version);
+ assert(3 == version);
/* other processes just create a read context object; no need to
acquire it */
@@ -223,13 +223,13 @@ int main(int argc, char **argv) {
if((my_size > 1 && 1 == my_rank) ||
(my_size == 1 && 0 == my_rank)) {
- ret = H5Tevict_ff(dtid, 2, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ ret = H5Tevict_ff(dtid, 3, H5P_DEFAULT, H5_EVENT_STACK_NULL);
assert(0 == ret);
- ret = H5Devict_ff(did, 2, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ ret = H5Devict_ff(did, 3, H5P_DEFAULT, H5_EVENT_STACK_NULL);
assert(0 == ret);
- ret = H5Mevict_ff(map, 2, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ ret = H5Mevict_ff(map, 3, H5P_DEFAULT, H5_EVENT_STACK_NULL);
assert(0 == ret);
}
@@ -280,21 +280,21 @@ int main(int argc, char **argv) {
tapl_id = H5Pcreate (H5P_DATATYPE_ACCESS);
ret = H5Pset_evict_replica(tapl_id, dt_replica);
assert(0 == ret);
- ret = H5Tevict_ff(dtid, 2, tapl_id, H5_EVENT_STACK_NULL);
+ ret = H5Tevict_ff(dtid, 3, tapl_id, H5_EVENT_STACK_NULL);
assert(0 == ret);
H5Pclose(tapl_id);
dapl_id = H5Pcreate (H5P_DATASET_ACCESS);
ret = H5Pset_evict_replica(dapl_id, dset_replica);
assert(0 == ret);
- ret = H5Devict_ff(did, 2, dapl_id, H5_EVENT_STACK_NULL);
+ ret = H5Devict_ff(did, 3, dapl_id, H5_EVENT_STACK_NULL);
assert(0 == ret);
H5Pclose(dapl_id);
mapl_id = H5Pcreate (H5P_MAP_ACCESS);
ret = H5Pset_evict_replica(mapl_id, map_replica);
assert(0 == ret);
- ret = H5Mevict_ff(map, 2, mapl_id, H5_EVENT_STACK_NULL);
+ ret = H5Mevict_ff(map, 3, mapl_id, H5_EVENT_STACK_NULL);
assert(0 == ret);
H5Pclose(mapl_id);
}
@@ -302,7 +302,7 @@ int main(int argc, char **argv) {
MPI_Barrier(MPI_COMM_WORLD);
if(my_rank == 0) {
- /* release container version 2. */
+ /* release container version 3. */
ret = H5RCrelease(rid2, H5_EVENT_STACK_NULL);
assert(0 == ret);
}