diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-10-09 17:59:28 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-10-09 17:59:28 (GMT) |
commit | daddf169b078f2c3982af513416e7f0f9208a211 (patch) | |
tree | 0fcf0403d46599b3867cb37fabae528215b97162 /tools/src/h5repack/h5repack_filters.c | |
parent | a07d6b52fb0a231c2c6e60b1ae4d7550894c4b58 (diff) | |
download | hdf5-daddf169b078f2c3982af513416e7f0f9208a211.zip hdf5-daddf169b078f2c3982af513416e7f0f9208a211.tar.gz hdf5-daddf169b078f2c3982af513416e7f0f9208a211.tar.bz2 |
HDFFV-10297 - Fix test errors - five remaining
Diffstat (limited to 'tools/src/h5repack/h5repack_filters.c')
-rw-r--r-- | tools/src/h5repack/h5repack_filters.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index ec5d672..e968b3c 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -469,9 +469,33 @@ int apply_filters(const char* name, /* object name from traverse list */ if (H5Zfilter_avail(filtobj.filter[i].filtn) <= 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "%d filter unavailable", filtobj.filter[i].filtn); - }/*for*/ + } /* for */ + } /* nfilters */ + + /*------------------------------------------------------------------------- + * layout + *------------------------------------------------------------------------- + */ + + if (obj.layout >= 0) { + /* a layout was defined */ + if (H5Pset_layout(dcpl_id, obj.layout) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_layout failed"); + + if (H5D_CHUNKED == obj.layout) { + if (H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_chunk failed"); + } + else if (H5D_COMPACT == obj.layout) { + if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pset_alloc_time failed"); + } + /* remove filters for the H5D_CONTIGUOUS case */ + else if (H5D_CONTIGUOUS == obj.layout) { + if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); + } } - /*nfilters*/ done: return ret_value; |