summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-08-12 19:01:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-08-12 19:01:02 (GMT)
commit94e652b097b56c9fd20995e065a859847a9ef933 (patch)
tree537b32a5cfebdf85f7e2cf693e072f1b6cf03fea /testpar
parent5db5169813134ed668fb452f25a8f5f69248b4a3 (diff)
downloadhdf5-94e652b097b56c9fd20995e065a859847a9ef933.zip
hdf5-94e652b097b56c9fd20995e065a859847a9ef933.tar.gz
hdf5-94e652b097b56c9fd20995e065a859847a9ef933.tar.bz2
[svn-r19234] Description:
Initialize loop variable that caused failures in certain circumstances. Also clean up compiler warnings and release MPI datatype. Tested on: Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c118
1 files changed, 62 insertions, 56 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 463fbac..24dff7d 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -405,59 +405,61 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] =
/* test utility functions */
-void expunge_entry(H5F_t * file_ptr, int32_t idx);
-void insert_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
+static void expunge_entry(H5F_t * file_ptr, int32_t idx);
+static void insert_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int32_t idx, unsigned int flags);
-void local_pin_and_unpin_random_entries(H5F_t * file_ptr, int min_idx,
+static void local_pin_and_unpin_random_entries(H5F_t * file_ptr, int min_idx,
int max_idx, int min_count,
int max_count);
-void local_pin_random_entry(H5F_t * file_ptr, int min_idx, int max_idx);
-void local_unpin_all_entries(H5F_t * file_ptr, hbool_t via_unprotect);
-int local_unpin_next_pinned_entry(H5F_t * file_ptr, int start_idx,
+static void local_pin_random_entry(H5F_t * file_ptr, int min_idx, int max_idx);
+static void local_unpin_all_entries(H5F_t * file_ptr, hbool_t via_unprotect);
+static int local_unpin_next_pinned_entry(H5F_t * file_ptr, int start_idx,
hbool_t via_unprotect);
-void lock_and_unlock_random_entries(H5F_t * file_ptr, int min_idx, int max_idx,
+static void lock_and_unlock_random_entries(H5F_t * file_ptr, int min_idx, int max_idx,
int min_count, int max_count);
-void lock_and_unlock_random_entry(H5F_t * file_ptr,
+static void lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx, int max_idx);
-void lock_entry(H5F_t * file_ptr, int32_t idx);
-void mark_entry_dirty(int32_t idx);
-void pin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty);
-void pin_protected_entry(int32_t idx, hbool_t global);
-void move_entry(H5F_t * file_ptr, int32_t old_idx, int32_t new_idx);
+static void lock_entry(H5F_t * file_ptr, int32_t idx);
+static void mark_entry_dirty(int32_t idx);
+static void pin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty);
+#ifdef H5_METADATA_TRACE_FILE
+static void pin_protected_entry(int32_t idx, hbool_t global);
+#endif /* H5_METADATA_TRACE_FILE */
+static void move_entry(H5F_t * file_ptr, int32_t old_idx, int32_t new_idx);
static hbool_t reset_server_counts(void);
-void resize_entry(int32_t idx, size_t new_size);
-hbool_t setup_cache_for_test(hid_t * fid_ptr,
+static void resize_entry(int32_t idx, size_t new_size);
+static hbool_t setup_cache_for_test(hid_t * fid_ptr,
H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr,
int metadata_write_strategy);
-void setup_rand(void);
-hbool_t take_down_cache(hid_t fid);
+static void setup_rand(void);
+static hbool_t take_down_cache(hid_t fid);
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(int expected_total_writes);
-void verify_writes(int num_writes, haddr_t * written_entries_tbl);
-void unlock_entry(H5F_t * file_ptr, int32_t type, unsigned int flags);
-void unpin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global,
+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);
/* test functions */
-hbool_t server_smoke_check(void);
-hbool_t smoke_check_1(int metadata_write_strategy);
-hbool_t smoke_check_2(int metadata_write_strategy);
-hbool_t smoke_check_3(int metadata_write_strategy);
-hbool_t smoke_check_4(int metadata_write_strategy);
-hbool_t smoke_check_5(int metadata_write_strategy);
-hbool_t trace_file_check(int metadata_write_strategy);
+static hbool_t server_smoke_check(void);
+static hbool_t smoke_check_1(int metadata_write_strategy);
+static hbool_t smoke_check_2(int metadata_write_strategy);
+static hbool_t smoke_check_3(int metadata_write_strategy);
+static hbool_t smoke_check_4(int metadata_write_strategy);
+static hbool_t smoke_check_5(int metadata_write_strategy);
+static hbool_t trace_file_check(int metadata_write_strategy);
/*****************************************************************************/
/****************************** stats functions ******************************/
/*****************************************************************************/
-#ifdef UNUSED
+#ifdef NOT_USED
/*****************************************************************************
*
* Function: print_stats()
@@ -496,7 +498,7 @@ print_stats(void)
return;
} /* print_stats() */
-#endif /* UNUSED */
+#endif /* NOT_USED */
/*****************************************************************************
*
@@ -2821,7 +2823,7 @@ size_datum(H5F_t UNUSED * f,
*
*****************************************************************************/
-void
+static void
expunge_entry(H5F_t * file_ptr,
int32_t idx)
{
@@ -2904,7 +2906,7 @@ expunge_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
insert_entry(H5C_t * cache_ptr,
H5F_t * file_ptr,
int32_t idx,
@@ -3010,7 +3012,7 @@ insert_entry(H5C_t * cache_ptr,
*
*****************************************************************************/
-void
+static void
local_pin_and_unpin_random_entries(H5F_t * file_ptr,
int min_idx,
int max_idx,
@@ -3081,7 +3083,7 @@ local_pin_and_unpin_random_entries(H5F_t * file_ptr,
* 4/12/06
*
*****************************************************************************/
-void
+static void
local_pin_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
@@ -3129,7 +3131,7 @@ local_pin_random_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
local_unpin_all_entries(H5F_t * file_ptr,
hbool_t via_unprotect)
{
@@ -3174,7 +3176,7 @@ local_unpin_all_entries(H5F_t * file_ptr,
*
*****************************************************************************/
-int
+static int
local_unpin_next_pinned_entry(H5F_t * file_ptr,
int start_idx,
hbool_t via_unprotect)
@@ -3235,7 +3237,7 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
lock_and_unlock_random_entries(H5F_t * file_ptr,
int min_idx,
int max_idx,
@@ -3285,7 +3287,7 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
@@ -3335,7 +3337,7 @@ lock_and_unlock_random_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
lock_entry(H5F_t * file_ptr,
int32_t idx)
{
@@ -3394,7 +3396,7 @@ lock_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
mark_entry_dirty(int32_t idx)
{
const char * fcn_name = "mark_entry_dirty()";
@@ -3452,7 +3454,7 @@ mark_entry_dirty(int32_t idx)
*
*****************************************************************************/
-void
+static void
pin_entry(H5F_t * file_ptr,
int32_t idx,
hbool_t global,
@@ -3506,6 +3508,7 @@ pin_entry(H5F_t * file_ptr,
} /* pin_entry() */
+#ifdef H5_METADATA_TRACE_FILE
/*****************************************************************************
* Function: pin_protected_entry()
*
@@ -3525,7 +3528,7 @@ pin_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
pin_protected_entry(int32_t idx,
hbool_t global)
{
@@ -3579,6 +3582,7 @@ pin_protected_entry(int32_t idx,
return;
} /* pin_protected_entry() */
+#endif /* H5_METADATA_TRACE_FILE */
/*****************************************************************************
@@ -3597,7 +3601,7 @@ pin_protected_entry(int32_t idx,
* 1/10/06
*
*****************************************************************************/
-void
+static void
move_entry(H5F_t * file_ptr,
int32_t old_idx,
int32_t new_idx)
@@ -3805,7 +3809,7 @@ reset_server_counts(void)
*
*****************************************************************************/
-void
+static void
resize_entry(int32_t idx,
size_t new_size)
{
@@ -3878,7 +3882,7 @@ resize_entry(int32_t idx,
* Programmer: JRM -- 1/4/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
setup_cache_for_test(hid_t * fid_ptr,
H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr,
@@ -4104,14 +4108,14 @@ setup_cache_for_test(hid_t * fid_ptr,
* Programmer: JRM -- 5/9/10
*
*****************************************************************************/
-void
+static void
verify_writes(int num_writes,
haddr_t * written_entries_tbl)
{
const char * fcn_name = "verify_writes()";
const hbool_t report = FALSE;
hbool_t proceed = TRUE;
- int i;
+ int i = 0;
HDassert( world_mpi_rank != world_server_mpi_rank );
HDassert( num_writes >= 0 );
@@ -4345,7 +4349,7 @@ setup_noblock_dxpl_id(void)
*
*****************************************************************************/
-void
+static void
setup_rand(void)
{
const char * fcn_name = "setup_rand()";
@@ -4414,7 +4418,7 @@ setup_rand(void)
*
*****************************************************************************/
-hbool_t
+static hbool_t
take_down_cache(hid_t fid)
{
const char * fcn_name = "take_down_cache()";
@@ -4977,7 +4981,7 @@ unlock_entry(H5F_t * file_ptr,
*
*****************************************************************************/
-void
+static void
unpin_entry(H5F_t * file_ptr,
int32_t idx,
hbool_t global,
@@ -5070,7 +5074,7 @@ unpin_entry(H5F_t * file_ptr,
* Programmer: JRM -- 12/21/05
*
*****************************************************************************/
-hbool_t
+static hbool_t
server_smoke_check(void)
{
const char * fcn_name = "server_smoke_check()";
@@ -5419,7 +5423,7 @@ server_smoke_check(void)
* Programmer: JRM -- 1/4/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
smoke_check_1(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_1()";
@@ -5595,7 +5599,7 @@ smoke_check_1(int metadata_write_strategy)
* Programmer: JRM -- 1/12/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
smoke_check_2(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_2()";
@@ -5821,7 +5825,7 @@ smoke_check_2(int metadata_write_strategy)
* Programmer: JRM -- 1/13/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
smoke_check_3(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_3()";
@@ -6193,7 +6197,7 @@ smoke_check_3(int metadata_write_strategy)
* Programmer: JRM -- 1/13/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
smoke_check_4(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_4()";
@@ -6506,7 +6510,7 @@ smoke_check_4(int metadata_write_strategy)
* Programmer: JRM -- 5/18/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
smoke_check_5(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_5()";
@@ -6801,7 +6805,7 @@ smoke_check_5(int metadata_write_strategy)
* Programmer: JRM -- 6/13/06
*
*****************************************************************************/
-hbool_t
+static hbool_t
trace_file_check(int metadata_write_strategy)
{
hbool_t success = TRUE;
@@ -7403,6 +7407,8 @@ finish:
printf("===================================\n");
}
+ takedown_derived_types();
+
/* close HDF5 library */
H5close();