diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-28 05:23:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-28 05:23:44 (GMT) |
commit | e5fb4191de1129f58cc7b9b8ee67f4cec1488f39 (patch) | |
tree | c6151b0582ef769f95549bc1c231fb3609408733 /testpar/t_cache.c | |
parent | fd268dca96ea76ef0ec4425434502343ee2055d7 (diff) | |
download | hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.zip hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.tar.gz hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.tar.bz2 |
Revert "Fix some more signed -> unsigned value issues with cache data structures, also"
This reverts commit 4b5e05c084f93c35dae946c2c9e814d565a613b0.
Diffstat (limited to 'testpar/t_cache.c')
-rw-r--r-- | testpar/t_cache.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index bfa4c8f..039b3ab 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; }; @@ -485,8 +485,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 +1214,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 +4334,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 +4362,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 +4399,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 +4929,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 +4997,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 +5319,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 +5423,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 ) { |