mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r29076] Description:
Normalize against the phdf5_metadata_opt branch, in preparation for merging it to trunk. Tested on: MacOSX/64 10.11.3 (amazon) w/serial, parallel, and production builds h5committest forthcoming
This commit is contained in:
parent
745513e2b0
commit
4da0790886
@ -198,11 +198,11 @@ typedef H5C_t H5AC_t;
|
|||||||
H5_DLLVAR hid_t H5AC_dxpl_id;
|
H5_DLLVAR hid_t H5AC_dxpl_id;
|
||||||
|
|
||||||
/* DXPL to be used in operations that will not result in I/O calls */
|
/* DXPL to be used in operations that will not result in I/O calls */
|
||||||
extern hid_t H5AC_noio_dxpl_id;
|
H5_DLLVAR hid_t H5AC_noio_dxpl_id;
|
||||||
|
|
||||||
/* DXPL to be used for raw data I/O operations when one is not
|
/* DXPL to be used for raw data I/O operations when one is not
|
||||||
provided by the user (fill values in H5Dcreate) */
|
provided by the user (fill values in H5Dcreate) */
|
||||||
extern hid_t H5AC_rawdata_dxpl_id;
|
H5_DLLVAR hid_t H5AC_rawdata_dxpl_id;
|
||||||
|
|
||||||
/* Default cache configuration. */
|
/* Default cache configuration. */
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't clear entry.")
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
/* Else, if this process needs to flush this entry. */
|
/* Else, if this process needs to flush this entry. */
|
||||||
@ -479,7 +479,7 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
cache_ptr->last_entry_removed_ptr = NULL;
|
cache_ptr->last_entry_removed_ptr = NULL;
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry.")
|
||||||
|
|
||||||
if ( ( cache_ptr->entries_removed_counter > 1 ) ||
|
if ( ( cache_ptr->entries_removed_counter > 1 ) ||
|
||||||
( cache_ptr->last_entry_removed_ptr == entry_ptr ) )
|
( cache_ptr->last_entry_removed_ptr == entry_ptr ) )
|
||||||
@ -632,12 +632,12 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
entries_cleared++;
|
entries_cleared++;
|
||||||
|
|
||||||
#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
|
#if ( H5C_APPLY_CANDIDATE_LIST__DEBUG > 1 )
|
||||||
HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank,
|
HDfprintf(stdout, "%s:%d: clearing 0x%llx.\n", FUNC, mpi_rank,
|
||||||
(long long)clear_ptr->addr);
|
(long long)clear_ptr->addr);
|
||||||
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
|
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't clear entry.")
|
||||||
} /* end else-if */
|
} /* end else-if */
|
||||||
|
|
||||||
/* Else, if this process needs to independently flush this entry. */
|
/* Else, if this process needs to independently flush this entry. */
|
||||||
@ -653,7 +653,7 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
|
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't clear entry.")
|
||||||
} /* end else-if */
|
} /* end else-if */
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
@ -694,7 +694,7 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, delayed_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, delayed_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry collectively.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry collectively.")
|
||||||
|
|
||||||
entries_flushed_collectively++;
|
entries_flushed_collectively++;
|
||||||
entries_flushed_or_cleared_last++;
|
entries_flushed_or_cleared_last++;
|
||||||
@ -710,9 +710,9 @@ H5C_apply_candidate_list(H5F_t * f,
|
|||||||
HDassert((entries_flushed_collectively == entries_to_flush_collectively));
|
HDassert((entries_flushed_collectively == entries_to_flush_collectively));
|
||||||
|
|
||||||
if((entries_flushed != entries_to_flush) ||
|
if((entries_flushed != entries_to_flush) ||
|
||||||
(entries_cleared != entries_to_clear) ||
|
(entries_cleared != entries_to_clear) ||
|
||||||
(entries_flushed_or_cleared_last != entries_to_flush_or_clear_last) ||
|
(entries_flushed_or_cleared_last != entries_to_flush_or_clear_last) ||
|
||||||
(entries_flushed_collectively != entries_to_flush_collectively))
|
(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:
|
done:
|
||||||
@ -1143,7 +1143,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
|
|||||||
entries_cleared++;
|
entries_cleared++;
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't clear entry.")
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
entry_ptr = entry_ptr->prev;
|
entry_ptr = entry_ptr->prev;
|
||||||
@ -1171,7 +1171,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
|
|||||||
entries_cleared++;
|
entries_cleared++;
|
||||||
|
|
||||||
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0 )
|
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0 )
|
||||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't clear entry.")
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
entry_ptr = entry_ptr->next;
|
entry_ptr = entry_ptr->next;
|
||||||
|
@ -179,8 +179,6 @@ H5Dopen1(hid_t loc_id, const char *name)
|
|||||||
{
|
{
|
||||||
H5D_t *dset = NULL;
|
H5D_t *dset = NULL;
|
||||||
H5G_loc_t loc; /* Object location of group */
|
H5G_loc_t loc; /* Object location of group */
|
||||||
hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
|
|
||||||
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
|
|
||||||
hid_t ret_value;
|
hid_t ret_value;
|
||||||
|
|
||||||
FUNC_ENTER_API(FAIL)
|
FUNC_ENTER_API(FAIL)
|
||||||
@ -193,7 +191,7 @@ H5Dopen1(hid_t loc_id, const char *name)
|
|||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
|
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
|
||||||
|
|
||||||
/* Open the dataset */
|
/* Open the dataset */
|
||||||
if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id)))
|
if(NULL == (dset = H5D__open_name(&loc, name, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
|
||||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
|
||||||
|
|
||||||
/* Register an atom for the dataset */
|
/* Register an atom for the dataset */
|
||||||
|
@ -717,7 +717,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
|
|||||||
udata.idx_type = idx_type;
|
udata.idx_type = idx_type;
|
||||||
udata.order = order;
|
udata.order = order;
|
||||||
udata.n = n;
|
udata.n = n;
|
||||||
udata.dxpl_id = H5AC_dxpl_id;
|
udata.dxpl_id = dxpl_id;
|
||||||
|
|
||||||
/* Traverse the group hierarchy to remove the link */
|
/* Traverse the group hierarchy to remove the link */
|
||||||
if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT,
|
if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT,
|
||||||
|
@ -222,6 +222,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
char *actual_file_name = NULL; /* Parent file's actual name */
|
char *actual_file_name = NULL; /* Parent file's actual name */
|
||||||
H5P_genplist_t *fa_plist; /* File access property list pointer */
|
H5P_genplist_t *fa_plist; /* File access property list pointer */
|
||||||
H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
|
H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
|
||||||
|
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
|
||||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||||
|
|
||||||
FUNC_ENTER_NOAPI(FAIL)
|
FUNC_ENTER_NOAPI(FAIL)
|
||||||
@ -245,6 +246,10 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
if(NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
|
if(NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
|
||||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||||
|
|
||||||
|
/* Verify access property list and get correct dxpl */
|
||||||
|
if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, cur_group, FALSE) < 0)
|
||||||
|
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
|
||||||
|
|
||||||
/* Get the fapl_id set for lapl_id if any */
|
/* Get the fapl_id set for lapl_id if any */
|
||||||
if(H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0)
|
if(H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0)
|
||||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links")
|
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links")
|
||||||
@ -282,7 +287,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
parent_file_name = H5F_OPEN_NAME(loc.oloc->file);
|
parent_file_name = H5F_OPEN_NAME(loc.oloc->file);
|
||||||
|
|
||||||
/* Query length of parent group name */
|
/* Query length of parent group name */
|
||||||
if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, H5AC_dxpl_id)) < 0)
|
if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, dxpl_id)) < 0)
|
||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve length of group name")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve length of group name")
|
||||||
|
|
||||||
/* Account for null terminator */
|
/* Account for null terminator */
|
||||||
@ -297,7 +302,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
parent_group_name = local_group_name;
|
parent_group_name = local_group_name;
|
||||||
|
|
||||||
/* Get parent group name */
|
/* Get parent group name */
|
||||||
if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, H5AC_dxpl_id) < 0)
|
if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, dxpl_id) < 0)
|
||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve group name")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve group name")
|
||||||
|
|
||||||
/* Make callback */
|
/* Make callback */
|
||||||
@ -328,7 +333,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
/* target file_name is an absolute pathname: see RM for detailed description */
|
/* target file_name is an absolute pathname: see RM for detailed description */
|
||||||
if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
|
if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
|
||||||
/* Try opening file */
|
/* Try opening file */
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) {
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
H5E_clear_stack(NULL);
|
H5E_clear_stack(NULL);
|
||||||
@ -347,7 +352,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
} /* end if */
|
} /* end if */
|
||||||
else if(H5_CHECK_ABS_DRIVE(file_name)) {
|
else if(H5_CHECK_ABS_DRIVE(file_name)) {
|
||||||
/* Try opening file */
|
/* Try opening file */
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) {
|
||||||
|
|
||||||
H5E_clear_stack(NULL);
|
H5E_clear_stack(NULL);
|
||||||
|
|
||||||
@ -377,7 +382,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id);
|
ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id);
|
||||||
full_name = (char *)H5MM_xfree(full_name);
|
full_name = (char *)H5MM_xfree(full_name);
|
||||||
if(ext_file != NULL)
|
if(ext_file != NULL)
|
||||||
break;
|
break;
|
||||||
@ -395,7 +400,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
if(my_prefix) {
|
if(my_prefix) {
|
||||||
if(H5L_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0)
|
if(H5L_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0)
|
||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
|
||||||
H5E_clear_stack(NULL);
|
H5E_clear_stack(NULL);
|
||||||
full_name = (char *)H5MM_xfree(full_name);
|
full_name = (char *)H5MM_xfree(full_name);
|
||||||
} /* end if */
|
} /* end if */
|
||||||
@ -408,7 +413,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
if(NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) {
|
if(NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) {
|
||||||
if(H5L_build_name(extpath, temp_file_name, &full_name/*out*/) < 0)
|
if(H5L_build_name(extpath, temp_file_name, &full_name/*out*/) < 0)
|
||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
|
||||||
H5E_clear_stack(NULL);
|
H5E_clear_stack(NULL);
|
||||||
full_name = (char *)H5MM_xfree(full_name);
|
full_name = (char *)H5MM_xfree(full_name);
|
||||||
} /* end if */
|
} /* end if */
|
||||||
@ -416,7 +421,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
|
|
||||||
/* try the relative file_name stored in temp_file_name */
|
/* try the relative file_name stored in temp_file_name */
|
||||||
if(ext_file == NULL) {
|
if(ext_file == NULL) {
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
|
||||||
H5E_clear_stack(NULL);
|
H5E_clear_stack(NULL);
|
||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
@ -443,7 +448,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
|
||||||
|
|
||||||
/* Try opening with the resolved name */
|
/* Try opening with the resolved name */
|
||||||
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
|
if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
|
||||||
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
|
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
|
||||||
full_name = (char *)H5MM_xfree(full_name);
|
full_name = (char *)H5MM_xfree(full_name);
|
||||||
} /* end if */
|
} /* end if */
|
||||||
@ -454,7 +459,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
|
|||||||
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
|
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
|
||||||
|
|
||||||
/* Open the object referenced in the external file */
|
/* Open the object referenced in the external file */
|
||||||
if((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, FALSE)) < 0)
|
if((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, dxpl_id, FALSE)) < 0)
|
||||||
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
|
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
|
||||||
|
|
||||||
/* Set return value */
|
/* Set return value */
|
||||||
|
12
src/H5O.c
12
src/H5O.c
@ -231,6 +231,7 @@ hid_t
|
|||||||
H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
|
H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
|
||||||
{
|
{
|
||||||
H5G_loc_t loc;
|
H5G_loc_t loc;
|
||||||
|
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
|
||||||
hid_t ret_value = FAIL;
|
hid_t ret_value = FAIL;
|
||||||
|
|
||||||
FUNC_ENTER_API(FAIL)
|
FUNC_ENTER_API(FAIL)
|
||||||
@ -242,8 +243,12 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
|
|||||||
if(!name || !*name)
|
if(!name || !*name)
|
||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
|
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
|
||||||
|
|
||||||
|
/* Verify access property list and get correct dxpl */
|
||||||
|
if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
|
||||||
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
|
||||||
|
|
||||||
/* Open the object */
|
/* Open the object */
|
||||||
if((ret_value = H5O_open_name(&loc, name, lapl_id, TRUE)) < 0)
|
if((ret_value = H5O_open_name(&loc, name, lapl_id, dxpl_id, TRUE)) < 0)
|
||||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -724,7 +729,7 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
|
|||||||
loc_found = TRUE;
|
loc_found = TRUE;
|
||||||
|
|
||||||
/* Retrieve the object's information */
|
/* Retrieve the object's information */
|
||||||
if(H5O_get_info(obj_loc.oloc, H5AC_dxpl_id, TRUE, oinfo) < 0)
|
if(H5O_get_info(obj_loc.oloc, dxpl_id, TRUE, oinfo) < 0)
|
||||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -1345,13 +1350,12 @@ done:
|
|||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
hid_t
|
hid_t
|
||||||
H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
|
H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
|
||||||
{
|
{
|
||||||
H5G_loc_t obj_loc; /* Location used to open group */
|
H5G_loc_t obj_loc; /* Location used to open group */
|
||||||
H5G_name_t obj_path; /* Opened object group hier. path */
|
H5G_name_t obj_path; /* Opened object group hier. path */
|
||||||
H5O_loc_t obj_oloc; /* Opened object object location */
|
H5O_loc_t obj_oloc; /* Opened object object location */
|
||||||
hbool_t loc_found = FALSE; /* Entry at 'name' found */
|
hbool_t loc_found = FALSE; /* Entry at 'name' found */
|
||||||
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
|
|
||||||
hid_t ret_value = FAIL;
|
hid_t ret_value = FAIL;
|
||||||
|
|
||||||
FUNC_ENTER_NOAPI(FAIL)
|
FUNC_ENTER_NOAPI(FAIL)
|
||||||
|
@ -216,6 +216,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
|
|||||||
htri_t dst_exists; /* Does destination name exist already? */
|
htri_t dst_exists; /* Does destination name exist already? */
|
||||||
hbool_t loc_found = FALSE; /* Location at 'name' found */
|
hbool_t loc_found = FALSE; /* Location at 'name' found */
|
||||||
hbool_t obj_open = FALSE; /* Entry at 'name' found */
|
hbool_t obj_open = FALSE; /* Entry at 'name' found */
|
||||||
|
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
|
||||||
herr_t ret_value = SUCCEED; /* Return value */
|
herr_t ret_value = SUCCEED; /* Return value */
|
||||||
|
|
||||||
FUNC_ENTER_API(FAIL)
|
FUNC_ENTER_API(FAIL)
|
||||||
@ -233,7 +234,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
|
|||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
|
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
|
||||||
|
|
||||||
/* check if destination name already exists */
|
/* check if destination name already exists */
|
||||||
if((dst_exists = H5L_exists_tolerant(&dst_loc, dst_name, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
|
if((dst_exists = H5L_exists_tolerant(&dst_loc, dst_name, H5P_DEFAULT, dxpl_id)) < 0)
|
||||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists")
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists")
|
||||||
if(TRUE == dst_exists)
|
if(TRUE == dst_exists)
|
||||||
HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists")
|
HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists")
|
||||||
@ -244,7 +245,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
|
|||||||
H5G_loc_reset(&src_loc);
|
H5G_loc_reset(&src_loc);
|
||||||
|
|
||||||
/* Find the source object to copy */
|
/* Find the source object to copy */
|
||||||
if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_dxpl_id) < 0)
|
if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, dxpl_id) < 0)
|
||||||
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
|
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
|
||||||
loc_found = TRUE;
|
loc_found = TRUE;
|
||||||
|
|
||||||
@ -270,7 +271,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
|
|||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
|
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
|
||||||
|
|
||||||
/* Do the actual copying of the object */
|
/* Do the actual copying of the object */
|
||||||
if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, H5AC_dxpl_id) < 0)
|
if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, dxpl_id) < 0)
|
||||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -763,7 +763,7 @@ H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, hid_t dxpl_id, hbool_t want_ih
|
|||||||
H5O_info_t *oinfo);
|
H5O_info_t *oinfo);
|
||||||
H5_DLL herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id);
|
H5_DLL herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id);
|
||||||
H5_DLL herr_t H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, struct H5P_genplist_t *oc_plist);
|
H5_DLL herr_t H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, struct H5P_genplist_t *oc_plist);
|
||||||
H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref);
|
H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
|
||||||
H5_DLL herr_t H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks);
|
H5_DLL herr_t H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks);
|
||||||
H5_DLL void *H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
|
H5_DLL void *H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
|
||||||
H5_DLL haddr_t H5O_get_oh_addr(const H5O_t *oh);
|
H5_DLL haddr_t H5O_get_oh_addr(const H5O_t *oh);
|
||||||
|
@ -485,11 +485,12 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass)
|
|||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||||
|
|
||||||
/* Register the ring property */
|
/* Register the ring property (private) */
|
||||||
if(H5P_register_real(pclass, H5AC_RING_NAME, H5AC_XFER_RING_SIZE, &H5D_ring_g,
|
if(H5P_register_real(pclass, H5AC_RING_NAME, H5AC_XFER_RING_SIZE, &H5D_ring_g,
|
||||||
NULL, NULL, NULL, H5AC_XFER_RING_ENC, H5AC_XFER_RING_DEC,
|
NULL, NULL, NULL, H5AC_XFER_RING_ENC, H5AC_XFER_RING_DEC,
|
||||||
NULL, NULL, NULL, NULL) < 0)
|
NULL, NULL, NULL, NULL) < 0)
|
||||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||||
|
|
||||||
#ifdef H5_DEBUG_BUILD
|
#ifdef H5_DEBUG_BUILD
|
||||||
/* Register the dxpl IO type property */
|
/* Register the dxpl IO type property */
|
||||||
if(H5P_register_real(pclass, H5FD_DXPL_TYPE_NAME, H5FD_DXPL_TYPE_SIZE, &H5D_dxpl_type_g,
|
if(H5P_register_real(pclass, H5FD_DXPL_TYPE_NAME, H5FD_DXPL_TYPE_SIZE, &H5D_dxpl_type_g,
|
||||||
|
30
src/H5Pint.c
30
src/H5Pint.c
@ -5450,8 +5450,16 @@ H5P_get_class(const H5P_genplist_t *plist)
|
|||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
herr_t
|
herr_t
|
||||||
H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
|
H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t *dxpl_id,
|
||||||
hid_t *dxpl_id, hid_t loc_id, hbool_t is_collective)
|
hid_t
|
||||||
|
#ifndef H5_HAVE_PARALLEL
|
||||||
|
H5_ATTR_UNUSED
|
||||||
|
#endif /* H5_HAVE_PARALLEL */
|
||||||
|
loc_id, hbool_t
|
||||||
|
#ifndef H5_HAVE_PARALLEL
|
||||||
|
H5_ATTR_UNUSED
|
||||||
|
#endif /* H5_HAVE_PARALLEL */
|
||||||
|
is_collective)
|
||||||
{
|
{
|
||||||
herr_t ret_value = SUCCEED; /* Return value */
|
herr_t ret_value = SUCCEED; /* Return value */
|
||||||
|
|
||||||
@ -5462,15 +5470,6 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
|
|||||||
HDassert(libclass);
|
HDassert(libclass);
|
||||||
HDassert(dxpl_id);
|
HDassert(dxpl_id);
|
||||||
|
|
||||||
/* Set access plist to the default property list of the appropriate class if it's the generic default */
|
|
||||||
if(H5P_DEFAULT == *acspl_id)
|
|
||||||
*acspl_id = *libclass->def_plist_id;
|
|
||||||
else {
|
|
||||||
/* Sanity check the access property list class */
|
|
||||||
if(TRUE != H5P_isa_class(*acspl_id, *libclass->class_id))
|
|
||||||
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not the required access property list")
|
|
||||||
} /* end else */
|
|
||||||
|
|
||||||
#ifdef H5_HAVE_PARALLEL
|
#ifdef H5_HAVE_PARALLEL
|
||||||
/* If parallel is enabled and the file driver used in the MPI-IO
|
/* If parallel is enabled and the file driver used in the MPI-IO
|
||||||
VFD, issue an MPI barrier for easier debugging if the API function
|
VFD, issue an MPI barrier for easier debugging if the API function
|
||||||
@ -5490,6 +5489,15 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
|
|||||||
}
|
}
|
||||||
#endif /* H5_HAVE_PARALLEL */
|
#endif /* H5_HAVE_PARALLEL */
|
||||||
|
|
||||||
|
/* Set access plist to the default property list of the appropriate class if it's the generic default */
|
||||||
|
if(H5P_DEFAULT == *acspl_id)
|
||||||
|
*acspl_id = *libclass->def_plist_id;
|
||||||
|
else {
|
||||||
|
/* Sanity check the access property list class */
|
||||||
|
if(TRUE != H5P_isa_class(*acspl_id, *libclass->class_id))
|
||||||
|
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not the required access property list")
|
||||||
|
} /* end else */
|
||||||
|
|
||||||
done:
|
done:
|
||||||
FUNC_LEAVE_NOAPI(ret_value)
|
FUNC_LEAVE_NOAPI(ret_value)
|
||||||
} /* end H5P_verify_apl_and_dxpl() */
|
} /* end H5P_verify_apl_and_dxpl() */
|
||||||
|
13
src/H5R.c
13
src/H5R.c
@ -541,12 +541,6 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
|
|||||||
{
|
{
|
||||||
H5D_t *dset; /* Pointer to dataset to open */
|
H5D_t *dset; /* Pointer to dataset to open */
|
||||||
|
|
||||||
/* Get correct property list */
|
|
||||||
if(H5P_DEFAULT == oapl_id)
|
|
||||||
oapl_id = H5P_DATASET_ACCESS_DEFAULT;
|
|
||||||
else if(TRUE != H5P_isa_class(oapl_id, H5P_DATASET_ACCESS))
|
|
||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
|
|
||||||
|
|
||||||
/* Open the dataset */
|
/* Open the dataset */
|
||||||
if(NULL == (dset = H5D_open(&loc, oapl_id, dxpl_id)))
|
if(NULL == (dset = H5D_open(&loc, oapl_id, dxpl_id)))
|
||||||
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
|
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
|
||||||
@ -602,6 +596,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
|
|||||||
{
|
{
|
||||||
H5G_loc_t loc; /* Group location */
|
H5G_loc_t loc; /* Group location */
|
||||||
H5F_t *file = NULL; /* File object */
|
H5F_t *file = NULL; /* File object */
|
||||||
|
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
|
||||||
hid_t ret_value;
|
hid_t ret_value;
|
||||||
|
|
||||||
FUNC_ENTER_API(FAIL)
|
FUNC_ENTER_API(FAIL)
|
||||||
@ -617,11 +612,15 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
|
|||||||
if(_ref == NULL)
|
if(_ref == NULL)
|
||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
|
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
|
||||||
|
|
||||||
|
/* Verify access property list and get correct dxpl */
|
||||||
|
if(H5P_verify_apl_and_dxpl(&oapl_id, H5P_CLS_DACC, &dxpl_id, obj_id, FALSE) < 0)
|
||||||
|
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
|
||||||
|
|
||||||
/* Get the file pointer from the entry */
|
/* Get the file pointer from the entry */
|
||||||
file = loc.oloc->file;
|
file = loc.oloc->file;
|
||||||
|
|
||||||
/* Create reference */
|
/* Create reference */
|
||||||
if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
|
if((ret_value = H5R_dereference(file, oapl_id, dxpl_id, ref_type, _ref, TRUE)) < 0)
|
||||||
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object")
|
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object")
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user