summaryrefslogtreecommitdiffstats
path: root/testpar/t_filter_read.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-11 16:24:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-11 16:24:11 (GMT)
commitd9e5ca72f39934531b534524d07cf784c3d0e613 (patch)
tree1913b13a317132523091035f1175b2291c8b9db7 /testpar/t_filter_read.c
parent053807fa81579e6bd9ac6a701ddcaac39e4d0b87 (diff)
downloadhdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.zip
hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.gz
hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.bz2
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with H5Dcreate2 Fix thread-safe error stack initialization for API versioned error stack printing routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'testpar/t_filter_read.c')
-rw-r--r--testpar/t_filter_read.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index e255c73..e2d39c3 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -86,35 +86,33 @@ filter_read_internal(const char *filename, hid_t dcpl,
VRFY(sid>=0, "H5Screate_simple");
/* Create buffers */
- points = (int *)HDmalloc(size[0]*size[1]*sizeof(int));
+ points = (int *)HDmalloc(size[0] * size[1] * sizeof(int));
VRFY(points!=NULL, "HDmalloc");
- check = (int *)HDmalloc(hs_size[0]*hs_size[1]*sizeof(int));
+ check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int));
VRFY(check!=NULL, "HDmalloc");
/* Initialize writing buffer with random data */
- for (i=0; i<size[0]; i++) {
- for (j=0; j<size[1]; j++) {
- points[i*size[1]+j] = (int)(i+j+7);
- }
- }
+ for(i = 0; i < size[0]; i++)
+ for(j = 0; j < size[1]; j++)
+ points[i * size[1]+j] = (int)(i+j+7);
VRFY(H5Pall_filters_avail(dcpl), "Incorrect filter availability");
/* Serial write phase */
- if (MAINPROCESS){
+ if(MAINPROCESS) {
file = H5Fcreate(h5_rmprefix(filename), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
VRFY(file>=0, "H5Fcreate");
/* Create the dataset */
- dataset = H5Dcreate(file, name, H5T_NATIVE_INT, sid, dcpl);
- VRFY(dataset>=0, "H5Dcreate");
+ dataset = H5Dcreate2(file, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ VRFY(dataset>=0, "H5Dcreate2");
hrc = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points);
VRFY(hrc>=0, "H5Dwrite");
- *dset_size=H5Dget_storage_size(dataset);
+ *dset_size = H5Dget_storage_size(dataset);
VRFY(*dset_size>0, "H5Dget_storage_size");
hrc = H5Dclose (dataset);
@@ -153,7 +151,7 @@ filter_read_internal(const char *filename, hid_t dcpl,
/* Check that the values read are the same as the values written */
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- if (points[i*size[1]+(size_t)hs_offset[1]+j] !=
+ if(points[i*size[1]+(size_t)hs_offset[1]+j] !=
check[i*hs_size[1]+j]) {
fprintf(stderr," Read different values than written.\n");
fprintf(stderr," At index %lu,%lu\n",
@@ -235,13 +233,13 @@ test_filter_read(void)
hsize_t shuffle_size; /* Size of dataset with shuffle filter */
#endif /* H5_HAVE_FILTER_SHUFFLE */
-#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */
#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Parallel reading of dataset written with filters %s\n", filename);
/*----------------------------------------------------------
@@ -312,7 +310,7 @@ test_filter_read(void)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_SZIP
- if ( h5_szip_can_encode() == 1) {
+ if(h5_szip_can_encode() == 1) {
dc = H5Pcreate(H5P_DATASET_CREATE);
VRFY(dc>=0, "H5Pcreate");
@@ -424,7 +422,7 @@ test_filter_read(void)
VRFY(hrc>=0, "H5Pset_shuffle");
/* Make sure encoding is enabled */
- if ( h5_szip_can_encode() == 1) {
+ if(h5_szip_can_encode() == 1) {
hrc = H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block);
VRFY(hrc>=0, "H5Pset_szip");
@@ -437,7 +435,7 @@ test_filter_read(void)
/* Testing shuffle+szip(with encoder)+checksum filters(checksum last) */
/* Make sure encoding is enabled */
- if ( h5_szip_can_encode() == 1) {
+ if(h5_szip_can_encode() == 1) {
dc = H5Pcreate(H5P_DATASET_CREATE);
VRFY(dc>=0, "H5Pcreate");