summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
commit24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435 (patch)
tree6b2eb3bb1e782c40718204882428e6471b6281ac /test
parent738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (diff)
downloadhdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.zip
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.gz
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.bz2
[svn-r6387] Purpose:
Bug Fix Description: Metadata cache in parallel I/O can cause hangs in applications which perform independent I/O on chunked datasets, because the metadata cache can attempt to flush out dirty metadata from only a single process, instead of collectively from all processes. Solution: Pass a dataset transfer property list down from every API function which could possibly trigger metadata I/O. Then, split the metadata cache into two sets of entries to allow dirty metadata to be set aside when a hash table collision occurs during independent I/O. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir) serial & parallel Misc. update: Updated release_docs/RELEASE
Diffstat (limited to 'test')
-rw-r--r--test/gheap.c16
-rw-r--r--test/istore.c12
-rw-r--r--test/lheap.c6
-rw-r--r--test/ohdr.c38
4 files changed, 36 insertions, 36 deletions
diff --git a/test/gheap.c b/test/gheap.c
index 16bd0e5..7ed5b46 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -79,7 +79,7 @@ test_1 (hid_t fapl)
size = i+1;
memset (out, 'A'+i%26, size);
H5Eclear ();
- status = H5HG_insert (f, size, out, obj+i);
+ status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -98,7 +98,7 @@ test_1 (hid_t fapl)
size = i+1;
memset (out, 'A'+i%26, size);
H5Eclear ();
- if (NULL==H5HG_read (f, obj+i, in)) {
+ if (NULL==H5HG_read (f, H5P_DATASET_XFER_DEFAULT, obj+i, in)) {
H5_FAILED();
puts(" Unable to read object");
nerrors++;
@@ -171,7 +171,7 @@ test_2 (hid_t fapl)
size = 1024-i;
memset (out, 'A'+i%26, size);
H5Eclear ();
- if (H5HG_insert (f, size, out, obj+i)<0) {
+ if (H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i)<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
@@ -185,7 +185,7 @@ test_2 (hid_t fapl)
size = 1024-i;
memset (out, 'A'+i%26, size);
H5Eclear ();
- if (NULL==H5HG_read (f, obj+i, in)) {
+ if (NULL==H5HG_read (f, H5P_DATASET_XFER_DEFAULT, obj+i, in)) {
H5_FAILED();
puts(" Unable to read object");
nerrors++;
@@ -256,7 +256,7 @@ test_3 (hid_t fapl)
size = i%30+100;
memset (out, 'A'+i%26, size);
H5Eclear ();
- status = H5HG_insert (f, size, out, obj+i);
+ status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -266,7 +266,7 @@ test_3 (hid_t fapl)
/* Remove everything */
for (i=0; i<1024; i++) {
- status = H5HG_remove (f, obj+i);
+ status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to remove object");
@@ -335,7 +335,7 @@ test_4 (hid_t fapl)
size = i%30+100;
memset (out, 'A'+i%26, size);
H5Eclear ();
- status = H5HG_insert (f, size, out, obj+i);
+ status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -349,7 +349,7 @@ test_4 (hid_t fapl)
*/
if (1==i%3) {
H5Eclear ();
- status = H5HG_remove (f, obj+i-1);
+ status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i-1);
if (status<0) {
H5_FAILED();
puts(" Unable to remove object");
diff --git a/test/istore.c b/test/istore.c
index 3dfb8cf..3f1e16e 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -101,7 +101,7 @@ new_object(H5F_t *f, const char *name, unsigned ndims, H5G_entry_t *ent/*out*/)
/* Create the object header */
HDmemset(ent,0,sizeof(H5G_entry_t));
- if (H5O_create(f, 64, ent)) {
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, 64, ent)) {
H5_FAILED();
puts(" H5O_create() = NULL");
goto error;
@@ -118,15 +118,15 @@ new_object(H5F_t *f, const char *name, unsigned ndims, H5G_entry_t *ent/*out*/)
}
}
/* Create the root of the B-tree that describes chunked storage */
- H5F_istore_create (f, &layout/*in,out*/);
- if (H5O_modify(ent, H5O_LAYOUT, H5O_NEW_MESG, 0, 1, &layout) < 0) {
+ H5F_istore_create (f, H5P_DATASET_XFER_DEFAULT, &layout/*in,out*/);
+ if (H5O_modify(ent, H5O_LAYOUT, H5O_NEW_MESG, 0, 1, &layout, H5P_DATASET_XFER_DEFAULT) < 0) {
H5_FAILED();
puts(" H5O_modify istore message failure.");
goto error;
}
/* Give the object header a name */
- if (H5G_insert(H5G_entof(H5G_rootof(f)), name, ent) < 0) {
+ if (H5G_insert(H5G_entof(H5G_rootof(f)), name, ent, H5P_DATASET_XFER_DEFAULT) < 0) {
H5_FAILED();
printf(" H5G_insert(f, name=\"%s\", ent) failed\n", name);
goto error;
@@ -247,7 +247,7 @@ test_extend(H5F_t *f, const char *prefix,
printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
- if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
+ if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
puts(" Unable to read istore message.");
goto error;
@@ -456,7 +456,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
- if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
+ if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
printf(" Unable to read istore message\n");
goto error;
diff --git a/test/lheap.c b/test/lheap.c
index 44fb615..98b741e 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -66,7 +66,7 @@ main(void)
H5Eprint(stdout);
goto error;
}
- if (H5HL_create(f, 0, &heap_addr/*out*/)<0) {
+ if (H5HL_create(f, H5P_DATASET_XFER_DEFAULT, 0, &heap_addr/*out*/)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -76,7 +76,7 @@ main(void)
for (j=4; j<i; j++) buf[j] = '0' + j%10;
if (j>4) buf[j] = '\0';
- if ((size_t)(-1)==(obj[i]=H5HL_insert(f, heap_addr, strlen(buf)+1,
+ if ((size_t)(-1)==(obj[i]=H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap_addr, strlen(buf)+1,
buf))) {
H5_FAILED();
H5Eprint(stdout);
@@ -102,7 +102,7 @@ main(void)
sprintf(buf, "%03d-", i);
for (j=4; j<i; j++) buf[j] = '0' + j%10;
if (j>4) buf[j] = '\0';
- if (NULL==(s=H5HL_peek(f, heap_addr, obj[i]))) {
+ if (NULL==(s=H5HL_peek(f, H5P_DATASET_XFER_DEFAULT, heap_addr, obj[i]))) {
H5_FAILED();
H5Eprint(stdout);
goto error;
diff --git a/test/ohdr.c b/test/ohdr.c
index 3884e1a..143146d 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -69,7 +69,7 @@ main(void)
*/
TESTING("object header creation");
HDmemset(&oh_ent,0,sizeof(H5G_entry_t));
- if (H5O_create(f, 64, &oh_ent/*out*/)<0) {
+ if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, 64, &oh_ent/*out*/)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -80,17 +80,17 @@ main(void)
TESTING("message creation");
stab.btree_addr = 11111111;
stab.heap_addr = 22222222;
- if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
+ if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -112,17 +112,17 @@ main(void)
TESTING("message modification");
stab.btree_addr = 33333333;
stab.heap_addr = 44444444;
- if (H5O_modify(&oh_ent, H5O_STAB, 0, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, 0, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
+ if (NULL==H5O_read(&oh_ent, H5O_STAB, 0, &ro, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -145,17 +145,17 @@ main(void)
TESTING("duplicate message creation");
stab.btree_addr = 55555555;
stab.heap_addr = 66666666;
- if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro)) {
+ if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -177,17 +177,17 @@ main(void)
TESTING("duplicate message modification");
stab.btree_addr = 77777777;
stab.heap_addr = 88888888;
- if (H5O_modify(&oh_ent, H5O_STAB, 1, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, 1, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro)) {
+ if (NULL==H5O_read(&oh_ent, H5O_STAB, 1, &ro, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -211,13 +211,13 @@ main(void)
for (i=0; i<40; i++) {
stab.btree_addr = (i+1)*1000+1;
stab.heap_addr = (i+1)*1000+2;
- if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -232,12 +232,12 @@ main(void)
for (i=0; i<10; i++) {
stab.btree_addr = (i + 1) * 1000 + 10;
stab.heap_addr = (i + 1) * 1000 + 20;
- if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab)<0) {
+ if (H5O_modify(&oh_ent, H5O_STAB, H5O_NEW_MESG, 0, 1, &stab, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5AC_flush(f, NULL, HADDR_UNDEF, TRUE)<0) {
+ if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, TRUE)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
@@ -249,12 +249,12 @@ main(void)
* Delete all symbol table messages.
*/
TESTING("message deletion");
- if (H5O_remove(&oh_ent, H5O_STAB, H5O_ALL)<0) {
+ if (H5O_remove(&oh_ent, H5O_STAB, H5O_ALL, H5P_DATASET_XFER_DEFAULT)<0) {
H5_FAILED();
H5Eprint(stdout);
goto error;
}
- if (H5O_read(&oh_ent, H5O_STAB, 0, &ro)) {
+ if (H5O_read(&oh_ent, H5O_STAB, 0, &ro, H5P_DATASET_XFER_DEFAULT)) {
H5_FAILED();
puts(" H5O_read() should have failed but didn't");
H5Eclear();