summaryrefslogtreecommitdiffstats
path: root/src/H5ACmpio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
commit4a17aff4085ad6ee265b95730aca3f493056dec8 (patch)
tree8bfb665c6d95a2e3520fa1bb0ff54d95aff3923f /src/H5ACmpio.c
parent853ae26333592faf69cd8c454ef92ffea8549df5 (diff)
downloadhdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.zip
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.gz
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.bz2
Add API context interface and use it throughout the library.
Diffstat (limited to 'src/H5ACmpio.c')
-rw-r--r--src/H5ACmpio.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index d03c17b..03e31b4 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -94,20 +94,19 @@ static herr_t H5AC__construct_candidate_list(H5AC_t *cache_ptr,
H5AC_aux_t *aux_ptr, int sync_point_op);
static herr_t H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr,
unsigned *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr);
-static herr_t H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id);
-static herr_t H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f,
- hid_t dxpl_id);
+static herr_t H5AC__propagate_and_apply_candidate_list(H5F_t *f);
+static herr_t H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f);
static herr_t H5AC__receive_haddr_list(MPI_Comm mpi_comm, unsigned *num_entries_ptr,
haddr_t **haddr_buf_ptr_ptr);
static herr_t H5AC__receive_candidate_list(const H5AC_t *cache_ptr,
unsigned *num_entries_ptr, haddr_t **haddr_buf_ptr_ptr);
-static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id);
+static herr_t H5AC__receive_and_apply_clean_list(H5F_t *f);
static herr_t H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates,
haddr_t *candidates_list_ptr);
-static herr_t H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id);
-static herr_t H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id);
-static herr_t H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id);
-static herr_t H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id);
+static herr_t H5AC__rsp__dist_md_write__flush(H5F_t *f);
+static herr_t H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f);
+static herr_t H5AC__rsp__p0_only__flush(H5F_t *f);
+static herr_t H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f);
/*********************/
@@ -1226,7 +1225,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id)
+H5AC__propagate_and_apply_candidate_list(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1275,7 +1274,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id)
aux_ptr->write_permitted = TRUE;
/* Apply the candidate list */
- result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_candidates,
+ result = H5C_apply_candidate_list(f, cache_ptr, num_candidates,
candidates_list_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size);
/* Disable writes again */
@@ -1393,7 +1392,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id)
+H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1416,7 +1415,7 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id)
HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
} /* end if */
else {
- if(H5AC__receive_and_apply_clean_list(f, dxpl_id) < 0)
+ if(H5AC__receive_and_apply_clean_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.")
} /* end else */
@@ -1516,7 +1515,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id)
+H5AC__receive_and_apply_clean_list(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1541,7 +1540,7 @@ H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id)
if(num_entries > 0)
/* mark the indicated entries as clean */
- if(H5C_mark_entries_as_clean(f, dxpl_id, num_entries, haddr_buf_ptr) < 0)
+ if(H5C_mark_entries_as_clean(f, num_entries, haddr_buf_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.")
/* if it is defined, call the sync point done callback. Note
@@ -1659,7 +1658,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id)
+H5AC__rsp__dist_md_write__flush(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1702,7 +1701,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id)
aux_ptr->write_permitted = TRUE;
/* Apply the candidate list */
- result = H5C_apply_candidate_list(f, dxpl_id, cache_ptr, num_entries,
+ result = H5C_apply_candidate_list(f, cache_ptr, num_entries,
haddr_buf_ptr, aux_ptr->mpi_rank, aux_ptr->mpi_size);
/* Disable writes again */
@@ -1801,7 +1800,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
+H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1830,7 +1829,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.")
/* propagate and apply candidate list -- all processes */
- if(H5AC__propagate_and_apply_candidate_list(f, dxpl_id) < 0)
+ if(H5AC__propagate_and_apply_candidate_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list.")
} /* evictions enabled */
@@ -1876,7 +1875,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id)
+H5AC__rsp__p0_only__flush(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -1909,7 +1908,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id)
aux_ptr->write_permitted = TRUE;
/* Flush the cache */
- result = H5C_flush_cache(f, dxpl_id, H5AC__NO_FLAGS_SET);
+ result = H5C_flush_cache(f, H5AC__NO_FLAGS_SET);
/* Disable writes again */
aux_ptr->write_permitted = FALSE;
@@ -1927,7 +1926,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id)
} /* end if */
/* Propagate cleaned entries to other ranks. */
- if(H5AC__propagate_flushed_and_still_clean_entries_list(f, dxpl_id) < 0)
+ if(H5AC__propagate_flushed_and_still_clean_entries_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.")
done:
@@ -1978,7 +1977,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
+H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -2030,7 +2029,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
aux_ptr->write_permitted = TRUE;
/* Flush the cache */
- result = H5C_flush_to_min_clean(f, dxpl_id);
+ result = H5C_flush_to_min_clean(f);
/* Disable writes again */
aux_ptr->write_permitted = FALSE;
@@ -2047,7 +2046,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
(aux_ptr->write_done)();
} /* end if */
- if(H5AC__propagate_flushed_and_still_clean_entries_list(f, dxpl_id) < 0)
+ if(H5AC__propagate_flushed_and_still_clean_entries_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.")
} /* end if */
@@ -2088,7 +2087,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op)
+H5AC__run_sync_point(H5F_t *f, int sync_point_op)
{
H5AC_t * cache_ptr;
H5AC_aux_t * aux_ptr;
@@ -2130,12 +2129,12 @@ HDfprintf(stdout, "%d:H5AC_propagate...:%u: (u/uu/i/iu/r/ru) = %zu/%u/%zu/%u/%zu
case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY:
switch(sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
- if(H5AC__rsp__p0_only__flush_to_min_clean(f, dxpl_id) < 0)
+ if(H5AC__rsp__p0_only__flush_to_min_clean(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush_to_min_clean() failed.")
break;
case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
- if(H5AC__rsp__p0_only__flush(f, dxpl_id) < 0)
+ if(H5AC__rsp__p0_only__flush(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush() failed.")
break;
@@ -2148,12 +2147,12 @@ HDfprintf(stdout, "%d:H5AC_propagate...:%u: (u/uu/i/iu/r/ru) = %zu/%u/%zu/%u/%zu
case H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED:
switch(sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
- if(H5AC__rsp__dist_md_write__flush_to_min_clean(f, dxpl_id) < 0)
+ if(H5AC__rsp__dist_md_write__flush_to_min_clean(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush_to_min_clean() failed.")
break;
case H5AC_SYNC_POINT_OP__FLUSH_CACHE:
- if(H5AC__rsp__dist_md_write__flush(f, dxpl_id) < 0)
+ if(H5AC__rsp__dist_md_write__flush(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush() failed.")
break;
@@ -2284,7 +2283,7 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates,
*-------------------------------------------------------------------------
*/
herr_t
-H5AC__flush_entries(H5F_t *f, hid_t dxpl_id)
+H5AC__flush_entries(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2296,7 +2295,7 @@ H5AC__flush_entries(H5F_t *f, hid_t dxpl_id)
/* Check if we have >1 ranks */
if(H5C_get_aux_ptr(f->shared->cache))
- if(H5AC__run_sync_point(f, dxpl_id, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0)
+ if(H5AC__run_sync_point(f, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.")
done: