summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-23 13:48:05 (GMT)
committerGitHub <noreply@github.com>2022-03-23 13:48:05 (GMT)
commitfbb532cd633e216f47ce846493b38af02cfbb43a (patch)
tree1ef7bc9f25ec0832f8b25bb8ea4be34d53bd144d /testpar
parent78375882485a99a81caa933928ed08d7a38ef88b (diff)
downloadhdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.zip
hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.gz
hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.bz2
VFD SWMR: Normalization with develop (#1506)
* Brought over plugin and test script changes * Removes remaining register keywords (#1481) * Fixed warnings in the aux process code * Minor fixes from develop * Minor changes from develop, fixed format warnings * Formatted source * Added HD prefix to timespec_get * Cleanup in new files * Removes the MANIFEST file and unused release files (#1497) * Removes the MANIFEST file and unused release files * Updated tar command * checkposix corrections * More checkposix fixes * Ripped out unused instrumentation functionality * Brought over cache tagging changes from develop * Changes to tagged metadata expulsion iteration * Fixed typo * Brought over H5O__free() changes from develop * Brings (unused) parallel page buffer test in line with develop * Moved the functionality in supervise.subr to test_vfd_swmr.sh * Tools VFD parameter updates * Committing clang-format changes * H5F VFD SWMR refactoring * Committing clang-format changes * Misc changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_file.c44
-rw-r--r--testpar/testphdf5.h2
2 files changed, 22 insertions, 24 deletions
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 9970538..235b832 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -116,13 +116,12 @@ test_split_comm_access(void)
VRFY((mrc == MPI_SUCCESS), "final MPI_Barrier succeeded");
}
-#if 0
void
test_page_buffer_access(void)
{
hid_t file_id = -1; /* File ID */
hid_t fcpl, fapl;
- size_t page_count = 0;
+ int64_t page_count = 0;
int i, num_elements = 200;
haddr_t raw_addr, meta_addr;
int * data;
@@ -222,7 +221,7 @@ test_page_buffer_access(void)
ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * (size_t)num_elements, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update the first 50 elements */
for (i = 0; i < 50; i++)
@@ -233,7 +232,7 @@ test_page_buffer_access(void)
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
page_count += 2;
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update the second 50 elements */
for (i = 0; i < 50; i++)
@@ -242,7 +241,7 @@ test_page_buffer_access(void)
VRFY((ret == 0), "");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 50), sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update 100 - 200 */
for (i = 0; i < 100; i++)
@@ -251,7 +250,7 @@ test_page_buffer_access(void)
VRFY((ret == 0), "");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 100), sizeof(int) * 100, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
ret = H5PB_flush(f->shared);
VRFY((ret == 0), "");
@@ -259,24 +258,24 @@ test_page_buffer_access(void)
/* read elements 0 - 200 */
ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 200, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 200; i++)
VRFY((data[i] == i), "Read different values than written");
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 200, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 200; i++)
VRFY((data[i] == i), "Read different values than written");
/* read elements 0 - 50 */
ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == i), "Read different values than written");
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == i), "Read different values than written");
@@ -330,7 +329,7 @@ test_page_buffer_access(void)
ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * (size_t)num_elements, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update the first 50 elements */
for (i = 0; i < 50; i++)
@@ -339,7 +338,7 @@ test_page_buffer_access(void)
VRFY((ret == 0), "");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update the second 50 elements */
for (i = 0; i < 50; i++)
@@ -348,7 +347,7 @@ test_page_buffer_access(void)
VRFY((ret == 0), "");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 50), sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* update 100 - 200 */
for (i = 0; i < 100; i++)
@@ -357,7 +356,7 @@ test_page_buffer_access(void)
VRFY((ret == 0), "");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 100), sizeof(int) * 100, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
ret = H5Fflush(file_id, H5F_SCOPE_GLOBAL);
VRFY((ret == 0), "");
@@ -365,25 +364,25 @@ test_page_buffer_access(void)
/* read elements 0 - 200 */
ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 200, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 200; i++)
VRFY((data[i] == i), "Read different values than written");
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 200, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 200; i++)
VRFY((data[i] == i), "Read different values than written");
/* read elements 0 - 50 */
ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == i), "Read different values than written");
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
page_count += 1;
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == i), "Read different values than written");
@@ -393,20 +392,20 @@ test_page_buffer_access(void)
data[i] = -1;
ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
/* read elements 0 - 50 */
ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == -1), "Read different values than written");
ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data);
VRFY((ret == 0), "");
- VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB");
+ VRFY((f->shared->page_buf->curr_pages == page_count), "Wrong number of pages in PB");
for (i = 0; i < 50; i++)
VRFY((data[i] == -1), "Read different values than written");
@@ -431,7 +430,6 @@ test_page_buffer_access(void)
data = NULL;
MPI_Barrier(MPI_COMM_WORLD);
}
-#endif
static int
create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_strategy)
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index e6c36bf..16f45d3 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -241,7 +241,7 @@ void collective_group_write(void);
void independent_group_read(void);
void test_fapl_mpio_dup(void);
void test_split_comm_access(void);
-// void test_page_buffer_access(void);
+void test_page_buffer_access(void);
void dataset_atomicity(void);
void dataset_writeInd(void);
void dataset_writeAll(void);