summaryrefslogtreecommitdiffstats
path: root/testpar/t_dset.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_dset.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_dset.c')
-rw-r--r--testpar/t_dset.c480
1 files changed, 240 insertions, 240 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 2d02cdb..c8dd00e 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -58,7 +58,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[],
count[1] = 1;
start[0] = mpi_rank*block[0];
start[1] = 0;
-if (VERBOSE_MED) printf("slab_set BYROW\n");
+if(VERBOSE_MED) printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
@@ -70,7 +70,7 @@ if (VERBOSE_MED) printf("slab_set BYROW\n");
count[1] = 1;
start[0] = 0;
start[1] = mpi_rank*block[1];
-if (VERBOSE_MED) printf("slab_set BYCOL\n");
+if(VERBOSE_MED) printf("slab_set BYCOL\n");
break;
case ZROW:
/* Similar to BYROW except process 0 gets 0 row */
@@ -82,7 +82,7 @@ if (VERBOSE_MED) printf("slab_set BYCOL\n");
count[1] = 1;
start[0] = (mpi_rank? mpi_rank*block[0] : 0);
start[1] = 0;
-if (VERBOSE_MED) printf("slab_set ZROW\n");
+if(VERBOSE_MED) printf("slab_set ZROW\n");
break;
case ZCOL:
/* Similar to BYCOL except process 0 gets 0 column */
@@ -94,7 +94,7 @@ if (VERBOSE_MED) printf("slab_set ZROW\n");
count[1] = 1;
start[0] = 0;
start[1] = (mpi_rank? mpi_rank*block[1] : 0);
-if (VERBOSE_MED) printf("slab_set ZCOL\n");
+if(VERBOSE_MED) printf("slab_set ZCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
@@ -107,10 +107,10 @@ if (VERBOSE_MED) printf("slab_set ZCOL\n");
count[1] = 1;
start[0] = 0;
start[1] = 0;
-if (VERBOSE_MED) printf("slab_set wholeset\n");
+if(VERBOSE_MED) printf("slab_set wholeset\n");
break;
}
-if (VERBOSE_MED){
+if(VERBOSE_MED){
printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
(unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
@@ -176,7 +176,7 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
int vrfyerrs;
/* print it if VERBOSE_MED */
- if (VERBOSE_MED) {
+ if(VERBOSE_MED) {
printf("dataset_vrfy dumping:::\n");
printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
(unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
@@ -190,8 +190,8 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
vrfyerrs = 0;
for (i=0; i < block[0]; i++){
for (j=0; j < block[1]; j++){
- if (*dataset != *original){
- if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
+ if(*dataset != *original){
+ if(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
(unsigned long)i, (unsigned long)j,
(unsigned long)(i+start[0]), (unsigned long)(j+start[1]),
@@ -202,9 +202,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
}
}
}
- if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
+ if(vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
printf("[more errors ...]\n");
- if (vrfyerrs)
+ if(vrfyerrs)
printf("%d errors found in dataset_vrfy\n", vrfyerrs);
return(vrfyerrs);
}
@@ -247,7 +247,7 @@ dataset_writeInd(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Independent write test on file %s\n", filename);
/* set up MPI parameters */
@@ -266,11 +266,11 @@ dataset_writeInd(void)
VRFY((acc_tpl >= 0), "");
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
@@ -286,14 +286,14 @@ dataset_writeInd(void)
/* create a dataset collectively */
- dataset1 = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, sid,
- H5P_DEFAULT);
- VRFY((dataset1 >= 0), "H5Dcreate succeeded");
+ dataset1 = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, sid,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset1 >= 0), "H5Dcreate2 succeeded");
/* create another dataset collectively */
- dataset2 = H5Dcreate(fid, DATASETNAME2, H5T_NATIVE_INT, sid,
- H5P_DEFAULT);
- VRFY((dataset2 >= 0), "H5Dcreate succeeded");
+ dataset2 = H5Dcreate2(fid, DATASETNAME2, H5T_NATIVE_INT, sid,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset2 >= 0), "H5Dcreate2 succeeded");
/*
@@ -312,7 +312,7 @@ dataset_writeInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
@@ -329,18 +329,18 @@ dataset_writeInd(void)
VRFY((ret >= 0), "H5Dwrite dataset2 succeeded");
/* setup dimensions again to write with zero rows for process 0 */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("writeInd by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* need to make mem_dataspace to match for process 0 */
- if (MAINPROCESS){
- ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ if(MAINPROCESS){
+ ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
}
MESG("writeInd by some with zero row");
-if ((mpi_rank/2)*2 != mpi_rank){
+if((mpi_rank/2)*2 != mpi_rank){
ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
H5P_DEFAULT, data_array1);
VRFY((ret >= 0), "H5Dwrite dataset1 by ZROW succeeded");
@@ -353,9 +353,9 @@ MPI_Barrier(MPI_COMM_WORLD);
H5Sclose(file_dataspace);
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
/* release all IDs created */
@@ -365,7 +365,7 @@ MPI_Barrier(MPI_COMM_WORLD);
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
+ if(data_array1) free(data_array1);
}
/* Example of using the parallel HDF5 library to read a dataset */
@@ -393,7 +393,7 @@ dataset_readInd(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Independent read test on file %s\n", filename);
/* set up MPI parameters */
@@ -415,7 +415,7 @@ dataset_readInd(void)
VRFY((fid >= 0), "");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
/* open the dataset1 collectively */
@@ -433,7 +433,7 @@ dataset_readInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
@@ -450,7 +450,7 @@ dataset_readInd(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* read data independently */
ret = H5Dread(dataset2, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
@@ -459,12 +459,12 @@ dataset_readInd(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "");
/* release all IDs created */
@@ -474,8 +474,8 @@ dataset_readInd(void)
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
- if (data_origin1) free(data_origin1);
+ if(data_array1) free(data_array1);
+ if(data_origin1) free(data_origin1);
}
@@ -519,7 +519,7 @@ dataset_writeAll(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Collective write test on file %s\n", filename);
/* set up MPI parameters */
@@ -538,11 +538,11 @@ dataset_writeAll(void)
VRFY((acc_tpl >= 0), "");
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
@@ -558,20 +558,20 @@ dataset_writeAll(void)
/* create a dataset collectively */
- dataset1 = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, sid, H5P_DEFAULT);
- VRFY((dataset1 >= 0), "H5Dcreate succeeded");
+ dataset1 = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset1 >= 0), "H5Dcreate2 succeeded");
/* create another dataset collectively */
datatype = H5Tcopy(H5T_NATIVE_INT);
ret = H5Tset_order(datatype, H5T_ORDER_LE);
VRFY((ret >= 0), "H5Tset_order succeeded");
- dataset2 = H5Dcreate(fid, DATASETNAME2, datatype, sid, H5P_DEFAULT);
- VRFY((dataset2 >= 0), "H5Dcreate 2 succeeded");
+ dataset2 = H5Dcreate2(fid, DATASETNAME2, datatype, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset2 >= 0), "H5Dcreate2 2 succeeded");
/* create a third dataset collectively */
- dataset3 = H5Dcreate(fid, DATASETNAME3, H5T_NATIVE_INT, sid, H5P_DEFAULT);
- VRFY((dataset3 >= 0), "H5Dcreate succeeded");
+ dataset3 = H5Dcreate2(fid, DATASETNAME3, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset3 >= 0), "H5Dcreate2 succeeded");
/* release 2-D space ID created */
H5Sclose(sid);
@@ -581,8 +581,8 @@ dataset_writeAll(void)
VRFY((sid >= 0), "H5Screate succeeded");
/* create a fourth dataset collectively */
- dataset4 = H5Dcreate(fid, DATASETNAME4, H5T_NATIVE_INT, sid, H5P_DEFAULT);
- VRFY((dataset4 >= 0), "H5Dcreate succeeded");
+ dataset4 = H5Dcreate2(fid, DATASETNAME4, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((dataset4 >= 0), "H5Dcreate2 succeeded");
/* release scalar space ID created */
H5Sclose(sid);
@@ -597,7 +597,7 @@ dataset_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
@@ -607,7 +607,7 @@ dataset_writeAll(void)
/* fill the local slab with some trivial data */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -615,7 +615,7 @@ dataset_writeAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -630,14 +630,14 @@ dataset_writeAll(void)
VRFY((ret >= 0), "H5Dwrite dataset1 succeeded");
/* setup dimensions again to writeAll with zero rows for process 0 */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* need to make mem_dataspace to match for process 0 */
- if (MAINPROCESS){
- ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ if(MAINPROCESS){
+ ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
}
MESG("writeAll by some with zero row");
@@ -658,7 +658,7 @@ dataset_writeAll(void)
/* put some trivial data in the data_array */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -666,7 +666,7 @@ dataset_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
@@ -676,7 +676,7 @@ dataset_writeAll(void)
/* fill the local slab with some trivial data */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -684,7 +684,7 @@ dataset_writeAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -698,14 +698,14 @@ dataset_writeAll(void)
VRFY((ret >= 0), "H5Dwrite dataset2 succeeded");
/* setup dimensions again to writeAll with zero columns for process 0 */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* need to make mem_dataspace to match for process 0 */
- if (MAINPROCESS){
- ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ if(MAINPROCESS){
+ ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
}
MESG("writeAll by some with zero col");
@@ -727,27 +727,27 @@ dataset_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset3);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- if (MAINPROCESS) {
- ret=H5Sselect_none(file_dataspace);
+ if(MAINPROCESS) {
+ ret = H5Sselect_none(file_dataspace);
VRFY((ret >= 0), "H5Sselect_none file_dataspace succeeded");
} /* end if */
else {
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
} /* end else */
/* create a memory dataspace independently */
mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
- if (MAINPROCESS) {
- ret=H5Sselect_none(mem_dataspace);
+ if(MAINPROCESS) {
+ ret = H5Sselect_none(mem_dataspace);
VRFY((ret >= 0), "H5Sselect_none mem_dataspace succeeded");
} /* end if */
/* fill the local slab with some trivial data */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED) {
+ if(VERBOSE_MED) {
MESG("data_array created");
dataset_print(start, block, data_array1);
} /* end if */
@@ -755,7 +755,7 @@ dataset_writeAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -788,31 +788,31 @@ dataset_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset4);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- if (MAINPROCESS) {
- ret=H5Sselect_none(file_dataspace);
+ if(MAINPROCESS) {
+ ret = H5Sselect_none(file_dataspace);
VRFY((ret >= 0), "H5Sselect_all file_dataspace succeeded");
} /* end if */
else {
- ret=H5Sselect_all(file_dataspace);
+ ret = H5Sselect_all(file_dataspace);
VRFY((ret >= 0), "H5Sselect_none succeeded");
} /* end else */
/* create a memory dataspace independently */
mem_dataspace = H5Screate(H5S_SCALAR);
VRFY((mem_dataspace >= 0), "");
- if (MAINPROCESS) {
- ret=H5Sselect_none(mem_dataspace);
+ if(MAINPROCESS) {
+ ret = H5Sselect_none(mem_dataspace);
VRFY((ret >= 0), "H5Sselect_all mem_dataspace succeeded");
} /* end if */
else {
- ret=H5Sselect_all(mem_dataspace);
+ ret = H5Sselect_all(mem_dataspace);
VRFY((ret >= 0), "H5Sselect_none succeeded");
} /* end else */
/* fill the local slab with some trivial data */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED) {
+ if(VERBOSE_MED) {
MESG("data_array created");
dataset_print(start, block, data_array1);
} /* end if */
@@ -820,7 +820,7 @@ dataset_writeAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -849,20 +849,20 @@ dataset_writeAll(void)
/*
* All writes completed. Close datasets collectively
*/
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
- ret=H5Dclose(dataset3);
+ ret = H5Dclose(dataset3);
VRFY((ret >= 0), "H5Dclose3 succeeded");
- ret=H5Dclose(dataset4);
+ ret = H5Dclose(dataset4);
VRFY((ret >= 0), "H5Dclose3 succeeded");
/* close the file collectively */
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
+ if(data_array1) free(data_array1);
}
/*
@@ -899,7 +899,7 @@ dataset_readAll(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Collective read test on file %s\n", filename);
/* set up MPI parameters */
@@ -924,7 +924,7 @@ dataset_readAll(void)
VRFY((fid >= 0), "H5Fopen succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
@@ -949,7 +949,7 @@ dataset_readAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
@@ -959,7 +959,7 @@ dataset_readAll(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_origin1);
}
@@ -967,7 +967,7 @@ dataset_readAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -982,17 +982,17 @@ dataset_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* setup dimensions again to readAll with zero columns for process 0 */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* need to make mem_dataspace to match for process 0 */
- if (MAINPROCESS){
- ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ if(MAINPROCESS){
+ ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
}
MESG("readAll by some with zero col");
@@ -1002,7 +1002,7 @@ dataset_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* release all temporary handles. */
/* Could have used them for dataset2 but it is cleaner */
@@ -1017,7 +1017,7 @@ dataset_readAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
@@ -1027,7 +1027,7 @@ dataset_readAll(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_origin1);
}
@@ -1035,7 +1035,7 @@ dataset_readAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pcreate xfer succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -1050,17 +1050,17 @@ dataset_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* setup dimensions again to readAll with zero rows for process 0 */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* need to make mem_dataspace to match for process 0 */
- if (MAINPROCESS){
- ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ if(MAINPROCESS){
+ ret = H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
}
MESG("readAll by some with zero row");
@@ -1070,7 +1070,7 @@ dataset_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
- if (ret) nerrors++;
+ if(ret) nerrors++;
/* release all temporary handles. */
H5Sclose(file_dataspace);
@@ -1081,17 +1081,17 @@ dataset_readAll(void)
/*
* All reads completed. Close datasets collectively
*/
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
/* close the file collectively */
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
- if (data_origin1) free(data_origin1);
+ if(data_array1) free(data_array1);
+ if(data_origin1) free(data_origin1);
}
@@ -1137,7 +1137,7 @@ extend_writeInd(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
@@ -1169,19 +1169,19 @@ extend_writeInd(void)
size_t rdcc_nbytes;
double rdcc_w0;
- ret=H5Pget_cache(acc_tpl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
+ ret = H5Pget_cache(acc_tpl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
VRFY((ret >= 0), "H5Pget_cache succeeded");
mdc_nelmts=4;
- ret=H5Pset_cache(acc_tpl,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
+ ret = H5Pset_cache(acc_tpl,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
VRFY((ret >= 0), "H5Pset_cache succeeded");
}
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
@@ -1190,7 +1190,7 @@ extend_writeInd(void)
* ------------------------------------------------------------- */
/* set up dataset storage chunk sizes and creation property list */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
@@ -1204,12 +1204,12 @@ extend_writeInd(void)
VRFY((sid >= 0), "H5Screate_simple succeeded");
/* create an extendible dataset collectively */
- dataset1 = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset1 >= 0), "H5Dcreate succeeded");
+ dataset1 = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset1 >= 0), "H5Dcreate2 succeeded");
/* create another extendible dataset collectively */
- dataset2 = H5Dcreate(fid, DATASETNAME2, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset2 >= 0), "H5Dcreate succeeded");
+ dataset2 = H5Dcreate2(fid, DATASETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset2 >= 0), "H5Dcreate2 succeeded");
/* release resource */
H5Sclose(sid);
@@ -1226,7 +1226,7 @@ extend_writeInd(void)
/* put some trivial data in the data_array */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED) {
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1244,7 +1244,7 @@ extend_writeInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently */
@@ -1266,7 +1266,7 @@ extend_writeInd(void)
/* put some trivial data in the data_array */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1283,7 +1283,7 @@ extend_writeInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently. Should fail. */
@@ -1304,7 +1304,7 @@ extend_writeInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently */
@@ -1313,23 +1313,23 @@ extend_writeInd(void)
VRFY((ret >= 0), "H5Dwrite succeeded");
/* release resource */
- ret=H5Sclose(file_dataspace);
+ ret = H5Sclose(file_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Sclose(mem_dataspace);
+ ret = H5Sclose(mem_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
/* close the file collectively */
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
+ if(data_array1) free(data_array1);
}
/*
@@ -1361,7 +1361,7 @@ extend_writeInd2(void)
herr_t ret; /* Generic return value */
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent write test #2 on file %s\n", filename);
/* set up MPI parameters */
@@ -1376,11 +1376,11 @@ extend_writeInd2(void)
VRFY((fapl >= 0), "create_faccess_plist succeeded");
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,fapl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(fapl);
+ ret = H5Pclose(fapl);
VRFY((ret >= 0), "H5Pclose succeeded");
@@ -1399,11 +1399,11 @@ extend_writeInd2(void)
VRFY((fs >= 0), "H5Screate_simple succeeded");
/* create an extendible dataset collectively */
- dataset = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, fs, dcpl);
- VRFY((dataset >= 0), "H5Dcreate succeeded");
+ dataset = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, fs, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ VRFY((dataset >= 0), "H5Dcreat2e succeeded");
/* release resource */
- ret=H5Pclose(dcpl);
+ ret = H5Pclose(dcpl);
VRFY((ret >= 0), "H5Pclose succeeded");
@@ -1415,12 +1415,12 @@ extend_writeInd2(void)
VRFY((ms >= 0), "H5Screate_simple succeeded");
/* put some trivial data in the data_array */
- for (i=0; i<(int)orig_size; i++)
+ for(i = 0; i < (int)orig_size; i++)
written[i] = i;
MESG("data array initialized");
- if (VERBOSE_MED) {
+ if(VERBOSE_MED) {
MESG("writing at offset zero: ");
- for (i=0; i<(int)orig_size; i++)
+ for(i = 0; i < (int)orig_size; i++)
printf("%s%d", i?", ":"", written[i]);
printf("\n");
}
@@ -1438,7 +1438,7 @@ extend_writeInd2(void)
i,written[i], i,retrieved[i]);
nerrors++;
}
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("read at offset zero: ");
for (i=0; i<(int)orig_size; i++)
printf("%s%d", i?", ":"", retrieved[i]);
@@ -1461,7 +1461,7 @@ extend_writeInd2(void)
for (i=0; i<(int)orig_size; i++)
written[i] = orig_size + i;
MESG("data array re-initialized");
- if (VERBOSE_MED) {
+ if(VERBOSE_MED) {
MESG("writing at offset 10: ");
for (i=0; i<(int)orig_size; i++)
printf("%s%d", i?", ":"", written[i]);
@@ -1483,7 +1483,7 @@ extend_writeInd2(void)
i,written[i], i,retrieved[i]);
nerrors++;
}
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("read at offset 10: ");
for (i=0; i<(int)orig_size; i++)
printf("%s%d", i?", ":"", retrieved[i]);
@@ -1492,7 +1492,7 @@ extend_writeInd2(void)
/* Close dataset collectively */
- ret=H5Dclose(dataset);
+ ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose succeeded");
/* Close the file collectively */
@@ -1527,7 +1527,7 @@ extend_readInd(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
@@ -1554,7 +1554,7 @@ extend_readInd(void)
VRFY((fid >= 0), "");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
/* open the dataset1 collectively */
@@ -1590,7 +1590,7 @@ extend_readInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
@@ -1599,7 +1599,7 @@ extend_readInd(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1612,7 +1612,7 @@ extend_readInd(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset1 read verified correct");
- if (ret) nerrors++;
+ if(ret) nerrors++;
H5Sclose(mem_dataspace);
H5Sclose(file_dataspace);
@@ -1625,7 +1625,7 @@ extend_readInd(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
@@ -1634,7 +1634,7 @@ extend_readInd(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1647,15 +1647,15 @@ extend_readInd(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset2 read verified correct");
- if (ret) nerrors++;
+ if(ret) nerrors++;
H5Sclose(mem_dataspace);
H5Sclose(file_dataspace);
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "");
@@ -1663,9 +1663,9 @@ extend_readInd(void)
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
- if (data_array2) free(data_array2);
- if (data_origin1) free(data_origin1);
+ if(data_array1) free(data_array1);
+ if(data_array2) free(data_array2);
+ if(data_origin1) free(data_origin1);
}
/*
@@ -1711,7 +1711,7 @@ extend_writeAll(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
@@ -1743,19 +1743,19 @@ extend_writeAll(void)
size_t rdcc_nbytes;
double rdcc_w0;
- ret=H5Pget_cache(acc_tpl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
+ ret = H5Pget_cache(acc_tpl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
VRFY((ret >= 0), "H5Pget_cache succeeded");
mdc_nelmts=4;
- ret=H5Pset_cache(acc_tpl,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
+ ret = H5Pset_cache(acc_tpl,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
VRFY((ret >= 0), "H5Pset_cache succeeded");
}
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
@@ -1764,7 +1764,7 @@ extend_writeAll(void)
* ------------------------------------------------------------- */
/* set up dataset storage chunk sizes and creation property list */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
@@ -1778,12 +1778,12 @@ extend_writeAll(void)
VRFY((sid >= 0), "H5Screate_simple succeeded");
/* create an extendible dataset collectively */
- dataset1 = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset1 >= 0), "H5Dcreate succeeded");
+ dataset1 = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset1 >= 0), "H5Dcreate2 succeeded");
/* create another extendible dataset collectively */
- dataset2 = H5Dcreate(fid, DATASETNAME2, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset2 >= 0), "H5Dcreate succeeded");
+ dataset2 = H5Dcreate2(fid, DATASETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset2 >= 0), "H5Dcreate2 succeeded");
/* release resource */
H5Sclose(sid);
@@ -1800,7 +1800,7 @@ extend_writeAll(void)
/* put some trivial data in the data_array */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED) {
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1818,13 +1818,13 @@ extend_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -1852,7 +1852,7 @@ extend_writeAll(void)
/* put some trivial data in the data_array */
dataset_fill(start, block, data_array1);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -1864,7 +1864,7 @@ extend_writeAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -1880,7 +1880,7 @@ extend_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently. Should fail. */
@@ -1901,7 +1901,7 @@ extend_writeAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently */
@@ -1910,25 +1910,25 @@ extend_writeAll(void)
VRFY((ret >= 0), "H5Dwrite succeeded");
/* release resource */
- ret=H5Sclose(file_dataspace);
+ ret = H5Sclose(file_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Sclose(mem_dataspace);
+ ret = H5Sclose(mem_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Pclose(xfer_plist);
+ ret = H5Pclose(xfer_plist);
VRFY((ret >= 0), "H5Pclose succeeded");
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
/* close the file collectively */
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
+ if(data_array1) free(data_array1);
}
/* Example of using the parallel HDF5 library to read an extendible dataset */
@@ -1959,7 +1959,7 @@ extend_readAll(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
@@ -1986,7 +1986,7 @@ extend_readAll(void)
VRFY((fid >= 0), "");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
/* open the dataset1 collectively */
@@ -2022,7 +2022,7 @@ extend_readAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
@@ -2031,7 +2031,7 @@ extend_readAll(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -2039,7 +2039,7 @@ extend_readAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -2055,7 +2055,7 @@ extend_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset1 read verified correct");
- if (ret) nerrors++;
+ if(ret) nerrors++;
H5Sclose(mem_dataspace);
H5Sclose(file_dataspace);
@@ -2069,7 +2069,7 @@ extend_readAll(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset2);
VRFY((file_dataspace >= 0), "");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
@@ -2078,7 +2078,7 @@ extend_readAll(void)
/* fill dataset with test data */
dataset_fill(start, block, data_origin1);
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(start, block, data_array1);
}
@@ -2086,7 +2086,7 @@ extend_readAll(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -2102,16 +2102,16 @@ extend_readAll(void)
/* verify the read data with original expected data */
ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset2 read verified correct");
- if (ret) nerrors++;
+ if(ret) nerrors++;
H5Sclose(mem_dataspace);
H5Sclose(file_dataspace);
H5Pclose(xfer_plist);
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "");
@@ -2119,9 +2119,9 @@ extend_readAll(void)
H5Fclose(fid);
/* release data buffers */
- if (data_array1) free(data_array1);
- if (data_array2) free(data_array2);
- if (data_origin1) free(data_origin1);
+ if(data_array1) free(data_array1);
+ if(data_array2) free(data_array2);
+ if(data_origin1) free(data_origin1);
}
/*
@@ -2152,7 +2152,7 @@ compress_readAll(void)
herr_t ret; /* Generic return value */
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Collective chunked dataset read test on file %s\n", filename);
/* Retrieve MPI parameters */
@@ -2181,15 +2181,15 @@ compress_readAll(void)
dcpl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dcpl > 0), "H5Pcreate succeeded");
- ret=H5Pset_layout(dcpl, H5D_CHUNKED);
+ ret = H5Pset_layout(dcpl, H5D_CHUNKED);
VRFY((ret >= 0), "H5Pset_layout succeeded");
/* Use eight chunks */
- chunk_dim=dim/8;
- ret=H5Pset_chunk(dcpl, rank, &chunk_dim);
+ chunk_dim = dim / 8;
+ ret = H5Pset_chunk(dcpl, rank, &chunk_dim);
VRFY((ret >= 0), "H5Pset_chunk succeeded");
- ret=H5Pset_deflate(dcpl, 9);
+ ret = H5Pset_deflate(dcpl, 9);
VRFY((ret >= 0), "H5Pset_deflate succeeded");
/* Create dataspace */
@@ -2197,21 +2197,21 @@ compress_readAll(void)
VRFY((dataspace > 0), "H5Screate_simple succeeded");
/* Create dataset */
- dataset = H5Dcreate(fid, "compressed_data", H5T_NATIVE_INT, dataspace, dcpl);
- VRFY((dataset > 0), "H5Screate_simple succeeded");
+ dataset = H5Dcreate2(fid, "compressed_data", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ VRFY((dataset > 0), "H5Dcreate2 succeeded");
/* Write compressed data */
- ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_orig);
+ ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_orig);
VRFY((ret >= 0), "H5Dwrite succeeded");
/* Close objects */
- ret=H5Pclose(dcpl);
+ re = =H5Pclose(dcpl);
VRFY((ret >= 0), "H5Pclose succeeded");
- ret=H5Sclose(dataspace);
+ ret = H5Sclose(dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Dclose(dataset);
+ ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose succeeded");
- ret=H5Fclose(fid);
+ ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
}
@@ -2231,7 +2231,7 @@ compress_readAll(void)
VRFY((fid > 0), "H5Fopen succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "H5Pclose succeeded");
@@ -2245,7 +2245,7 @@ compress_readAll(void)
xfer_plist = H5Pcreate(H5P_DATASET_XFER);
VRFY((xfer_plist > 0), "H5Pcreate succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
if(dxfer_coll_type == DXFER_INDEPENDENT_IO) {
ret = H5Pset_dxpl_mpio_collective_opt(xfer_plist,H5FD_MPIO_INDIVIDUAL_IO);
@@ -2254,7 +2254,7 @@ compress_readAll(void)
/* Try reading the data */
- ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer_plist, data_read);
+ ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer_plist, data_read);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* Verify data read */
@@ -2267,22 +2267,22 @@ compress_readAll(void)
/* Writing to the compressed, chunked dataset in parallel should fail */
H5E_BEGIN_TRY {
- ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer_plist, data_read);
+ ret = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer_plist, data_read);
} H5E_END_TRY;
VRFY((ret < 0), "H5Dwrite failed");
- ret=H5Pclose(xfer_plist);
+ ret = H5Pclose(xfer_plist);
VRFY((ret >= 0), "H5Pclose succeeded");
- ret=H5Dclose(dataset);
+ ret = H5Dclose(dataset);
VRFY((ret >= 0), "H5Dclose succeeded");
} /* end if */
- ret=H5Fclose(fid);
+ ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
/* release data buffers */
- if (data_read) HDfree(data_read);
- if (data_orig) HDfree(data_orig);
+ if(data_read) HDfree(data_read);
+ if(data_orig) HDfree(data_orig);
}
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2329,7 +2329,7 @@ none_selection_chunk(void)
MPI_Info info = MPI_INFO_NULL;
filename = GetTestParameters();
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
@@ -2348,11 +2348,11 @@ none_selection_chunk(void)
VRFY((acc_tpl >= 0), "");
/* create the file collectively */
- fid=H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_tpl);
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
VRFY((fid >= 0), "H5Fcreate succeeded");
/* Release file-access template */
- ret=H5Pclose(acc_tpl);
+ ret = H5Pclose(acc_tpl);
VRFY((ret >= 0), "");
/* --------------------------------------------------------------
@@ -2360,7 +2360,7 @@ none_selection_chunk(void)
* ------------------------------------------------------------- */
/* set up dataset storage chunk sizes and creation property list */
- if (VERBOSE_MED)
+ if(VERBOSE_MED)
printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
@@ -2370,16 +2370,16 @@ none_selection_chunk(void)
/* setup dimensionality object */
dims[0] = dim0;
dims[1] = dim1;
- sid = H5Screate_simple (RANK, dims, NULL);
+ sid = H5Screate_simple(RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
/* create an extendible dataset collectively */
- dataset1 = H5Dcreate(fid, DATASETNAME1, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset1 >= 0), "H5Dcreate succeeded");
+ dataset1 = H5Dcreate2(fid, DATASETNAME1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset1 >= 0), "H5Dcreate2 succeeded");
/* create another extendible dataset collectively */
- dataset2 = H5Dcreate(fid, DATASETNAME2, H5T_NATIVE_INT, sid, dataset_pl);
- VRFY((dataset2 >= 0), "H5Dcreate succeeded");
+ dataset2 = H5Dcreate2(fid, DATASETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dataset_pl, H5P_DEFAULT);
+ VRFY((dataset2 >= 0), "H5Dcreate2 succeeded");
/* release resource */
H5Sclose(sid);
@@ -2393,7 +2393,7 @@ none_selection_chunk(void)
/* allocate memory for data buffer. Only allocate enough buffer for
* each processor's data. */
- if (mpi_rank) {
+ if(mpi_rank) {
data_origin = (DATATYPE *)malloc(block[0]*block[1]*sizeof(DATATYPE));
VRFY((data_origin != NULL), "data_origin malloc succeeded");
@@ -2404,7 +2404,7 @@ none_selection_chunk(void)
mstart[0] = mstart[1] = 0;
dataset_fill(mstart, block, data_origin);
MESG("data_array initialized");
- if (VERBOSE_MED){
+ if(VERBOSE_MED){
MESG("data_array created");
dataset_print(mstart, block, data_origin);
}
@@ -2415,7 +2415,7 @@ none_selection_chunk(void)
VRFY((mem_dataspace >= 0), "");
/* Process 0 has no selection */
- if (!mpi_rank) {
+ if(!mpi_rank) {
ret = H5Sselect_none(mem_dataspace);
VRFY((ret >= 0), "H5Sselect_none succeeded");
}
@@ -2423,11 +2423,11 @@ none_selection_chunk(void)
/* create a file dataspace independently */
file_dataspace = H5Dget_space (dataset1);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* Process 0 has no selection */
- if (!mpi_rank) {
+ if(!mpi_rank) {
ret = H5Sselect_none(file_dataspace);
VRFY((ret >= 0), "H5Sselect_none succeeded");
}
@@ -2435,7 +2435,7 @@ none_selection_chunk(void)
/* set up the collective transfer properties list */
xfer_plist = H5Pcreate (H5P_DATASET_XFER);
VRFY((xfer_plist >= 0), "H5Pcreate xfer succeeded");
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* write data collectively */
@@ -2449,15 +2449,15 @@ none_selection_chunk(void)
VRFY((ret >= 0), "");
/* verify the read data with original expected data */
- if (mpi_rank) {
+ if(mpi_rank) {
ret = dataset_vrfy(mstart, count, stride, block, data_array, data_origin);
- if (ret) nerrors++;
+ if(ret) nerrors++;
}
/* -------------------------
* Test independent writing to dataset2
* -------------------------*/
- ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT);
+ ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_INDEPENDENT);
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
/* write data collectively */
@@ -2471,30 +2471,30 @@ none_selection_chunk(void)
VRFY((ret >= 0), "");
/* verify the read data with original expected data */
- if (mpi_rank) {
+ if(mpi_rank) {
ret = dataset_vrfy(mstart, count, stride, block, data_array, data_origin);
- if (ret) nerrors++;
+ if(ret) nerrors++;
}
/* release resource */
- ret=H5Sclose(file_dataspace);
+ ret = H5Sclose(file_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Sclose(mem_dataspace);
+ ret = H5Sclose(mem_dataspace);
VRFY((ret >= 0), "H5Sclose succeeded");
- ret=H5Pclose(xfer_plist);
+ ret = H5Pclose(xfer_plist);
VRFY((ret >= 0), "H5Pclose succeeded");
/* close dataset collectively */
- ret=H5Dclose(dataset1);
+ ret = H5Dclose(dataset1);
VRFY((ret >= 0), "H5Dclose1 succeeded");
- ret=H5Dclose(dataset2);
+ ret = H5Dclose(dataset2);
VRFY((ret >= 0), "H5Dclose2 succeeded");
/* close the file collectively */
H5Fclose(fid);
/* release data buffers */
- if (data_origin) free(data_origin);
- if (data_array) free(data_array);
+ if(data_origin) free(data_origin);
+ if(data_array) free(data_array);
}