summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-17 13:47:52 (GMT)
committerGitHub <noreply@github.com>2020-11-17 13:47:52 (GMT)
commit5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f (patch)
treedbe8a76bcb211babe9900647eb1f515d8623ad9b /src/H5Dint.c
parentec48fb8dfdb4f2f59f22a5efb6b950aafcac449d (diff)
downloadhdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.zip
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.gz
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.bz2
Manual sync with develop (#95)
Brings all features from develop. Note that RELEASE.txt has not been updated (will be done in a future PR).
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index cfed336..7a2b93b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1277,18 +1277,24 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
/* Check if the dataset has a non-default DCPL & get important values, if so */
if (new_dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
- H5O_layout_t *layout; /* Dataset's layout information */
- H5O_pline_t * pline; /* Dataset's I/O pipeline information */
- H5O_fill_t * fill; /* Dataset's fill value info */
- H5O_efl_t * efl; /* Dataset's external file list info */
+ H5O_layout_t *layout; /* Dataset's layout information */
+ H5O_pline_t * pline; /* Dataset's I/O pipeline information */
+ H5O_fill_t * fill; /* Dataset's fill value info */
+ H5O_efl_t * efl; /* Dataset's external file list info */
+ htri_t ignore_filters = FALSE; /* Ignore optional filters or not */
- /* Check if the filters in the DCPL can be applied to this dataset */
- if (H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset")
+ if ((ignore_filters = H5Z_ignore_filters(new_dset->shared->dcpl_id, dt, space)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "H5Z_has_optional_filter() failed")
- /* Make the "set local" filter callbacks for this dataset */
- if (H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters")
+ if (FALSE == ignore_filters) {
+ /* Check if the filters in the DCPL can be applied to this dataset */
+ if (H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset")
+
+ /* Make the "set local" filter callbacks for this dataset */
+ if (H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters")
+ } /* ignore_filters */
/* Get new dataset's property list object */
if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id)))
@@ -1312,9 +1318,11 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve external file list")
efl_copied = TRUE;
- /* Check that chunked layout is used if filters are enabled */
- if (pline->nused > 0 && H5D_CHUNKED != layout->type)
- HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+ if (FALSE == ignore_filters) {
+ /* Check that chunked layout is used if filters are enabled */
+ if (pline->nused > 0 && H5D_CHUNKED != layout->type)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+ }
/* Check if the alloc_time is the default and error out */
if (fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)