diff options
Diffstat (limited to 'src/H5Cmpio.c')
-rw-r--r-- | src/H5Cmpio.c | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 7df8093..8f8b5c6 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -180,19 +180,19 @@ H5C_apply_candidate_list(H5F_t * f, int i; int m; int n; - int first_entry_to_flush; - int last_entry_to_flush; - int entries_to_clear = 0; - int entries_to_flush = 0; - int entries_to_flush_or_clear_last = 0; - int entries_to_flush_collectively = 0; - int entries_cleared = 0; - int entries_flushed = 0; - int entries_delayed = 0; - int entries_flushed_or_cleared_last = 0; - int entries_flushed_collectively = 0; - int entries_examined = 0; - int initial_list_len; + unsigned first_entry_to_flush; + unsigned last_entry_to_flush; + unsigned entries_to_clear = 0; + unsigned entries_to_flush = 0; + unsigned entries_to_flush_or_clear_last = 0; + unsigned entries_to_flush_collectively = 0; + unsigned entries_cleared = 0; + unsigned entries_flushed = 0; + unsigned entries_delayed = 0; + unsigned entries_flushed_or_cleared_last = 0; + unsigned entries_flushed_collectively = 0; + unsigned entries_examined = 0; + unsigned initial_list_len; int * candidate_assignment_table = NULL; haddr_t addr; H5C_cache_entry_t * clear_ptr = NULL; @@ -206,8 +206,8 @@ H5C_apply_candidate_list(H5F_t * f, #if H5C_APPLY_CANDIDATE_LIST__DEBUG char tbl_buf[1024]; #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ - unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; /* Return value */ + unsigned u; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -297,7 +297,7 @@ H5C_apply_candidate_list(H5F_t * f, sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n"); HDfprintf(stdout, "%s", tbl_buf); - HDfprintf(stdout, "%s:%d: flush entries [%d, %d].\n", + HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush); HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank); @@ -329,26 +329,26 @@ H5C_apply_candidate_list(H5F_t * f, * issue, we should be able to work around this. */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?") - /* Determine whether the entry is to be cleared or flushed, - * and mark it accordingly. We will scan the protected and - * pinned list shortly, and clear or flush according to these - * markings. - */ - if(i >= first_entry_to_flush && i <= last_entry_to_flush) { - entries_to_flush++; - entry_ptr->flush_immediately = TRUE; - } /* end if */ - else { - entries_to_clear++; - entry_ptr->clear_on_unprotect = TRUE; - } /* end else */ - /* Entries marked as collectively accessed and are in the - * candidate list to clear from the cache have to be - * removed from the coll list. This is OK since the - * candidate list is collective and uniform across all - * ranks. + /* Determine whether the entry is to be cleared or flushed, + * and mark it accordingly. We will scan the protected and + * pinned list shortly, and clear or flush according to these + * markings. */ + if(u >= first_entry_to_flush && u <= last_entry_to_flush) { + entries_to_flush++; + entry_ptr->flush_immediately = TRUE; + } /* end if */ + else { + entries_to_clear++; + entry_ptr->clear_on_unprotect = TRUE; + } /* end else */ + + /* Entries marked as collectively accessed and are in the + candidate list to clear from the cache have to be + removed from the coll list. This is OK since the + candidate list is collective and uniform across all + ranks. */ if(entry_ptr->coll_access) { entry_ptr->coll_access = FALSE; H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL) @@ -356,9 +356,9 @@ H5C_apply_candidate_list(H5F_t * f, } /* end for */ #if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%d/%d.\n", - FUNC, mpi_rank, num_candidates, (int)entries_to_clear, - (int)entries_to_flush); + HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", + FUNC, mpi_rank, num_candidates, entries_to_clear, + entries_to_flush); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ /* We have now marked all the entries on the candidate list for @@ -557,7 +557,7 @@ H5C_apply_candidate_list(H5F_t * f, } /* end while */ #if H5C_APPLY_CANDIDATE_LIST__DEBUG - HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %d/%d/%d.\n", + HDfprintf(stdout, "%s:%d: entries examined/cleared/flushed = %u/%u/%u.\n", FUNC, mpi_rank, entries_examined, entries_cleared, entries_flushed); #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ @@ -684,7 +684,7 @@ H5C_apply_candidate_list(H5F_t * f, #if H5C_APPLY_CANDIDATE_LIST__DEBUG HDfprintf(stdout, - "%s:%d: pel entries examined/cleared/flushed = %d/%d/%d.\n", + "%s:%d: pel entries examined/cleared/flushed = %u/%u/%u.\n", FUNC, mpi_rank, entries_examined, entries_cleared, entries_flushed); HDfprintf(stdout, "%s:%d: done.\n", FUNC, mpi_rank); @@ -745,7 +745,7 @@ H5C_apply_candidate_list(H5F_t * f, (entries_cleared != entries_to_clear) || (entries_flushed_or_cleared_last != entries_to_flush_or_clear_last) || (entries_flushed_collectively != entries_to_flush_collectively)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry count mismatch.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry count mismatch") done: if(candidate_assignment_table != NULL) @@ -806,7 +806,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr) if(space_needed > 0) { /* we have work to do */ H5C_cache_entry_t *entry_ptr; - unsigned nominated_entries_count = 0; + int nominated_entries_count = 0; size_t nominated_entries_size = 0; haddr_t nominated_addr; @@ -992,23 +992,23 @@ done: herr_t H5C_mark_entries_as_clean(H5F_t * f, hid_t dxpl_id, - int32_t ce_array_len, + unsigned ce_array_len, haddr_t * ce_array_ptr) { H5C_t * cache_ptr; - int entries_cleared; + unsigned entries_cleared; unsigned entries_examined; - int i; unsigned initial_list_len; haddr_t addr; #if H5C_DO_SANITY_CHECKS - int pinned_entries_marked = 0; - int protected_entries_marked = 0; - int other_entries_marked = 0; + unsigned pinned_entries_marked = 0; + unsigned protected_entries_marked = 0; + unsigned other_entries_marked = 0; haddr_t last_addr; #endif /* H5C_DO_SANITY_CHECKS */ H5C_cache_entry_t * clear_ptr = NULL; H5C_cache_entry_t * entry_ptr = NULL; + unsigned u; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1029,11 +1029,11 @@ H5C_mark_entries_as_clean(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - for(i = 0; i < ce_array_len; i++) { - addr = ce_array_ptr[i]; + for(u = 0; u < ce_array_len; u++) { + addr = ce_array_ptr[u]; #if H5C_DO_SANITY_CHECKS - if(i == 0) + if(u == 0) last_addr = addr; else { if(last_addr == addr) @@ -1057,17 +1057,17 @@ H5C_mark_entries_as_clean(H5F_t * f, if(entry_ptr == NULL) { #if H5C_DO_SANITY_CHECKS HDfprintf(stdout, - "H5C_mark_entries_as_clean: entry[%d] = %ld not in cache.\n", - (int)i, - (long)addr); + "H5C_mark_entries_as_clean: entry[%u] = %a not in cache.\n", + u, + addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?") } /* end if */ else if(!entry_ptr->is_dirty) { #if H5C_DO_SANITY_CHECKS HDfprintf(stdout, - "H5C_mark_entries_as_clean: entry %ld is not dirty!?!\n", - (long)addr); + "H5C_mark_entries_as_clean: entry %a is not dirty!?!\n", + addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?") } /* end else-if */ @@ -1178,17 +1178,17 @@ H5C_mark_entries_as_clean(H5F_t * f, ( (ce_array_len - entries_cleared) <= cache_ptr->pl_len ) ); #if H5C_DO_SANITY_CHECKS - i = 0; + u = 0; entry_ptr = cache_ptr->pl_head_ptr; while ( entry_ptr != NULL ) { if ( entry_ptr->clear_on_unprotect ) { - i++; + u++; } entry_ptr = entry_ptr->next; } - HDassert( (entries_cleared + i) == ce_array_len ); + HDassert( (entries_cleared + u) == ce_array_len ); #endif /* H5C_DO_SANITY_CHECKS */ done: |