diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-06 19:45:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-06 19:45:35 (GMT) |
commit | 98754fa9d12090f5e048fdb05cc5e9ce9111676f (patch) | |
tree | 407e611b19ee551d8153779104022dd886a467e5 /testpar | |
parent | 29321bcafa9f1c6108bb92b5a844a9d4d9c2c8e7 (diff) | |
download | hdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.zip hdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.tar.gz hdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.tar.bz2 |
[svn-r19050] Description:
Bring r18704:19049 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/CMakeLists.txt | 66 | ||||
-rw-r--r-- | testpar/Makefile.in | 2 | ||||
-rw-r--r-- | testpar/t_cache.c | 507 |
3 files changed, 260 insertions, 315 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt new file mode 100644 index 0000000..0eac602 --- /dev/null +++ b/testpar/CMakeLists.txt @@ -0,0 +1,66 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT (H5_TEST_PAR) + +#----------------------------------------------------------------------------- +# Define Tests +#----------------------------------------------------------------------------- + +SET (testphdf5_SRCS + ${HDF5_TEST_PAR_SOURCE_DIR}/testphdf5.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_dset.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_file.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_mdset.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_ph5basic.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_coll_chunk.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_span_tree.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_chunk_alloc.c + ${HDF5_TEST_PAR_SOURCE_DIR}/t_filter_read.c +) + +#-- Adding test for testhdf5 +ADD_EXECUTABLE (testphdf5 ${testphdf5_SRCS}) +H5_NAMING (testphdf5) +IF (WIN32) + IF (MSVC) + IF (NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (testphdf5 + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (NOT BUILD_SHARED_LIBS) + ENDIF (MSVC) +ENDIF (WIN32) +TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + +ADD_TEST (NAME testphdf5 COMMAND $<TARGET_FILE:testphdf5>) + +MACRO (ADD_H5P_TEST file) + ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) + H5_NAMING (${file}) + IF (WIN32) + IF (MSVC) + IF (NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${file} + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (NOT BUILD_SHARED_LIBS) + ENDIF (MSVC) + ENDIF (WIN32) + TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + + ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>) +ENDMACRO (ADD_H5P_TEST file) + +SET (H5P_TESTS + t_mpi + t_posix_compliant + t_cache + t_pflush1 + t_pflush2 +) + +FOREACH (testp ${H5P_TESTS}) + ADD_H5P_TEST(${testp}) +ENDFOREACH (testp ${H5P_TESTS}) + diff --git a/testpar/Makefile.in b/testpar/Makefile.in index bee63d0..2b4b00b 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -209,12 +209,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LINUX_LFS = @LINUX_LFS@ LIPO = @LIPO@ LL_PATH = @LL_PATH@ LN_S = @LN_S@ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 476f110..9bcf09f 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -205,7 +205,7 @@ int virt_num_data_entries = NUM_DATA_ENTRIES; * The data_index array is an array of integer used to maintain a list * of instances of datum in the data array in increasing base_addr order. * - * This array is necessary, as rename operations can swap the values + * This array is necessary, as move operations can swap the values * of the base_addr fields of two instances of datum. Without this * array, we would no longer be able to use a binary search on a sorted * list to find the indexes of instances of datum given the values of @@ -342,40 +342,33 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = /* test utility functions */ -void expunge_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx); +void expunge_entry(H5F_t * file_ptr, int32_t idx); void insert_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx, unsigned int flags); -void local_pin_and_unpin_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr, - int min_idx, int max_idx, - int min_count, int max_count); -void local_pin_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr, - int min_idx, int max_idx); -void local_unpin_all_entries(H5C_t * cache_ptr, H5F_t * file_ptr, - hbool_t via_unprotect); -int local_unpin_next_pinned_entry(H5C_t * cache_ptr, H5F_t * file_ptr, - int start_idx, hbool_t via_unprotect); -void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr, - int min_idx, int max_idx, +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, + hbool_t via_unprotect); +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(H5C_t * cache_ptr, H5F_t * file_ptr, +void lock_and_unlock_random_entry(H5F_t * file_ptr, int min_idx, int max_idx); -void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx); -void mark_pinned_entry_dirty(int32_t idx, hbool_t size_changed, size_t new_size); -void mark_pinned_or_protected_entry_dirty(int32_t idx); -void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx, - hbool_t global, hbool_t dirty); +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 rename_entry(H5C_t * cache_ptr, H5F_t * file_ptr, - int32_t old_idx, int32_t new_idx); +void move_entry(H5F_t * file_ptr, int32_t old_idx, int32_t new_idx); void resize_entry(int32_t idx, size_t new_size); hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr, H5C_t ** cache_ptr_ptr); void setup_rand(void); hbool_t take_down_cache(hid_t fid); -void unlock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, - int32_t type, unsigned int flags); -void unpin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx, - hbool_t global, hbool_t dirty, hbool_t via_unprotect); +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, + hbool_t dirty, hbool_t via_unprotect); /* test functions */ @@ -725,7 +718,7 @@ init_data(void) int j = 0; haddr_t addr = 512; - /* this must hold so renames don't change entry size. */ + /* this must hold so moves don't change entry size. */ HDassert( (NUM_DATA_ENTRIES / 2) % 20 == 0 ); HDassert( (virt_num_data_entries / 2) % 20 == 0 ); @@ -1657,6 +1650,7 @@ serve_write_request(struct mssg_t * mssg_ptr) /**************************** Call back functions ****************************/ /*****************************************************************************/ + /*------------------------------------------------------------------------- * Function: clear_datum * @@ -2184,8 +2178,7 @@ size_datum(H5F_t UNUSED * f, *****************************************************************************/ void -expunge_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +expunge_entry(H5F_t * file_ptr, int32_t idx) { const char * fcn_name = "expunge_entry()"; @@ -2193,7 +2186,6 @@ expunge_entry(H5C_t * cache_ptr, herr_t result; struct datum * entry_ptr; - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); HDassert( idx < virt_num_data_entries ); @@ -2375,8 +2367,7 @@ insert_entry(H5C_t * cache_ptr, *****************************************************************************/ void -local_pin_and_unpin_random_entries(H5C_t * cache_ptr, - H5F_t * file_ptr, +local_pin_and_unpin_random_entries(H5F_t * file_ptr, int min_idx, int max_idx, int min_count, @@ -2391,7 +2382,6 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr, int i; int idx; - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( 0 <= min_idx ); HDassert( min_idx < max_idx ); @@ -2407,7 +2397,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr, for ( i = 0; i < count; i++ ) { - local_pin_random_entry(cache_ptr, file_ptr, min_idx, max_idx); + local_pin_random_entry(file_ptr, min_idx, max_idx); } count = (HDrand() % (max_count - min_count)) + min_count; @@ -2421,8 +2411,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr, while ( ( i < count ) && ( idx >= 0 ) ) { via_unprotect = ( (((unsigned)i) & 0x0001) == 0 ); - idx = local_unpin_next_pinned_entry(cache_ptr, file_ptr, - idx, via_unprotect); + idx = local_unpin_next_pinned_entry(file_ptr, idx, via_unprotect); i++; } } @@ -2452,8 +2441,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr, *****************************************************************************/ void -local_pin_random_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +local_pin_random_entry(H5F_t * file_ptr, int min_idx, int max_idx) { @@ -2462,7 +2450,6 @@ local_pin_random_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( 0 <= min_idx ); HDassert( min_idx < max_idx ); @@ -2477,7 +2464,7 @@ local_pin_random_entry(H5C_t * cache_ptr, } while ( data[idx].global_pinned || data[idx].local_pinned ); - pin_entry(cache_ptr, file_ptr, idx, FALSE, FALSE); + pin_entry(file_ptr, idx, FALSE, FALSE); } return; @@ -2502,8 +2489,7 @@ local_pin_random_entry(H5C_t * cache_ptr, *****************************************************************************/ void -local_unpin_all_entries(H5C_t * cache_ptr, - H5F_t * file_ptr, +local_unpin_all_entries(H5F_t * file_ptr, hbool_t via_unprotect) { /* const char * fcn_name = "local_unpin_all_entries()"; */ @@ -2512,14 +2498,13 @@ local_unpin_all_entries(H5C_t * cache_ptr, int idx; - HDassert( cache_ptr ); HDassert( file_ptr ); idx = 0; while ( idx >= 0 ) { - idx = local_unpin_next_pinned_entry(cache_ptr, file_ptr, + idx = local_unpin_next_pinned_entry(file_ptr, idx, via_unprotect); } } @@ -2549,8 +2534,7 @@ local_unpin_all_entries(H5C_t * cache_ptr, *****************************************************************************/ int -local_unpin_next_pinned_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +local_unpin_next_pinned_entry(H5F_t * file_ptr, int start_idx, hbool_t via_unprotect) { @@ -2560,7 +2544,6 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( 0 <= start_idx ); HDassert( start_idx < NUM_DATA_ENTRIES ); @@ -2580,7 +2563,7 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr, if ( data[idx].local_pinned ) { - unpin_entry(cache_ptr, file_ptr, idx, FALSE, FALSE, via_unprotect); + unpin_entry(file_ptr, idx, FALSE, FALSE, via_unprotect); } else { @@ -2612,8 +2595,7 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr, *****************************************************************************/ void -lock_and_unlock_random_entries(H5C_t * cache_ptr, - H5F_t * file_ptr, +lock_and_unlock_random_entries(H5F_t * file_ptr, int min_idx, int max_idx, int min_count, @@ -2625,7 +2607,6 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( 0 <= min_count ); HDassert( min_count < max_count ); @@ -2637,7 +2618,7 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr, for ( i = 0; i < count; i++ ) { - lock_and_unlock_random_entry(cache_ptr, file_ptr, min_idx, max_idx); + lock_and_unlock_random_entry(file_ptr, min_idx, max_idx); } } @@ -2664,8 +2645,7 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr, *****************************************************************************/ void -lock_and_unlock_random_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +lock_and_unlock_random_entry(H5F_t * file_ptr, int min_idx, int max_idx) { @@ -2674,7 +2654,6 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( 0 <= min_idx ); HDassert( min_idx < max_idx ); @@ -2686,8 +2665,8 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr, HDassert( min_idx <= idx ); HDassert( idx <= max_idx ); - lock_entry(cache_ptr, file_ptr, idx); - unlock_entry(cache_ptr, file_ptr, idx, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, idx); + unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); } return; @@ -2716,8 +2695,7 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr, *****************************************************************************/ void -lock_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +lock_entry(H5F_t * file_ptr, int32_t idx) { const char * fcn_name = "lock_entry()"; @@ -2726,7 +2704,6 @@ lock_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); HDassert( idx < virt_num_data_entries ); @@ -2764,7 +2741,7 @@ lock_entry(H5C_t * cache_ptr, /***************************************************************************** - * Function: mark_pinned_entry_dirty() + * Function: mark_entry_dirty() * * Purpose: Mark dirty the entry indicated by the index, * @@ -2775,16 +2752,12 @@ lock_entry(H5C_t * cache_ptr, * Programmer: John Mainzer * 4/14/06 * - * Modifications: - * *****************************************************************************/ void -mark_pinned_entry_dirty(int32_t idx, - hbool_t size_changed, - size_t new_size) +mark_entry_dirty(int32_t idx) { - const char * fcn_name = "mark_pinned_entry_dirty()"; + const char * fcn_name = "mark_entry_dirty()"; herr_t result; struct datum * entry_ptr; @@ -2795,83 +2768,23 @@ mark_pinned_entry_dirty(int32_t idx, entry_ptr = &(data[idx]); - HDassert ( entry_ptr->global_pinned ); + HDassert ( entry_ptr->locked || entry_ptr->global_pinned ); HDassert ( ! (entry_ptr->local_pinned) ); (entry_ptr->ver)++; entry_ptr->dirty = TRUE; - result = H5AC_mark_pinned_entry_dirty((void *)entry_ptr, - size_changed, - new_size); + result = H5AC_mark_entry_dirty( (void *)entry_ptr); if ( result < 0 ) { nerrors++; if ( verbose ) { HDfprintf(stdout, - "%d:%s: error in H5AC_mark_pinned_entry_dirty().\n", + "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, fcn_name); } } - else - { - global_dirty_pins++; - } - } - - return; - -} /* mark_pinned_entry_dirty() */ - - -/***************************************************************************** - * Function: mark_pinned_or_protected_entry_dirty() - * - * Purpose: Use the H5AC_mark_pinned_or_protected_entry_dirty() call to - * mark dirty the entry indicated by the index, - * - * Do nothing if nerrors is non-zero on entry. - * - * Return: void - * - * Programmer: John Mainzer - * 5/18/06 - * - * Modifications: - * - *****************************************************************************/ - -void -mark_pinned_or_protected_entry_dirty(int32_t idx) -{ - const char * fcn_name = "mark_pinned_or_protected_entry_dirty()"; - herr_t result; - struct datum * entry_ptr; - - if ( nerrors == 0 ) { - - HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); - HDassert( idx < virt_num_data_entries ); - - entry_ptr = &(data[idx]); - - HDassert ( entry_ptr->locked || entry_ptr->global_pinned ); - - (entry_ptr->ver)++; - entry_ptr->dirty = TRUE; - - result = H5AC_mark_pinned_or_protected_entry_dirty((void *)entry_ptr); - - if ( result < 0 ) { - - nerrors++; - if ( verbose ) { - HDfprintf(stdout, "%d:%s: error in %s.\n", - world_mpi_rank, fcn_name, - "H5AC_mark_pinned_or_protected_entry_dirty()"); - } - } else if ( ! ( entry_ptr->locked ) ) { global_dirty_pins++; @@ -2880,7 +2793,7 @@ mark_pinned_or_protected_entry_dirty(int32_t idx) return; -} /* mark_pinned_or_protected_entry_dirty() */ +} /* mark_entry_dirty() */ /***************************************************************************** @@ -2900,8 +2813,7 @@ mark_pinned_or_protected_entry_dirty(int32_t idx) *****************************************************************************/ void -pin_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +pin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty) @@ -2912,7 +2824,6 @@ pin_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); HDassert( idx < virt_num_data_entries ); @@ -2923,14 +2834,14 @@ pin_entry(H5C_t * cache_ptr, HDassert ( ! (entry_ptr->local_pinned) ); HDassert ( ! ( dirty && ( ! global ) ) ); - lock_entry(cache_ptr, file_ptr, idx); + lock_entry(file_ptr, idx); if ( dirty ) { flags |= H5AC__DIRTIED_FLAG; } - unlock_entry(cache_ptr, file_ptr, idx, flags); + unlock_entry(file_ptr, idx, flags); HDassert( (entry_ptr->header).is_pinned ); HDassert( ( ! dirty ) || ( (entry_ptr->header).is_dirty ) ); @@ -3031,9 +2942,9 @@ pin_protected_entry(int32_t idx, /***************************************************************************** - * Function: rename_entry() + * Function: move_entry() * - * Purpose: Rename the entry indicated old_idx to the entry indicated + * Purpose: Move the entry indicated old_idx to the entry indicated * by new_idex. Touch up the data array so that flush will * not choke. * @@ -3053,12 +2964,11 @@ pin_protected_entry(int32_t idx, *****************************************************************************/ void -rename_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, - int32_t old_idx, - int32_t new_idx) +move_entry(H5F_t * file_ptr, + int32_t old_idx, + int32_t new_idx) { - const char * fcn_name = "rename_entry()"; + const char * fcn_name = "move_entry()"; herr_t result; int tmp; size_t tmp_len; @@ -3069,7 +2979,6 @@ rename_entry(H5C_t * cache_ptr, if ( ( nerrors == 0 ) && ( old_idx != new_idx ) ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( ( 0 <= old_idx ) && ( old_idx < NUM_DATA_ENTRIES ) ); HDassert( old_idx < virt_num_data_entries ); @@ -3087,13 +2996,13 @@ rename_entry(H5C_t * cache_ptr, old_addr = old_entry_ptr->base_addr; new_addr = new_entry_ptr->base_addr; - result = H5AC_rename(file_ptr, &(types[0]), old_addr, new_addr); + result = H5AC_move_entry(file_ptr, &(types[0]), old_addr, new_addr); if ( ( result < 0 ) || ( old_entry_ptr->header.addr != new_addr ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_rename() failed.\n", + HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, fcn_name); } @@ -3136,7 +3045,7 @@ rename_entry(H5C_t * cache_ptr, return; -} /* rename_entry() */ +} /* move_entry() */ /***************************************************************************** @@ -3175,7 +3084,6 @@ resize_entry(int32_t idx, entry_ptr = &(data[idx]); HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE ); - HDassert( !(entry_ptr->header.is_protected) ); HDassert( !(entry_ptr->locked) ); HDassert( ( entry_ptr->global_pinned ) && ( ! entry_ptr->local_pinned ) ); @@ -3184,13 +3092,13 @@ resize_entry(int32_t idx, HDassert( new_size > 0 ); HDassert( new_size <= entry_ptr->len ); - result = H5AC_resize_pinned_entry((void *)entry_ptr, new_size); + result = H5AC_resize_entry((void *)entry_ptr, new_size); if ( result < 0 ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_rename() failed.\n", + HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, fcn_name); } @@ -3321,7 +3229,7 @@ setup_cache_for_test(hid_t * fid_ptr, config.rpt_fcn_enabled = TRUE; if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", @@ -3622,8 +3530,7 @@ take_down_cache(hid_t fid) *****************************************************************************/ void -unlock_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +unlock_entry(H5F_t * file_ptr, int32_t idx, unsigned int flags) { @@ -3634,7 +3541,6 @@ unlock_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); HDassert( idx < virt_num_data_entries ); @@ -3652,8 +3558,7 @@ unlock_entry(H5C_t * cache_ptr, } result = H5AC_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), - entry_ptr->base_addr, - (void *)(&(entry_ptr->header)), flags); + entry_ptr->base_addr, (void *)(&(entry_ptr->header)), flags); if ( ( result < 0 ) || ( entry_ptr->header.type != &(types[0]) ) || @@ -3712,8 +3617,7 @@ unlock_entry(H5C_t * cache_ptr, *****************************************************************************/ void -unpin_entry(H5C_t * cache_ptr, - H5F_t * file_ptr, +unpin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty, @@ -3726,7 +3630,6 @@ unpin_entry(H5C_t * cache_ptr, if ( nerrors == 0 ) { - HDassert( cache_ptr ); HDassert( file_ptr ); HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) ); HDassert( idx < virt_num_data_entries ); @@ -3741,20 +3644,20 @@ unpin_entry(H5C_t * cache_ptr, if ( via_unprotect ) { - lock_entry(cache_ptr, file_ptr, idx); + lock_entry(file_ptr, idx); if ( dirty ) { flags |= H5AC__DIRTIED_FLAG; } - unlock_entry(cache_ptr, file_ptr, idx, flags); + unlock_entry(file_ptr, idx, flags); } else { if ( dirty ) { - mark_pinned_entry_dirty(idx, FALSE, (size_t)0); + mark_entry_dirty(idx); } @@ -4086,26 +3989,24 @@ smoke_check_1(void) for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); } - /* rename the first half of the entries... */ + /* Move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); } - /* ...and then rename them back. */ + /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); } if ( fid >= 0 ) { @@ -4198,7 +4099,7 @@ smoke_check_1(void) * Added pinned entry tests. * * JRM -- 4/28/06 - * Modified test to rename pinned entries. + * Modified test to move pinned entries. * *****************************************************************************/ @@ -4254,8 +4155,7 @@ smoke_check_2(void) if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, 0, 10); + lock_and_unlock_random_entries(file_ptr, (i - 100), i, 0, 10); } } @@ -4263,56 +4163,54 @@ smoke_check_2(void) { /* Make sure we don't step on any locally pinned entries */ if ( data[i].local_pinned ) { - unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE); + unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); } - pin_entry(cache_ptr, file_ptr, i, TRUE, FALSE); + pin_entry(file_ptr, i, TRUE, FALSE); } for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-=2 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 20), 0, 100); - local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0, + local_pin_and_unpin_random_entries(file_ptr, 0, (virt_num_data_entries / 4), 0, 3); } for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 10), 0, 100); } - /* we can't rename pinned entries, so release any local pins now. */ - local_unpin_all_entries(cache_ptr, file_ptr, FALSE); + /* we can't move pinned entries, so release any local pins now. */ + local_unpin_all_entries(file_ptr, FALSE); - /* rename the first half of the entries... */ + /* Move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, ((virt_num_data_entries / 50) - 1), 0, 100); } - /* ...and then rename them back. */ + /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 100), 0, 100); } @@ -4322,7 +4220,7 @@ smoke_check_2(void) hbool_t via_unprotect = ( (((unsigned)i) & 0x01) == 0 ); hbool_t dirty = ( (((unsigned)i) & 0x02) == 0 ); - unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty, via_unprotect); + unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } if ( fid >= 0 ) { @@ -4498,8 +4396,7 @@ smoke_check_3(void) if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -4523,10 +4420,10 @@ smoke_check_3(void) hbool_t dirty = ( (i % 2) == 0); if ( data[i].local_pinned ) { - unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE); + unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); } - pin_entry(cache_ptr, file_ptr, i, TRUE, dirty); + pin_entry(file_ptr, i, TRUE, dirty); HDassert( !dirty || data[i].header.is_dirty ); HDassert( data[i].header.is_pinned ); @@ -4536,13 +4433,12 @@ smoke_check_3(void) if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } - local_pin_and_unpin_random_entries(cache_ptr, file_ptr, - 0, virt_num_data_entries / 4, + local_pin_and_unpin_random_entries(file_ptr, 0, + virt_num_data_entries / 4, 0, (file_mpi_rank + 2)); } @@ -4584,17 +4480,17 @@ smoke_check_3(void) HDassert( data[i].global_pinned ); HDassert( ! data[i].local_pinned ); - unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty, + unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } if ( i % 2 == 0 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + local_pin_and_unpin_random_entries(file_ptr, 0, virt_num_data_entries / 2, 0, 2); - lock_and_unlock_random_entries(cache_ptr, file_ptr, + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } } @@ -4612,29 +4508,28 @@ smoke_check_3(void) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(cache_ptr, file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } /* 7 */ if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);} - /* we can't rename pinned entries, so release any local pins now. */ - local_unpin_all_entries(cache_ptr, file_ptr, FALSE); + /* we can't move pinned entries, so release any local pins now. */ + local_unpin_all_entries(file_ptr, FALSE); min_count = 10 / (file_mpi_rank + 1); max_count = min_count + 100; - /* rename the first half of the entries... */ + /* move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 20), min_count, max_count); } @@ -4642,14 +4537,13 @@ smoke_check_3(void) /* 8 */ if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);} - /* ...and then rename them back. */ + /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 40), min_count, max_count); } @@ -4665,17 +4559,16 @@ smoke_check_3(void) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0, + local_pin_and_unpin_random_entries(file_ptr, 0, (virt_num_data_entries / 2), 0, 5); - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -4684,7 +4577,7 @@ smoke_check_3(void) if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);} /* release any local pins before we take down the cache. */ - local_unpin_all_entries(cache_ptr, file_ptr, FALSE); + local_unpin_all_entries(file_ptr, FALSE); if ( fid >= 0 ) { @@ -4852,8 +4745,7 @@ smoke_check_4(void) if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -4877,7 +4769,7 @@ smoke_check_4(void) * entries are in fact pinned (which unpin_entry() should do). */ insert_entry(cache_ptr, file_ptr, i, H5C__PIN_ENTRY_FLAG); - unpin_entry(cache_ptr, file_ptr, i, TRUE, FALSE, FALSE); + unpin_entry(file_ptr, i, TRUE, FALSE, FALSE); } if ( i % 59 == 0 ) { @@ -4885,10 +4777,10 @@ smoke_check_4(void) hbool_t dirty = ( (i % 2) == 0); if ( data[i].local_pinned ) { - unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE); + unpin_entry(file_ptr, i, FALSE, FALSE, FALSE); } - pin_entry(cache_ptr, file_ptr, i, TRUE, dirty); + pin_entry(file_ptr, i, TRUE, dirty); HDassert( !dirty || data[i].header.is_dirty ); HDassert( data[i].header.is_pinned ); @@ -4898,12 +4790,11 @@ smoke_check_4(void) if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } - local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0, + local_pin_and_unpin_random_entries(file_ptr, 0, (virt_num_data_entries / 4), 0, (file_mpi_rank + 2)); } @@ -4935,14 +4826,14 @@ smoke_check_4(void) HDassert( data[i].global_pinned ); HDassert( ! data[i].local_pinned ); - unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty, via_unprotect); + unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } if ( i % 2 == 0 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - lock_and_unlock_random_entries(cache_ptr, file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } } @@ -4953,38 +4844,36 @@ smoke_check_4(void) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - lock_and_unlock_random_entries(cache_ptr, file_ptr, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + lock_and_unlock_random_entries(file_ptr, min_idx, max_idx, 0, 100); } - /* we can't rename pinned entries, so release any local pins now. */ - local_unpin_all_entries(cache_ptr, file_ptr, FALSE); + /* we can't move pinned entries, so release any local pins now. */ + local_unpin_all_entries(file_ptr, FALSE); min_count = 10 * (file_mpi_rank % 4); max_count = min_count + 100; - /* rename the first half of the entries... */ + /* move the first half of the entries... */ for ( i = 0; i < (virt_num_data_entries / 2); i++ ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 20), min_count, max_count); } - /* ...and then rename them back. */ + /* ...and then move them back. */ for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); - rename_entry(cache_ptr, file_ptr, i, - (i + (virt_num_data_entries / 2))); - lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); + move_entry(file_ptr, i, (i + (virt_num_data_entries / 2))); + lock_and_unlock_random_entries(file_ptr, 0, (virt_num_data_entries / 40), min_count, max_count); } @@ -4997,13 +4886,12 @@ smoke_check_4(void) for ( i = 0; i < (virt_num_data_entries / 2); i+=2 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); if ( i > 100 ) { - lock_and_unlock_random_entries(cache_ptr, file_ptr, - (i - 100), i, + lock_and_unlock_random_entries(file_ptr, (i - 100), i, min_count, max_count); } } @@ -5083,8 +4971,7 @@ smoke_check_4(void) * Function: smoke_check_5() * * Purpose: Similar to smoke check 1, but modified to verify that - * H5AC_mark_pinned_or_protected_entry_dirty() works in - * the parallel case. + * H5AC_mark_entry_dirty() works in the parallel case. * * Return: Success: TRUE * @@ -5096,7 +4983,7 @@ smoke_check_4(void) * * JRM -- 7/12/06 * Added test code for H5AC_expunge_entry() and - * H5AC_resize_pinned_entry(). + * H5AC_resize_entry(). * *****************************************************************************/ @@ -5198,24 +5085,24 @@ smoke_check_5(void) for ( i = 0; i < (virt_num_data_entries / 4); i++ ) { - lock_entry(cache_ptr, file_ptr, i); + lock_entry(file_ptr, i); if ( i % 2 == 0 ) { - mark_pinned_or_protected_entry_dirty(i); + mark_entry_dirty(i); } - unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); + unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET); if ( i % 2 == 1 ) { if ( i % 4 == 1 ) { - lock_entry(cache_ptr, file_ptr, i); - unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG); + lock_entry(file_ptr, i); + unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG); } - expunge_entry(cache_ptr, file_ptr, i); + expunge_entry(file_ptr, i); } } @@ -5228,7 +5115,7 @@ smoke_check_5(void) i >= (virt_num_data_entries / 4); i-- ) { - pin_entry(cache_ptr, file_ptr, i, TRUE, FALSE); + pin_entry(file_ptr, i, TRUE, FALSE); if ( i % 2 == 0 ) { @@ -5237,14 +5124,7 @@ smoke_check_5(void) resize_entry(i, data[i].len / 2); } - if ( i % 4 == 0 ) - { - mark_pinned_or_protected_entry_dirty(i); - } - else - { - mark_pinned_entry_dirty(i, FALSE, (size_t)0); - } + mark_entry_dirty(i); if ( i % 8 <= 4 ) { @@ -5252,7 +5132,7 @@ smoke_check_5(void) } } - unpin_entry(cache_ptr, file_ptr, i, TRUE, FALSE, FALSE); + unpin_entry(file_ptr, i, TRUE, FALSE, FALSE); } /* 6 */ @@ -5364,16 +5244,15 @@ smoke_check_5(void) * * - H5AC_flush() * - H5AC_set() - * - H5AC_mark_pinned_entry_dirty() - * - H5AC_mark_pinned_or_protected_entry_dirty() - * H5AC_rename() + * - H5AC_mark_entry_dirty() + * H5AC_move_entry() * - H5AC_pin_protected_entry() * - H5AC_protect() * - H5AC_unpin_entry() * - H5AC_unprotect() * - H5AC_set_cache_auto_resize_config() * - H5AC_expunge_entry() - * - H5AC_resize_pinned_entry() + * - H5AC_resize_entry() * * This test is skipped if H5_METADATA_TRACE_FILE is undefined. * @@ -5387,7 +5266,7 @@ smoke_check_5(void) * * JRM -- 7/11/06 * Updated for H5AC_expunge_entry() and - * H5AC_resize_pinned_entry(). + * H5AC_resize_entry(). * *****************************************************************************/ @@ -5408,7 +5287,7 @@ trace_file_check(void) "H5AC_set 0x4 15 0x0 4 0\n", "H5AC_set 0x8 15 0x0 6 0\n", "H5AC_protect 0 15 H5AC_WRITE 2 1\n", - "H5AC_mark_pinned_or_protected_entry_dirty 0 0\n", + "H5AC_mark_entry_dirty 0 0\n", "H5AC_unprotect 0 15 0 0 0\n", "H5AC_protect 2 15 H5AC_WRITE 2 1\n", "H5AC_pin_protected_entry 2 0\n", @@ -5418,12 +5297,12 @@ trace_file_check(void) "H5AC_protect 4 15 H5AC_WRITE 4 1\n", "H5AC_pin_protected_entry 4 0\n", "H5AC_unprotect 4 15 0 0 0\n", - "H5AC_mark_pinned_entry_dirty 0x4 0 0 0\n", - "H5AC_resize_pinned_entry 0x4 2 0\n", - "H5AC_resize_pinned_entry 0x4 4 0\n", + "H5AC_mark_entry_dirty 0x4 0 0 0\n", + "H5AC_resize_entry 0x4 2 0\n", + "H5AC_resize_entry 0x4 4 0\n", "H5AC_unpin_entry 4 0\n", - "H5AC_rename 0 8a65 15 0\n", - "H5AC_rename 8a65 0 15 0\n", + "H5AC_move_entry 0 8a65 15 0\n", + "H5AC_move_entry 8a65 0 15 0\n", "H5AC_flush 0\n", NULL }; @@ -5498,7 +5377,7 @@ trace_file_check(void) strcpy(config.trace_file_name, "t_cache_trace.txt"); if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { nerrors++; HDfprintf(stdout, @@ -5513,27 +5392,27 @@ trace_file_check(void) insert_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET); insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET); - lock_entry(cache_ptr, file_ptr, 0); - mark_pinned_or_protected_entry_dirty(0); - unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET); + lock_entry(file_ptr, 0); + mark_entry_dirty(0); + unlock_entry(file_ptr, 0, H5AC__NO_FLAGS_SET); - lock_entry(cache_ptr, file_ptr, 1); + lock_entry(file_ptr, 1); pin_protected_entry(1, TRUE); - unlock_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET); - unpin_entry(cache_ptr, file_ptr, 1, TRUE, FALSE, FALSE); + unlock_entry(file_ptr, 1, H5AC__NO_FLAGS_SET); + unpin_entry(file_ptr, 1, TRUE, FALSE, FALSE); - expunge_entry(cache_ptr,file_ptr, 1); + expunge_entry(file_ptr, 1); - lock_entry(cache_ptr, file_ptr, 2); + lock_entry(file_ptr, 2); pin_protected_entry(2, TRUE); - unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET); - mark_pinned_entry_dirty(2, FALSE, 0); + unlock_entry(file_ptr, 2, H5AC__NO_FLAGS_SET); + mark_entry_dirty(2); resize_entry(2, data[2].len / 2); resize_entry(2, data[2].len); - unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE); + unpin_entry(file_ptr, 2, TRUE, FALSE, FALSE); - rename_entry(cache_ptr, file_ptr, 0, 20); - rename_entry(cache_ptr, file_ptr, 0, 20); + move_entry(file_ptr, 0, 20); + move_entry(file_ptr, 0, 20); if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; @@ -5562,7 +5441,7 @@ trace_file_check(void) config.trace_file_name[0] = '\0'; if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config) - != SUCCEED ) { + != SUCCEED ) { nerrors++; HDfprintf(stdout, |