summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorRichard Warren <Richard.Warren@hdfgroup.org>2020-07-01 16:15:16 (GMT)
committerRichard Warren <Richard.Warren@hdfgroup.org>2020-07-01 16:15:16 (GMT)
commit8b7167488091054e77f2b5ece385963f3cd1f923 (patch)
tree1769b9a2a3141ffa6a35d7d212e76b709700330e /testpar
parent5a6d9b3a4e12cc399ce27361755f0c8d069e256b (diff)
downloadhdf5-8b7167488091054e77f2b5ece385963f3cd1f923.zip
hdf5-8b7167488091054e77f2b5ece385963f3cd1f923.tar.gz
hdf5-8b7167488091054e77f2b5ece385963f3cd1f923.tar.bz2
Various bug fixes for the multi-threaded IO concentrator(s)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt1
-rw-r--r--testpar/Makefile.am2
-rw-r--r--testpar/t_subfile_openclose.c16
-rw-r--r--testpar/t_subfile_readwrite.c4
4 files changed, 18 insertions, 5 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 3d0fe7e..c95e01f 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -76,6 +76,7 @@ set (H5P_TESTS
t_filters_parallel
t_2Gio
t_subfile_openclose
+ t_subfile_readwrite
)
foreach (h5_testp ${H5P_TESTS})
diff --git a/testpar/Makefile.am b/testpar/Makefile.am
index 9f8eca9..2914cb1 100644
--- a/testpar/Makefile.am
+++ b/testpar/Makefile.am
@@ -31,7 +31,7 @@ check_SCRIPTS = $(TEST_SCRIPT_PARA)
# Test programs. These are our main targets.
#
TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel t_2Gio \
- t_subfile_openclose
+ t_subfile_openclose t_subfile_readwrite
# t_pflush1 and t_pflush2 are used by testpflush.sh
check_PROGRAMS = $(TEST_PROG_PARA) t_pflush1 t_pflush2
diff --git a/testpar/t_subfile_openclose.c b/testpar/t_subfile_openclose.c
index 9f31b6e..fe39f2c 100644
--- a/testpar/t_subfile_openclose.c
+++ b/testpar/t_subfile_openclose.c
@@ -9,13 +9,21 @@ main(int argc, char **argv)
{
int i, mpi_size, mpi_rank;
+ int loop_count = 20;
int mpi_provides, require = MPI_THREAD_MULTIPLE;
- hid_t subfile_id;
+ hid_t subfile_id = -1;
MPI_Init_thread(&argc, &argv, require, &mpi_provides);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ if (argc > 1) {
+ int check_value = atoi(argv[1]);
+ if (check_value > 0) {
+ loop_count = check_value;
+ }
+ }
+
H5open();
if (H5FDsubfiling_init() == SUCCEED) {
@@ -26,15 +34,15 @@ main(int argc, char **argv)
puts("Error: Unable to initialize subfiling!");
}
- for(i=0; i < 10; i++) {
+ for(i=0; i < loop_count; i++) {
sf_open_subfiles(subfile_id, NULL, O_CREAT|O_TRUNC|O_RDWR);
sf_close_subfiles(subfile_id);
}
- MPI_Barrier(MPI_COMM_WORLD);
-
H5FDsubfiling_finalize();
+ MPI_Barrier(MPI_COMM_WORLD);
+
H5close();
MPI_Finalize();
diff --git a/testpar/t_subfile_readwrite.c b/testpar/t_subfile_readwrite.c
index 24d40e3..b4c798a 100644
--- a/testpar/t_subfile_readwrite.c
+++ b/testpar/t_subfile_readwrite.c
@@ -158,6 +158,10 @@ done:
free(local_data);
local_data = NULL;
}
+ if (verify_data) {
+ free(verify_data);
+ verify_data = NULL;
+ }
H5close();