summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt4
-rw-r--r--testpar/CMakeTests.cmake22
-rw-r--r--testpar/t_cache.c44
3 files changed, 37 insertions, 33 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 298d326..58135b7 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.1.0)
PROJECT (HDF5_TEST_PAR)
#-----------------------------------------------------------------------------
@@ -54,6 +54,6 @@ set (H5P_TESTS
foreach (testp ${H5P_TESTS})
ADD_H5P_EXE(${testp})
-endforeach ()
+endforeach (testp ${H5P_TESTS})
include (CMakeTests.cmake)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index 7dce6d6..3716ee6 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -9,7 +9,7 @@ add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEX
foreach (testp ${H5P_TESTS})
add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
-endforeach ()
+endforeach (testp ${H5P_TESTS})
# The following will only be correct on windows shared
#set_tests_properties (TEST_PAR_t_pflush1 PROPERTIES WILL_FAIL "true")
@@ -31,16 +31,16 @@ if (HDF5_TEST_VFD)
t_pflush1
t_pflush2
)
-
+
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
- endif ()
+ endif (DIRECT_VFD)
- macro (ADD_VFD_TEST vfdname resultcode)
+ MACRO (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (test ${H5P_VFD_TESTS})
add_test (
- NAME TEST_PAR_VFD-${vfdname}-${test}
+ NAME TEST_PAR_VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
@@ -50,13 +50,13 @@ if (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- endforeach ()
- endif ()
- endmacro ()
-
+ endforeach (test ${H5P_VFD_TESTS})
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_VFD_TEST)
+
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- endforeach ()
+ endforeach (vfd ${VFD_LIST})
-endif ()
+endif (HDF5_TEST_VFD)
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index bfa4c8f..8753325 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -333,7 +333,7 @@ struct mssg_t
haddr_t base_addr;
unsigned len;
int ver;
- unsigned count;
+ int count;
unsigned magic;
};
@@ -410,8 +410,7 @@ static herr_t datum_notify(H5C_notify_action_t action, void *thing);
static herr_t datum_free_icr(void * thing);
-/* Masquerade as object header entries to the cache */
-#define DATUM_ENTRY_TYPE H5AC_OHDR_ID
+#define DATUM_ENTRY_TYPE H5AC_TEST_ID
#define NUMBER_OF_ENTRY_TYPES 1
@@ -435,7 +434,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] =
{
/* id */ DATUM_ENTRY_TYPE,
/* name */ "datum",
- /* mem_type */ H5FD_MEM_OHDR,
+ /* mem_type */ H5FD_MEM_DEFAULT,
/* flags */ H5AC__CLASS_SKIP_READS | H5AC__CLASS_SKIP_WRITES,
/* get_initial_load_size */ datum_get_initial_load_size,
/* get_final_load_size */ NULL,
@@ -485,8 +484,8 @@ static hbool_t take_down_cache(hid_t fid, H5C_t * cache_ptr);
static hbool_t verify_entry_reads(haddr_t addr, int expected_entry_reads);
static hbool_t verify_entry_writes(haddr_t addr, int expected_entry_writes);
static hbool_t verify_total_reads(int expected_total_reads);
-static hbool_t verify_total_writes(unsigned expected_total_writes);
-static void verify_writes(unsigned num_writes, haddr_t * written_entries_tbl);
+static hbool_t verify_total_writes(int expected_total_writes);
+static void verify_writes(int num_writes, haddr_t * written_entries_tbl);
static void unlock_entry(H5F_t * file_ptr, int32_t type, unsigned int flags);
static void unpin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global,
hbool_t dirty, hbool_t via_unprotect);
@@ -1214,7 +1213,7 @@ setup_derived_types(void)
int result;
MPI_Datatype mpi_types[9] = {MPI_INT, MPI_INT, MPI_INT, MPI_LONG,
HADDR_AS_MPI_TYPE, MPI_INT, MPI_INT,
- MPI_UNSIGNED, MPI_UNSIGNED};
+ MPI_INT, MPI_UNSIGNED};
int block_len[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
MPI_Aint displs[9];
struct mssg_t sample; /* used to compute displacements */
@@ -4334,13 +4333,15 @@ setup_cache_for_test(hid_t * fid_ptr,
*
*****************************************************************************/
static void
-verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
+verify_writes(int num_writes,
+ haddr_t * written_entries_tbl)
{
const hbool_t report = FALSE;
hbool_t proceed = TRUE;
- unsigned u = 0;
+ int i = 0;
HDassert( world_mpi_rank != world_server_mpi_rank );
+ HDassert( num_writes >= 0 );
HDassert( ( num_writes == 0 ) ||
( written_entries_tbl != NULL ) );
@@ -4360,12 +4361,15 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
}
}
- if(proceed)
+ if ( proceed ) {
+
proceed = verify_total_writes(num_writes);
+ }
- while(proceed && u < num_writes) {
- proceed = verify_entry_writes(written_entries_tbl[u], 1);
- u++;
+ while ( ( proceed ) && ( i < num_writes ) )
+ {
+ proceed = verify_entry_writes(written_entries_tbl[i], 1);
+ i++;
}
/* barrier to ensure that all other processes have finished verifying
@@ -4394,12 +4398,12 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl)
if ( proceed ) {
- HDfprintf(stdout, "%d:%s: verified %u writes.\n",
+ HDfprintf(stdout, "%d:%s: verified %d writes.\n",
world_mpi_rank, FUNC, num_writes);
} else {
- HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n",
+ HDfprintf(stdout, "%d:%s: FAILED to verify %d writes.\n",
world_mpi_rank, FUNC, num_writes);
}
@@ -4924,10 +4928,10 @@ verify_total_reads(int expected_total_reads)
*
*****************************************************************************/
static hbool_t
-verify_total_writes(unsigned expected_total_writes)
+verify_total_writes(int expected_total_writes)
{
hbool_t success = TRUE; /* will set to FALSE if appropriate. */
- unsigned reported_total_writes;
+ long reported_total_writes;
struct mssg_t mssg;
if ( success ) {
@@ -4992,7 +4996,7 @@ verify_total_writes(unsigned expected_total_writes)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: reported/expected total writes mismatch (%u/%u).\n",
+ "%d:%s: reported/expected total writes mismatch (%ld/%ld).\n",
world_mpi_rank, FUNC,
reported_total_writes, expected_total_writes);
}
@@ -5314,7 +5318,7 @@ server_smoke_check(void)
if ( success ) {
- success = verify_total_writes((unsigned)(world_mpi_size - 1));
+ success = verify_total_writes(world_mpi_size - 1);
}
if ( success ) {
@@ -5418,7 +5422,7 @@ server_smoke_check(void)
if ( success ) {
- success = verify_total_writes((unsigned)(world_mpi_size - 1));
+ success = verify_total_writes(world_mpi_size - 1);
}
if ( success ) {