diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-02-25 19:37:45 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-02-25 19:37:45 (GMT) |
commit | 40357176e3d476ff7d7dea5721485afb76708447 (patch) | |
tree | 39f04bb71f59fe0bc749ad24863ea722dc13c729 | |
parent | 2f8fc11a3f79deb4a65ba74fb26829bc47266a4f (diff) | |
download | hdf5-40357176e3d476ff7d7dea5721485afb76708447.zip hdf5-40357176e3d476ff7d7dea5721485afb76708447.tar.gz hdf5-40357176e3d476ff7d7dea5721485afb76708447.tar.bz2 |
[svn-r8223] Purpose:
bug fix
Description:
generating a dataset in linux 2.4 (verbena) with the pgcc compiler gave an error with the following
sequence
1) make a space id1 and a dcpl
2) make a space id2, create and write a dataset with space id2, close
3) attempt to create a dataset with space id1 fails and calling a set_filter function with the dcpl in 1) fails
Solution:
just changed the order 2) to 1)
Platforms tested:
linux 2.4 (verbena) with pgcc compiler
Misc. update:
-rw-r--r-- | tools/h5repack/testh5repack_filters.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/tools/h5repack/testh5repack_filters.c b/tools/h5repack/testh5repack_filters.c index 5a26f5d..5cddb94 100644 --- a/tools/h5repack/testh5repack_filters.c +++ b/tools/h5repack/testh5repack_filters.c @@ -75,17 +75,8 @@ int make_filters(hid_t loc_id) buf[i][j]=n++; } } - - /* create a space */ - if((sid = H5Screate_simple(RANK, dims, NULL))<0) - return -1; - /* create a dataset creation property list; the same DCPL is used for all dsets */ - if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) - goto out; - /* set up chunk */ - if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0) - goto out; + /*------------------------------------------------------------------------- * make several dataset with no filters *------------------------------------------------------------------------- @@ -96,20 +87,40 @@ int make_filters(hid_t loc_id) if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf)<0) return -1; } + + +/*------------------------------------------------------------------------- + * make several dataset with filters + *------------------------------------------------------------------------- + */ + + /* create a space */ + if((sid = H5Screate_simple(RANK, dims, NULL))<0) + return -1; + /* create a dataset creation property list; the same DCPL is used for all dsets */ + if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) + goto out; + /* set up chunk */ + if(H5Pset_chunk(dcpl, RANK, chunk_dims)<0) + goto out; + /*------------------------------------------------------------------------- * SZIP *------------------------------------------------------------------------- */ +#ifdef H5_HAVE_FILTER_SZIP /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0) goto out; if (make_dset(loc_id,"dset_szip",sid,dcpl,buf)<0) goto out; +#endif /*------------------------------------------------------------------------- * GZIP *------------------------------------------------------------------------- */ +#ifdef H5_HAVE_FILTER_DEFLATE /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0) goto out; @@ -118,6 +129,8 @@ int make_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_gzip",sid,dcpl,buf)<0) goto out; +#endif + /*------------------------------------------------------------------------- * shuffle @@ -158,9 +171,11 @@ int make_filters(hid_t loc_id) /* set the checksum filter */ if (H5Pset_fletcher32(dcpl)<0) goto out; +#ifdef H5_HAVE_FILTER_SZIP /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0) goto out; +#endif if (make_dset(loc_id,"dset_all",sid,dcpl,buf)<0) goto out; |