diff options
Diffstat (limited to 'testpar/t_cache.c')
-rw-r--r-- | testpar/t_cache.c | 274 |
1 files changed, 0 insertions, 274 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 5612cbd..8965cb4 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -504,7 +504,6 @@ 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 smoke_check_6(int metadata_write_strategy); static hbool_t trace_file_check(int metadata_write_strategy); @@ -7191,263 +7190,6 @@ trace_file_check(int metadata_write_strategy) /***************************************************************************** * - * Function: smoke_check_6() - * - * Purpose: Sixth smoke check for the parallel cache. - * - * Return: Success: TRUE - * - * Failure: FALSE - * - * Programmer: JRM -- 1/13/06 - * - *****************************************************************************/ -static hbool_t -smoke_check_6(int metadata_write_strategy) -{ - hbool_t success = TRUE; - int i; - int max_nerrors; - int min_count; - int max_count; - int min_idx; - int max_idx; - hid_t fid = -1; - H5F_t * file_ptr = NULL; - H5C_t * cache_ptr = NULL; - struct mssg_t mssg; - - switch ( metadata_write_strategy ) { - - case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: - if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- process 0 only md write strategy"); - } - break; - - case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: - if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- distributed md write strategy"); - } - break; - - default: - if ( world_mpi_rank == 0 ) { - TESTING("smoke check #6 -- unknown md write strategy"); - } - break; - } - - nerrors = 0; - init_data(); - reset_stats(); - - if ( world_mpi_rank == world_server_mpi_rank ) { - - if ( ! server_main() ) { - - /* some error occured in the server -- report failure */ - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", - world_mpi_rank, FUNC); - } - } - } - else /* run the clients */ - { - int temp; - - if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr, - metadata_write_strategy) ) { - - nerrors++; - fid = -1; - cache_ptr = NULL; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", - world_mpi_rank, FUNC); - } - } - - min_count = 100 / ((file_mpi_rank + 1) * (file_mpi_rank + 1)); - max_count = min_count + 50; - - temp = virt_num_data_entries; - virt_num_data_entries = NUM_DATA_ENTRIES; - - /* insert the first half collectively */ - file_ptr->coll_md_read = H5P_USER_TRUE; - for ( i = 0; i < virt_num_data_entries/2; i++ ) - { - struct datum * entry_ptr; - entry_ptr = &(data[i]); - - insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - - if(TRUE != entry_ptr->header.coll_access) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", - world_mpi_rank, FUNC); - } - } - - /* Make sure coll entries do not cross the 80% threshold */ - HDassert(cache_ptr->max_cache_size*0.8 > cache_ptr->coll_list_size); - } - - /* insert the other half independently */ - file_ptr->coll_md_read = H5P_USER_FALSE; - for ( i = virt_num_data_entries/2; i < virt_num_data_entries; i++ ) - { - struct datum * entry_ptr; - entry_ptr = &(data[i]); - - insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - - if(FALSE != entry_ptr->header.coll_access) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n", - world_mpi_rank, FUNC); - } - } - - /* Make sure coll entries do not cross the 80% threshold */ - HDassert(cache_ptr->max_cache_size*0.8 > cache_ptr->coll_list_size); - } - - /* flush the file */ - if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", - world_mpi_rank, FUNC); - } - } - - /* Protect the first half of the entries collectively */ - file_ptr->coll_md_read = H5P_USER_TRUE; - for ( i = 0; i < (virt_num_data_entries / 2); i++ ) - { - struct datum * entry_ptr; - entry_ptr = &(data[i]); - - lock_entry(file_ptr, i); - - if(TRUE != entry_ptr->header.coll_access) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", - world_mpi_rank, FUNC); - } - } - - /* Make sure coll entries do not cross the 80% threshold */ - HDassert(cache_ptr->max_cache_size*0.8 > cache_ptr->coll_list_size); - } - - /* protect the other half independently */ - file_ptr->coll_md_read = H5P_USER_FALSE; - for ( i = virt_num_data_entries/2; i < virt_num_data_entries; i++ ) - { - struct datum * entry_ptr; - entry_ptr = &(data[i]); - - lock_entry(file_ptr, i); - - if(FALSE != entry_ptr->header.coll_access) { - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n", - world_mpi_rank, FUNC); - } - } - - /* Make sure coll entries do not cross the 80% threshold */ - HDassert(cache_ptr->max_cache_size*0.8 > cache_ptr->coll_list_size); - } - - for ( i = 0; i < (virt_num_data_entries); i++ ) - { - unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); - } - - if ( fid >= 0 ) { - - if ( ! take_down_cache(fid, cache_ptr) ) { - - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", - world_mpi_rank, FUNC); - } - } - } - - /* verify that all instances of datum are back where the started - * and are clean. - */ - - for ( i = 0; i < NUM_DATA_ENTRIES; i++ ) - { - HDassert( data_index[i] == i ); - HDassert( ! (data[i].dirty) ); - } - - /* compose the done message */ - mssg.req = DONE_REQ_CODE; - mssg.src = world_mpi_rank; - mssg.dest = world_server_mpi_rank; - mssg.mssg_num = -1; /* set by send function */ - mssg.base_addr = 0; /* not used */ - mssg.len = 0; /* not used */ - mssg.ver = 0; /* not used */ - mssg.count = 0; /* not used */ - mssg.magic = MSSG_MAGIC; - - if ( success ) { - - - success = send_mssg(&mssg, FALSE); - - if ( ! success ) { - - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", - world_mpi_rank, FUNC); - } - } - } - virt_num_data_entries = temp; - } - - max_nerrors = get_max_nerrors(); - - if ( world_mpi_rank == 0 ) { - - if ( max_nerrors == 0 ) { - - PASSED(); - - } else { - - failures++; - H5_FAILED(); - } - } - - success = ( ( success ) && ( max_nerrors == 0 ) ); - - return(success); - -} /* smoke_check_6() */ - - -/***************************************************************************** - * * Function: main() * * Purpose: Main function for the parallel cache test. @@ -7638,22 +7380,6 @@ main(int argc, char **argv) smoke_check_5(H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); smoke_check_5(H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); #endif - /* enable the collective metadata read property */ - if ( world_mpi_rank != world_server_mpi_rank ) { - if ( H5Pset_coll_metadata_read(fapl, 1) < 0 ) { - - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5Pset_coll_metadata_read() failed 1.\n", - world_mpi_rank, FUNC); - } - } - } -#if 1 - smoke_check_6(H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); - smoke_check_6(H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); -#endif - #if 1 trace_file_check(H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY); trace_file_check(H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); |