summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
Diffstat (limited to 'perform')
-rw-r--r--perform/benchpar.c4
-rw-r--r--perform/chunk.c28
-rw-r--r--perform/iopipe.c13
-rw-r--r--perform/overhead.c54
-rw-r--r--perform/perf.c16
-rw-r--r--perform/perf_meta.c19
-rw-r--r--perform/pio_engine.c8
7 files changed, 69 insertions, 73 deletions
diff --git a/perform/benchpar.c b/perform/benchpar.c
index d0718fc..3ebbe6b 100644
--- a/perform/benchpar.c
+++ b/perform/benchpar.c
@@ -386,8 +386,8 @@ int main(int argc, char *argv[])
assert(dcpl>0);
/* Create dataset */
- dsid=H5Dcreate(fid,DEFAULT_DATASET_NAME,DEFAULT_HDF5_DATATYPE,file_sid,dcpl);
- assert(dsid>0);
+ dsid = H5Dcreate2(fid, DEFAULT_DATASET_NAME, DEFAULT_HDF5_DATATYPE, file_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ assert(dsid > 0);
/* Close dataset creation property list */
ret=H5Pclose(dcpl);
diff --git a/perform/chunk.c b/perform/chunk.c
index a3aabe0..2777da0 100644
--- a/perform/chunk.c
+++ b/perform/chunk.c
@@ -149,29 +149,29 @@ create_dataset (void)
/* The data space */
size[0] = size[1] = DS_SIZE * CH_SIZE;
- space = H5Screate_simple (2, size, size);
+ space = H5Screate_simple(2, size, size);
/* The storage layout and compression */
- dcpl = H5Pcreate (H5P_DATASET_CREATE);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
size[0] = size[1] = CH_SIZE;
- H5Pset_chunk (dcpl, 2, size);
- H5Zregister (H5Z_COUNTER);
- H5Pset_filter (dcpl, FILTER_COUNTER, 0, 0, NULL);
+ H5Pset_chunk(dcpl, 2, size);
+ H5Zregister(H5Z_COUNTER);
+ H5Pset_filter(dcpl, FILTER_COUNTER, 0, 0, NULL);
/* The dataset */
- dset = H5Dcreate (file, "dset", H5T_NATIVE_SCHAR, space, dcpl);
- assert (dset>=0);
+ dset = H5Dcreate2(file, "dset", H5T_NATIVE_SCHAR, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ assert(dset>=0);
/* The data */
- buf = calloc (1, SQUARE (DS_SIZE*CH_SIZE));
- H5Dwrite (dset, H5T_NATIVE_SCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
- free (buf);
+ buf = calloc(1, SQUARE (DS_SIZE*CH_SIZE));
+ H5Dwrite(dset, H5T_NATIVE_SCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ free(buf);
/* Close */
- H5Dclose (dset);
- H5Sclose (space);
- H5Pclose (dcpl);
- H5Fclose (file);
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Fclose(file);
}
diff --git a/perform/iopipe.c b/perform/iopipe.c
index 8728fab..d736f17 100644
--- a/perform/iopipe.c
+++ b/perform/iopipe.c
@@ -224,12 +224,13 @@ main (void)
/* Create the dataset */
file_space = H5Screate_simple (2, size, size);
- assert (file_space>=0);
- dset = H5Dcreate (file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT);
- assert (dset>=0);
- the_data = malloc ((size_t)(size[0]*size[1]));
- /*initial fill for lazy malloc*/
- memset (the_data, 0xAA, (size_t)(size[0]*size[1]));
+ assert(file_space >= 0);
+ dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ assert(dset >= 0);
+ the_data = malloc((size_t)(size[0] * size[1]));
+
+ /* initial fill for lazy malloc */
+ memset(the_data, 0xAA, (size_t)(size[0] * size[1]));
/* Fill raw */
synchronize ();
diff --git a/perform/overhead.c b/perform/overhead.c
index 45dbe9a..5076103 100644
--- a/perform/overhead.c
+++ b/perform/overhead.c
@@ -206,32 +206,28 @@ test(fill_t fill_style, const double splits[],
int j;
h5_stat_t sb;
- if (!had) had = calloc((size_t)cur_size[0], sizeof(int));
- if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) goto error;
- if (!use_rdcc) {
- if (H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL)<0) goto error;
- if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0)<0) goto error;
+ if(!had) had = calloc((size_t)cur_size[0], sizeof(int));
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error;
+ if(!use_rdcc) {
+ if(H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL) < 0) goto error;
+ if(H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0) < 0) goto error;
}
- if ((file=H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
- goto error;
- }
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_chunk(dcpl, 1, ch_size)<0) goto error;
- if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error;
- if (H5Pset_btree_ratios(xfer, splits[0], splits[1], splits[2])<0) {
- goto error;
- }
- if ((fspace=H5Screate_simple(1, cur_size, max_size))<0) goto error;
- if ((mspace=H5Screate_simple(1, ch_size, ch_size))<0) goto error;
- if ((dset=H5Dcreate(file, "chunked", H5T_NATIVE_INT,
- fspace, dcpl))<0) goto error;
+ if((file = H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk(dcpl, 1, ch_size) < 0) goto error;
+ if((xfer = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error;
+ if(H5Pset_btree_ratios(xfer, splits[0], splits[1], splits[2]) < 0) goto error;
+ if((fspace = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if((mspace = H5Screate_simple(1, ch_size, ch_size)) < 0) goto error;
+ if((dset = H5Dcreate2(file, "chunked", H5T_NATIVE_INT,
+ fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
#if !defined( __MWERKS__)
/*
workaround for a bug in the Metrowerks version 6.0 open function
*/
- if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666))<0) goto error;
+ if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error;
#endif
for (i=1; i<=cur_size[0]; i++) {
@@ -262,8 +258,8 @@ test(fill_t fill_style, const double splits[],
/* Write the chunk */
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_start, NULL,
- hs_count, NULL)<0) goto error;
- if (H5Dwrite(dset, H5T_NATIVE_INT, mspace, fspace, xfer, &i)<0) {
+ hs_count, NULL) < 0) goto error;
+ if (H5Dwrite(dset, H5T_NATIVE_INT, mspace, fspace, xfer, &i) < 0) {
goto error;
}
@@ -272,8 +268,8 @@ test(fill_t fill_style, const double splits[],
/* Determine overhead */
if (verbose) {
- if (H5Fflush(file, H5F_SCOPE_LOCAL)<0) goto error;
- if (HDfstat(fd, &sb)<0) goto error;
+ if (H5Fflush(file, H5F_SCOPE_LOCAL) < 0) goto error;
+ if (HDfstat(fd, &sb) < 0) goto error;
/*
* The extra cast in the following statement is a bug workaround
* for the Win32 version 5.0 compiler.
@@ -318,7 +314,7 @@ test(fill_t fill_style, const double splits[],
#if !defined( __MWERKS__)
- if (HDfstat(fd, &sb)<0) goto error;
+ if (HDfstat(fd, &sb) < 0) goto error;
printf("%-7s %8.3f\n", sname,
(double)(hssize_t)(sb.st_size-cur_size[0]*sizeof(int))/
(hssize_t)cur_size[0]);
@@ -374,14 +370,12 @@ main(int argc, char *argv[])
/* Default split ratios */
H5Eset_auto2(H5E_DEFAULT, display_error_cb, NULL);
- if ((xfer=H5Pcreate(H5P_DATASET_XFER))<0) goto error;
- if (H5Pget_btree_ratios(xfer, splits+0, splits+1, splits+2)<0) {
- goto error;
- }
- if (H5Pclose(xfer)<0) goto error;
+ if((xfer = H5Pcreate(H5P_DATASET_XFER)) < 0) goto error;
+ if(H5Pget_btree_ratios(xfer, splits+0, splits+1, splits+2) < 0) goto error;
+ if(H5Pclose(xfer) < 0) goto error;
/* Parse command-line options */
- for (i=1, j=0; i<argc; i++) {
+ for(i = 1, j = 0; i < argc; i++) {
if (!strcmp(argv[i], "forward")) {
fill_style = FILL_FORWARD;
} else if (!strcmp(argv[i], "reverse")) {
diff --git a/perform/perf.c b/perform/perf.c
index cd7473d..33f7433 100644
--- a/perform/perf.c
+++ b/perform/perf.c
@@ -191,22 +191,22 @@ int main(int argc, char **argv)
}
/* create the parallel file */
- fid=H5Fcreate(opt_file,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(opt_file, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded", H5FATAL);
/* define a contiquous dataset of opt_iter*nprocs*opt_block chars */
- dims[0] = opt_iter*nprocs*opt_block;
- sid = H5Screate_simple (RANK, dims, NULL);
+ dims[0] = opt_iter * nprocs * opt_block;
+ sid = H5Screate_simple(RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded", H5FATAL);
- dataset = H5Dcreate(fid, "Dataset1", H5T_NATIVE_CHAR, sid,
- H5P_DEFAULT);
- VRFY((dataset >= 0), "H5Dcreate succeeded", H5FATAL);
+ dataset = H5Dcreate2(fid, "Dataset1", H5T_NATIVE_CHAR, sid,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset >= 0), "H5Dcreate2 succeeded", H5FATAL);
/* create the memory dataspace and the file dataspace */
dims[0] = opt_block;
- mem_dataspace = H5Screate_simple (RANK, dims, NULL);
+ mem_dataspace = H5Screate_simple(RANK, dims, NULL);
VRFY((mem_dataspace >= 0), "", H5FATAL);
- file_dataspace = H5Dget_space (dataset);
+ file_dataspace = H5Dget_space(dataset);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded", H5FATAL);
/* now each process writes a block of opt_block chars in round robbin
diff --git a/perform/perf_meta.c b/perform/perf_meta.c
index dd73140..572dfff 100644
--- a/perform/perf_meta.c
+++ b/perform/perf_meta.c
@@ -324,14 +324,15 @@ create_dsets(hid_t file)
/*
* Create a dataset using the default dataset creation properties.
*/
- for(i=0; i<NUM_DSETS; i++) {
+ for(i = 0; i < NUM_DSETS; i++) {
sprintf(dset_name, "dataset %d", i);
- if((dataset = H5Dcreate(file, dset_name, H5T_NATIVE_DOUBLE,
- space, H5P_DEFAULT)) < 0)
- goto error;
+ if((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
- if (H5Dclose(dataset) < 0) goto error;
- }
+ if(H5Dclose(dataset) < 0)
+ goto error;
+ } /* end for */
return 0;
@@ -472,7 +473,7 @@ create_attrs_2(void)
char attr_name[128];
int i, j;
p_time attr_t = {0, 0, 0, 1000000, 0, ""};
- p_time create_t = {0, 0, 0, 1000000, 0, "H5Dcreate"};
+ p_time create_t = {0, 0, 0, 1000000, 0, "H5Dcreate2"};
p_time close_t = {0, 0, 0, 1000000, 0, ""};
#ifdef H5_HAVE_PARALLEL
@@ -493,8 +494,8 @@ create_attrs_2(void)
for(i = 0; i < NUM_DSETS; i++) {
sprintf(dset_name, "dataset %d", i);
create_t.start = retrieve_time();
- if((dataset = H5Dcreate(file, dset_name, H5T_NATIVE_DOUBLE,
- space, H5P_DEFAULT)) < 0)
+ if((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE,
+ space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
perf(&create_t, create_t.start, retrieve_time());
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 23c3edd..f42a849 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -848,17 +848,17 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
}/* end else */
sprintf(dname, "Dataset_%ld", ndset);
- h5ds_id = H5Dcreate(fd->h5fd, dname, ELMT_H5_TYPE,
- h5dset_space_id, h5dcpl);
+ h5ds_id = H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE,
+ h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
- if (h5ds_id < 0) {
+ if(h5ds_id < 0) {
fprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
- if (hrc < 0) {
+ if(hrc < 0) {
fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}