summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 21:06:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 21:06:26 (GMT)
commitc7bf502798ed500d9637ff3dd23a83420afd5070 (patch)
treea29e4bc6023564b9db5b435e4646b2b667171da2 /testpar
parent5ad5d1a6d1190bbc6ed064eaae7ca1d2e361cb0a (diff)
downloadhdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.zip
hdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.tar.gz
hdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.tar.bz2
[svn-r11246] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_coll_chunk.c48
-rw-r--r--testpar/t_dset.c2
-rw-r--r--testpar/t_mdset.c292
-rw-r--r--testpar/t_mpi.c12
-rw-r--r--testpar/t_ph5basic.c6
-rw-r--r--testpar/t_span_tree.c282
-rw-r--r--testpar/testphdf5.c56
-rw-r--r--testpar/testphdf5.h170
8 files changed, 434 insertions, 434 deletions
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index c2a4903..fe608f5 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -26,13 +26,13 @@
static void ccslab_set(int mpi_rank,int mpi_size,hsize_t start[],hsize_t count[],
hsize_t stride[],hsize_t block[],int mode);
-static void ccdataset_fill(hsize_t start[],hsize_t count[],
- hsize_t stride[],hsize_t block[],DATATYPE*dataset);
+static void ccdataset_fill(hsize_t start[],hsize_t count[],
+ hsize_t stride[],hsize_t block[],DATATYPE*dataset);
static void ccdataset_print(hsize_t start[],hsize_t block[],DATATYPE*dataset);
-static int ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[],
- hsize_t block[], DATATYPE *dataset, DATATYPE *original);
+static int ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[],
+ hsize_t block[], DATATYPE *dataset, DATATYPE *original);
static void coll_chunktest(const char* filename,int chunk_factor,int select_factor);
@@ -93,7 +93,7 @@ coll_chunk4(void)
const char *filename;
int mpi_size;
MPI_Comm comm = MPI_COMM_WORLD;
- MPI_Comm_size(comm,&mpi_size);
+ MPI_Comm_size(comm,&mpi_size);
filename = GetTestParameters();
coll_chunktest(filename,mpi_size*2,BYROW_DISCONT);
@@ -105,7 +105,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
hid_t file,dataset, file_dataspace;
hid_t acc_plist,xfer_plist,crp_plist;
hsize_t dims[RANK], chunk_dims[RANK];
- int* data_array1 = NULL;
+ int* data_array1 = NULL;
int* data_origin1 = NULL;
herr_t status;
hsize_t start[RANK];
@@ -128,7 +128,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
status = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((acc_plist >= 0),"MPIO creation property list succeeded");
-
+
file = H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_plist);
VRFY((file >= 0),"H5Fcreate succeeded");
@@ -136,11 +136,11 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
VRFY((status >= 0),"");
/* setup dimensionality object */
-
+
dims[0] = SPACE_DIM1;
dims[1] = SPACE_DIM2;
- /* each process takes a slab of rows
+ /* each process takes a slab of rows
stride[0] = 1;
stride[1] = 1;
count[0] = SPACE_DIM1/mpi_size;
@@ -163,15 +163,15 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
crp_plist = H5Pcreate(H5P_DATASET_CREATE);
VRFY((crp_plist >= 0),"");
-
+
/* test1: chunk size is equal to dataset size */
chunk_dims[0] = SPACE_DIM1/chunk_factor;
chunk_dims[1] = SPACE_DIM2/chunk_factor;
status = H5Pset_chunk(crp_plist, 2, chunk_dims);
VRFY((status >= 0),"chunk creation property list succeeded");
-
+
dataset = H5Dcreate(file,DSET_COLLECTIVE_CHUNK_NAME,H5T_NATIVE_INT,
- file_dataspace,crp_plist);
+ file_dataspace,crp_plist);
VRFY((dataset >= 0),"dataset created succeeded");
/* H5Sclose(file_dataspace); */
@@ -216,19 +216,19 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
}
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
status = H5Dclose(dataset);
- VRFY((status >= 0),"");
+ VRFY((status >= 0),"");
/* check whether using collective IO */
/* Should use H5Pget and H5Pinsert to handle this test. */
status = H5Pclose(xfer_plist);
- VRFY((status >= 0),"property list closed");
+ VRFY((status >= 0),"property list closed");
status = H5Sclose(file_dataspace);
- VRFY((status >= 0),"");
+ VRFY((status >= 0),"");
status = H5Fclose(file);
- VRFY((status >= 0),"");
+ VRFY((status >= 0),"");
if (data_array1) free(data_array1);
@@ -248,7 +248,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
status = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((acc_plist >= 0),"MPIO creation property list succeeded");
-
+
file = H5Fopen(filename,H5F_ACC_RDONLY,acc_plist);
VRFY((file >= 0),"H5Fcreate succeeded");
@@ -270,8 +270,8 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
/* fill dataset with test data */
ccdataset_fill(start, stride,count,block, data_origin1);
- xfer_plist = H5Pcreate (H5P_DATASET_XFER);
- VRFY((xfer_plist >= 0),"");
+ xfer_plist = H5Pcreate (H5P_DATASET_XFER);
+ VRFY((xfer_plist >= 0),"");
status = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((status>= 0),"MPIO collective transfer property succeeded");
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
@@ -315,7 +315,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
/* release data buffers */
if (data_array1) free(data_array1);
if (data_origin1) free(data_origin1);
-
+
}
@@ -395,11 +395,11 @@ ccdataset_fill(hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block
dataptr = tmptr + ((start[0]+k1*stride[0]+i)*SPACE_DIM2+
start[1]+k2*stride[1]+j);
-
+
*dataptr = (DATATYPE)(k1+k2+i+j);
}
}
- }
+ }
}
}
@@ -455,7 +455,7 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
}
vrfyerrs = 0;
-
+
for (k1 = 0; k1 < count[0];k1++) {
for(i = 0;i < block[0];i++) {
for(k2 = 0; k2<count[1];k2++) {
@@ -465,7 +465,7 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block
start[1]+k2*stride[1]+j);
oriptr = original + ((start[0]+k1*stride[0]+i)*SPACE_DIM2+
start[1]+k2*stride[1]+j);
-
+
if (*dataptr != *oriptr){
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 962a6f4..8c5e688 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -2153,7 +2153,7 @@ compress_readAll(void)
VRFY((dataspace > 0), "H5Screate_simple succeeded");
/* Create dataset */
- dataset = H5Dcreate(fid, "compressed_data", H5T_NATIVE_INT, dataspace, dcpl);
+ dataset = H5Dcreate(fid, "compressed_data", H5T_NATIVE_INT, dataspace, dcpl);
VRFY((dataset > 0), "H5Screate_simple succeeded");
/* Write compressed data */
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index d99cbc3..96f0f55 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -19,7 +19,7 @@
#define NDATASET 4
#define GROUP_DEPTH 128
enum obj_type { is_group, is_dset };
-
+
int get_size(void);
void write_dataset(hid_t, hid_t, hid_t);
@@ -34,10 +34,10 @@ void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
/*
- * The size value computed by this function is used extensively in
- * configuring tests for the current number of processes.
+ * The size value computed by this function is used extensively in
+ * configuring tests for the current number of processes.
*
- * This function was created as part of an effort to allow the
+ * This function was created as part of an effort to allow the
* test functions in this file to run on an arbitrary number of
* processors.
* JRM - 8/11/04
@@ -48,7 +48,7 @@ int get_size(void)
int mpi_rank;
int mpi_size;
int size = SIZE;
-
+
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank); /* needed for VRFY */
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -118,7 +118,7 @@ void multiple_dset_write(void)
VRFY((ret>=0), "H5Pclose succeeded");
/* decide the hyperslab according to process number. */
- get_slab(chunk_origin, chunk_dims, count, file_dims, size);
+ get_slab(chunk_origin, chunk_dims, count, file_dims, size);
memspace = H5Screate_simple (DIM, chunk_dims, NULL);
filespace = H5Screate_simple (DIM, file_dims, NULL);
@@ -135,7 +135,7 @@ void multiple_dset_write(void)
for (n = 0; n < ndatasets; n++) {
sprintf (dname, "dataset %d", n);
dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, dcpl);
- VRFY((dataset > 0), dname);
+ VRFY((dataset > 0), dname);
/* calculate data to write */
for (i = 0; i < size; i++)
@@ -162,7 +162,7 @@ void multiple_dset_write(void)
}
-/* Example of using PHDF5 to create, write, and read compact dataset.
+/* Example of using PHDF5 to create, write, and read compact dataset.
*
* Changes: Updated function to use a dynamically calculated size,
* instead of the old SIZE #define. This should allow it
@@ -188,7 +188,7 @@ void compact_dataset(void)
{
file_dims[i] = size;
}
-
+
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -216,7 +216,7 @@ void compact_dataset(void)
VRFY((ret >= 0), "set space allocation time for compact dataset");
dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, dcpl);
- VRFY((dataset >= 0), "H5Dcreate succeeded");
+ VRFY((dataset >= 0), "H5Dcreate succeeded");
/* set up the collective transfer properties list */
dxpl = H5Pcreate (H5P_DATASET_XFER);
@@ -260,8 +260,8 @@ void compact_dataset(void)
for (j = 0; j < size; j++)
if ( inme[(i * size) + j] != outme[(i * size) + j])
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]);
-
+ printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]);
+
H5Pclose(plist);
H5Pclose(dxpl);
H5Dclose(dataset);
@@ -277,7 +277,7 @@ void compact_dataset(void)
*
* Changes: Removed the assert that mpi_size <= the SIZE #define.
* As best I can tell, this assert isn't needed here,
- * and in any case, the SIZE #define is being removed
+ * and in any case, the SIZE #define is being removed
* in an update of the functions in this file to run
* with an arbitrary number of processes.
*
@@ -296,7 +296,7 @@ void big_dataset(void)
MPI_Offset file_size; /* Size of file on disk */
herr_t ret; /* Generic return value */
const char *filename;
-
+
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -306,13 +306,13 @@ void big_dataset(void)
filename = GetTestParameters();
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
- VRFY((fapl >= 0), "create_faccess_plist succeeded");
+ VRFY((fapl >= 0), "create_faccess_plist succeeded");
/*
* Create >2GB HDF5 file
*/
iof = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- VRFY((iof >= 0), "H5Fcreate succeeded");
+ VRFY((iof >= 0), "H5Fcreate succeeded");
/* Define dataspace for 2GB dataspace */
file_dims[0]= 2;
@@ -320,28 +320,28 @@ void big_dataset(void)
file_dims[2]= 1024;
file_dims[3]= 1024;
filespace = H5Screate_simple (4, file_dims, NULL);
- VRFY((filespace >= 0), "H5Screate_simple succeeded");
+ VRFY((filespace >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate (iof, dname, H5T_NATIVE_UCHAR, filespace, H5P_DEFAULT);
- VRFY((dataset >= 0), "H5Dcreate succeeded");
+ VRFY((dataset >= 0), "H5Dcreate succeeded");
/* Close all file objects */
ret=H5Dclose (dataset);
- VRFY((ret >= 0), "H5Dclose succeeded");
+ VRFY((ret >= 0), "H5Dclose succeeded");
ret=H5Sclose (filespace);
- VRFY((ret >= 0), "H5Sclose succeeded");
+ VRFY((ret >= 0), "H5Sclose succeeded");
ret=H5Fclose (iof);
- VRFY((ret >= 0), "H5Fclose succeeded");
+ VRFY((ret >= 0), "H5Fclose succeeded");
/* Check that file of the correct size was created */
file_size=h5_mpi_get_file_size(filename, MPI_COMM_WORLD, MPI_INFO_NULL);
- VRFY((file_size == 2147485696ULL), "File is correct size");
+ VRFY((file_size == 2147485696ULL), "File is correct size");
/*
* Create >4GB HDF5 file
*/
iof = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- VRFY((iof >= 0), "H5Fcreate succeeded");
+ VRFY((iof >= 0), "H5Fcreate succeeded");
/* Define dataspace for 4GB dataspace */
file_dims[0]= 4;
@@ -349,28 +349,28 @@ void big_dataset(void)
file_dims[2]= 1024;
file_dims[3]= 1024;
filespace = H5Screate_simple (4, file_dims, NULL);
- VRFY((filespace >= 0), "H5Screate_simple succeeded");
+ VRFY((filespace >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate (iof, dname, H5T_NATIVE_UCHAR, filespace, H5P_DEFAULT);
- VRFY((dataset >= 0), "H5Dcreate succeeded");
+ VRFY((dataset >= 0), "H5Dcreate succeeded");
/* Close all file objects */
ret=H5Dclose (dataset);
- VRFY((ret >= 0), "H5Dclose succeeded");
+ VRFY((ret >= 0), "H5Dclose succeeded");
ret=H5Sclose (filespace);
- VRFY((ret >= 0), "H5Sclose succeeded");
+ VRFY((ret >= 0), "H5Sclose succeeded");
ret=H5Fclose (iof);
- VRFY((ret >= 0), "H5Fclose succeeded");
+ VRFY((ret >= 0), "H5Fclose succeeded");
/* Check that file of the correct size was created */
file_size=h5_mpi_get_file_size(filename, MPI_COMM_WORLD, MPI_INFO_NULL);
- VRFY((file_size == 4294969344ULL), "File is correct size");
+ VRFY((file_size == 4294969344ULL), "File is correct size");
/*
* Create >8GB HDF5 file
*/
iof = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- VRFY((iof >= 0), "H5Fcreate succeeded");
+ VRFY((iof >= 0), "H5Fcreate succeeded");
/* Define dataspace for 8GB dataspace */
file_dims[0]= 8;
@@ -378,26 +378,26 @@ void big_dataset(void)
file_dims[2]= 1024;
file_dims[3]= 1024;
filespace = H5Screate_simple (4, file_dims, NULL);
- VRFY((filespace >= 0), "H5Screate_simple succeeded");
+ VRFY((filespace >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate (iof, dname, H5T_NATIVE_UCHAR, filespace, H5P_DEFAULT);
- VRFY((dataset >= 0), "H5Dcreate succeeded");
+ VRFY((dataset >= 0), "H5Dcreate succeeded");
/* Close all file objects */
ret=H5Dclose (dataset);
- VRFY((ret >= 0), "H5Dclose succeeded");
+ VRFY((ret >= 0), "H5Dclose succeeded");
ret=H5Sclose (filespace);
- VRFY((ret >= 0), "H5Sclose succeeded");
+ VRFY((ret >= 0), "H5Sclose succeeded");
ret=H5Fclose (iof);
- VRFY((ret >= 0), "H5Fclose succeeded");
+ VRFY((ret >= 0), "H5Fclose succeeded");
/* Check that file of the correct size was created */
file_size=h5_mpi_get_file_size(filename, MPI_COMM_WORLD, MPI_INFO_NULL);
- VRFY((file_size == 8589936640ULL), "File is correct size");
+ VRFY((file_size == 8589936640ULL), "File is correct size");
/* Close fapl */
ret=H5Pclose (fapl);
- VRFY((ret >= 0), "H5Pclose succeeded");
+ VRFY((ret >= 0), "H5Pclose succeeded");
}
/* Example of using PHDF5 to read a partial written dataset. The dataset does
@@ -406,10 +406,10 @@ void big_dataset(void)
*
* Changes: Removed the assert that mpi_size <= the SIZE #define.
* As best I can tell, this assert isn't needed here,
- * and in any case, the SIZE #define is being removed
+ * and in any case, the SIZE #define is being removed
* in an update of the functions in this file to run
* with an arbitrary number of processes.
- *
+ *
* Also added code to free dynamically allocated buffers.
*
* JRM - 8/11/04
@@ -435,7 +435,7 @@ void dataset_fillvalue(void)
int acc, i, j, k, l; /* Local index variables */
herr_t ret; /* Generic return value */
const char *filename;
-
+
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -551,7 +551,7 @@ void dataset_fillvalue(void)
if(i<mpi_size) {
if( *twdata != *trdata )
if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED)
- printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", i,j,k,l, *twdata, *trdata);
+ printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", i,j,k,l, *twdata, *trdata);
} /* end if */
else {
if( *trdata != 0)
@@ -567,11 +567,11 @@ void dataset_fillvalue(void)
/* Close all file objects */
ret=H5Dclose (dataset);
- VRFY((ret >= 0), "H5Dclose succeeded");
+ VRFY((ret >= 0), "H5Dclose succeeded");
ret=H5Sclose (filespace);
- VRFY((ret >= 0), "H5Sclose succeeded");
+ VRFY((ret >= 0), "H5Sclose succeeded");
ret=H5Fclose (iof);
- VRFY((ret >= 0), "H5Fclose succeeded");
+ VRFY((ret >= 0), "H5Fclose succeeded");
/* Close memory dataspace */
ret=H5Sclose (memspace);
@@ -590,7 +590,7 @@ void dataset_fillvalue(void)
HDfree(wdata);
}
-/* Write multiple groups with a chunked dataset in each group collectively.
+/* Write multiple groups with a chunked dataset in each group collectively.
* These groups and datasets are for testing independent read later.
*
* Changes: Updated function to use a dynamically calculated size,
@@ -635,27 +635,27 @@ void collective_group_write(void)
H5Pclose(plist);
/* decide the hyperslab according to process number. */
- get_slab(chunk_origin, chunk_dims, count, file_dims, size);
+ get_slab(chunk_origin, chunk_dims, count, file_dims, size);
/* select hyperslab in memory and file spaces. These two operations are
* identical since the datasets are the same. */
memspace = H5Screate_simple(DIM, file_dims, NULL);
- ret1 = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, chunk_origin,
+ ret1 = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, chunk_origin,
chunk_dims, count, chunk_dims);
filespace = H5Screate_simple(DIM, file_dims, NULL);
- ret2 = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin,
+ ret2 = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin,
chunk_dims, count, chunk_dims);
VRFY((memspace>=0), "memspace");
VRFY((filespace>=0), "filespace");
VRFY((ret1>=0), "mgroup memspace selection");
- VRFY((ret2>=0), "mgroup filespace selection");
-
+ VRFY((ret2>=0), "mgroup filespace selection");
+
dcpl = H5Pcreate(H5P_DATASET_CREATE);
ret1 = H5Pset_chunk (dcpl, 2, chunk_size);
VRFY((dcpl>=0), "dataset creation property");
VRFY((ret1>=0), "set chunk for dataset creation property");
-
- /* creates ngroups groups under the root group, writes chunked
+
+ /* creates ngroups groups under the root group, writes chunked
* datasets in parallel. */
for(m = 0; m < ngroups; m++) {
sprintf(gname, "group%d", m);
@@ -670,7 +670,7 @@ void collective_group_write(void)
for(j=0; j < size; j++)
outme[(i * size) + j] = (i+j)*1000 + mpi_rank;
- H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
+ H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
outme);
H5Dclose(did);
@@ -683,7 +683,7 @@ void collective_group_write(void)
}
#endif /* BARRIER_CHECKS */
}
-
+
H5Pclose(dcpl);
H5Sclose(filespace);
H5Sclose(memspace);
@@ -692,8 +692,8 @@ void collective_group_write(void)
HDfree(outme);
}
-/* Let two sets of processes open and read different groups and chunked
- * datasets independently.
+/* Let two sets of processes open and read different groups and chunked
+ * datasets independently.
*/
void independent_group_read(void)
{
@@ -709,16 +709,16 @@ void independent_group_read(void)
ngroups = pt->count;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
+
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
fid = H5Fopen(filename, H5F_ACC_RDONLY, plist);
H5Pclose(plist);
- /* open groups and read datasets. Odd number processes read even number
- * groups from the end; even number processes read odd number groups
+ /* open groups and read datasets. Odd number processes read even number
+ * groups from the end; even number processes read odd number groups
* from the beginning. */
if(mpi_rank%2==0) {
- for(m=ngroups-1; m==0; m-=2)
+ for(m=ngroups-1; m==0; m-=2)
group_dataset_read(fid, mpi_rank, m);
} else {
for(m=0; m<ngroups; m+=2)
@@ -755,7 +755,7 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m)
outdata = (DATATYPE*)HDmalloc((size_t)(size * size * sizeof(DATATYPE)));
VRFY((outdata != NULL), "HDmalloc succeeded for outdata");
-
+
/* open every group under root group. */
sprintf(gname, "group%d", m);
gid = H5Gopen(fid, gname);
@@ -770,7 +770,7 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m)
/* this is the original value */
for(i=0; i<size; i++)
- for(j=0; j<size; j++) {
+ for(j=0; j<size; j++) {
outdata[(i * size) + j] = (i+j)*1000 + mpi_rank;
}
@@ -786,19 +786,19 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m)
}
/*
- * Example of using PHDF5 to create multiple groups. Under the root group,
- * it creates ngroups groups. Under the first group just created, it creates
- * recursive subgroups of depth GROUP_DEPTH. In each created group, it
+ * Example of using PHDF5 to create multiple groups. Under the root group,
+ * it creates ngroups groups. Under the first group just created, it creates
+ * recursive subgroups of depth GROUP_DEPTH. In each created group, it
* generates NDATASETS datasets. Each process write a hyperslab of an array
* into the file. The structure is like
- *
+ *
* root group
* |
* ---------------------------- ... ... ------------------------
* | | | ... ... | |
* group0*+' group1*+' group2*+' ... ... group ngroups*+'
* |
- * 1st_child_group*'
+ * 1st_child_group*'
* |
* 2nd_child_group*'
* |
@@ -845,32 +845,32 @@ void multiple_group_write(void)
H5Pclose(plist);
/* decide the hyperslab according to process number. */
- get_slab(chunk_origin, chunk_dims, count, file_dims, size);
+ get_slab(chunk_origin, chunk_dims, count, file_dims, size);
/* select hyperslab in memory and file spaces. These two operations are
* identical since the datasets are the same. */
memspace = H5Screate_simple(DIM, file_dims, NULL);
VRFY((memspace>=0), "memspace");
- ret = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, chunk_origin,
+ ret = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, chunk_origin,
chunk_dims, count, chunk_dims);
VRFY((ret>=0), "mgroup memspace selection");
filespace = H5Screate_simple(DIM, file_dims, NULL);
VRFY((filespace>=0), "filespace");
- ret = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin,
+ ret = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin,
chunk_dims, count, chunk_dims);
- VRFY((ret>=0), "mgroup filespace selection");
+ VRFY((ret>=0), "mgroup filespace selection");
- /* creates ngroups groups under the root group, writes datasets in
+ /* creates ngroups groups under the root group, writes datasets in
* parallel. */
for(m = 0; m < ngroups; m++) {
sprintf(gname, "group%d", m);
gid = H5Gcreate(fid, gname, 0);
VRFY((gid > 0), gname);
- /* create attribute for these groups. */
+ /* create attribute for these groups. */
write_attribute(gid, is_group, m);
-
+
if(m != 0)
write_dataset(memspace, filespace, gid);
@@ -883,13 +883,13 @@ void multiple_group_write(void)
}
#endif /* BARRIER_CHECKS */
}
-
+
/* recursively creates subgroups under the first group. */
gid = H5Gopen(fid, "group0");
create_group_recursive(memspace, filespace, gid, 0);
ret = H5Gclose(gid);
VRFY((ret>=0), "H5Gclose");
-
+
ret = H5Sclose(filespace);
VRFY((ret>=0), "H5Sclose");
ret = H5Sclose(memspace);
@@ -898,7 +898,7 @@ void multiple_group_write(void)
VRFY((ret>=0), "H5Fclose");
}
-/*
+/*
* In a group, creates NDATASETS datasets. Each process writes a hyperslab
* of a data array to the file.
*
@@ -907,7 +907,7 @@ void multiple_group_write(void)
* to function with an arbitrary number of processors.
*
* JRM - 8/16/04
- */
+ */
void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
{
int i, j, n, size;
@@ -915,7 +915,7 @@ void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
char dname[32];
DATATYPE * outme = NULL;
hid_t did;
-
+
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -926,7 +926,7 @@ void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
for(n=0; n < NDATASET; n++) {
sprintf(dname, "dataset%d", n);
- did = H5Dcreate(gid, dname, H5T_NATIVE_INT, filespace,
+ did = H5Dcreate(gid, dname, H5T_NATIVE_INT, filespace,
H5P_DEFAULT);
VRFY((did > 0), dname);
@@ -934,28 +934,28 @@ void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
for(j=0; j < size; j++)
outme[(i * size) + j] = n*1000 + mpi_rank;
- H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
+ H5Dwrite(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
outme);
/* create attribute for these datasets.*/
write_attribute(did, is_dset, n);
-
+
H5Dclose(did);
}
HDfree(outme);
}
-/*
+/*
* Creates subgroups of depth GROUP_DEPTH recursively. Also writes datasets
* in parallel in each group.
*/
-void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid,
+void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid,
int counter)
-{
+{
hid_t child_gid;
int mpi_rank;
char gname[64];
-
+
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
#ifdef BARRIER_CHECKS
@@ -964,23 +964,23 @@ void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid,
MPI_Barrier(MPI_COMM_WORLD);
}
#endif /* BARRIER_CHECKS */
-
- sprintf(gname, "%dth_child_group", counter+1);
+
+ sprintf(gname, "%dth_child_group", counter+1);
child_gid = H5Gcreate(gid, gname, 0);
VRFY((child_gid > 0), gname);
/* write datasets in parallel. */
- write_dataset(memspace, filespace, gid);
+ write_dataset(memspace, filespace, gid);
- if( counter < GROUP_DEPTH )
+ if( counter < GROUP_DEPTH )
create_group_recursive(memspace, filespace, child_gid, counter+1);
H5Gclose(child_gid);
}
-/*
+/*
* This function is to verify the data from multiple group testing. It opens
- * every dataset in every group and check their correctness.
+ * every dataset in every group and check their correctness.
*
* Changes: Updated function to use a dynamically calculated size,
* instead of the old SIZE #define. This should allow it
@@ -1022,22 +1022,22 @@ void multiple_group_read(void)
H5Sselect_hyperslab(memspace, H5S_SELECT_SET, chunk_origin, chunk_dims,
count, chunk_dims);
filespace = H5Screate_simple(DIM, file_dims, NULL);
- H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin, chunk_dims,
+ H5Sselect_hyperslab(filespace, H5S_SELECT_SET, chunk_origin, chunk_dims,
count, chunk_dims);
-
+
/* open every group under root group. */
for(m=0; m<ngroups; m++) {
sprintf(gname, "group%d", m);
gid = H5Gopen(fid, gname);
VRFY((gid > 0), gname);
-
+
/* check the data. */
if(m != 0)
if( (error_num = read_dataset(memspace, filespace, gid))>0)
nerrors += error_num;
-
- /* check attribute.*/
- error_num = 0;
+
+ /* check attribute.*/
+ error_num = 0;
if( (error_num = read_attribute(gid, is_group, m))>0 )
nerrors += error_num;
@@ -1061,8 +1061,8 @@ void multiple_group_read(void)
}
-/*
- * This function opens all the datasets in a certain, checks the data using
+/*
+ * This function opens all the datasets in a certain, checks the data using
* dataset_vrfy function.
*
* Changes: Updated function to use a dynamically calculated size,
@@ -1094,12 +1094,12 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
did = H5Dopen(gid, dname);
VRFY((did>0), dname);
- H5Dread(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
+ H5Dread(did, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT,
indata);
/* this is the original value */
for(i=0; i<size; i++)
- for(j=0; j<size; j++) {
+ for(j=0; j<size; j++) {
*outdata = n*1000 + mpi_rank;
outdata++;
}
@@ -1108,10 +1108,10 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
/* compare the original value(outdata) to the value in file(indata).*/
vrfy_errors = check_value(indata, outdata, size);
- /* check attribute.*/
+ /* check attribute.*/
if( (attr_errors = read_attribute(did, is_dset, n))>0 )
- vrfy_errors += attr_errors;
-
+ vrfy_errors += attr_errors;
+
H5Dclose(did);
}
@@ -1121,11 +1121,11 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
return vrfy_errors;
}
-/*
- * This recursive function opens all the groups in vertical direction and
+/*
+ * This recursive function opens all the groups in vertical direction and
* checks the data.
*/
-void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
+void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
int counter)
{
hid_t child_gid;
@@ -1134,7 +1134,7 @@ void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
#ifdef BARRIER_CHECKS
- if((counter+1) % 10)
+ if((counter+1) % 10)
MPI_Barrier(MPI_COMM_WORLD);
#endif /* BARRIER_CHECKS */
@@ -1152,7 +1152,7 @@ void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
/* Create and write attribute for a group or a dataset. For groups, attribute
* is a scalar datum; for dataset, it is a one-dimensional array.
- */
+ */
void write_attribute(hid_t obj_id, int this_type, int num)
{
hid_t sid, aid;
@@ -1161,7 +1161,7 @@ void write_attribute(hid_t obj_id, int this_type, int num)
char attr_name[32];
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
+
if(this_type == is_group) {
sprintf(attr_name, "Group Attribute %d", num);
sid = H5Screate(H5S_SCALAR);
@@ -1176,7 +1176,7 @@ void write_attribute(hid_t obj_id, int this_type, int num)
attr_data[i] = i;
sid = H5Screate_simple(dspace_rank, dspace_dims, NULL);
aid = H5Acreate(obj_id, attr_name, H5T_NATIVE_INT, sid, H5P_DEFAULT);
- H5Awrite(aid, H5T_NATIVE_INT, attr_data);
+ H5Awrite(aid, H5T_NATIVE_INT, attr_data);
H5Aclose(aid);
H5Sclose(sid);
}
@@ -1190,21 +1190,21 @@ int read_attribute(hid_t obj_id, int this_type, int num)
hsize_t group_block[2]={1,1}, dset_block[2]={1, 8};
int i, mpi_rank, in_num, in_data[8], out_data[8], vrfy_errors = 0;
char attr_name[32];
-
+
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
+
if(this_type == is_group) {
sprintf(attr_name, "Group Attribute %d", num);
aid = H5Aopen_name(obj_id, attr_name);
if(MAINPROCESS) {
H5Aread(aid, H5T_NATIVE_INT, &in_num);
- vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block,
+ vrfy_errors = dataset_vrfy(NULL, NULL, NULL, group_block,
&in_num, &num);
}
H5Aclose(aid);
}
else if(this_type == is_dset) {
- sprintf(attr_name, "Dataset Attribute %d", num);
+ sprintf(attr_name, "Dataset Attribute %d", num);
for(i=0; i<8; i++)
out_data[i] = i;
aid = H5Aopen_name(obj_id, attr_name);
@@ -1214,12 +1214,12 @@ int read_attribute(hid_t obj_id, int this_type, int num)
out_data);
}
H5Aclose(aid);
- }
-
+ }
+
return vrfy_errors;
}
-/* This functions compares the original data with the read-in data for its
+/* This functions compares the original data with the read-in data for its
* hyperslab part only by process ID.
*
* Changes: Modified function to use a passed in size parameter
@@ -1228,7 +1228,7 @@ int read_attribute(hid_t obj_id, int this_type, int num)
*
* JRM - 8/16/04
*/
-int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
+int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
{
int mpi_rank, mpi_size, err_num=0;
hsize_t i, j;
@@ -1246,7 +1246,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
for(j=chunk_origin[1]; j<(chunk_origin[1]+chunk_dims[1]); j++) {
if( *indata != *outdata )
if(err_num++ < 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, (unsigned long)j, *outdata, *indata);
+ 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, (unsigned long)j, *outdata, *indata);
}
if(err_num > MAX_ERR_REPORT && !VERBOSE_MED)
printf("[more errors ...]\n");
@@ -1264,14 +1264,14 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
* JRM - 8/11/04
*/
-void get_slab(hsize_t chunk_origin[],
- hsize_t chunk_dims[],
+void get_slab(hsize_t chunk_origin[],
+ hsize_t chunk_dims[],
hsize_t count[],
hsize_t file_dims[],
int size)
{
int mpi_rank, mpi_size;
-
+
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
@@ -1283,23 +1283,23 @@ void get_slab(hsize_t chunk_origin[],
chunk_dims[0] = size/mpi_size;
chunk_dims[1] = size;
}
- if(file_dims != NULL)
+ if(file_dims != NULL)
file_dims[0] = file_dims[1] = size;
- if(count != NULL)
+ if(count != NULL)
count[0] = count[1] = 1;
}
-/*
+/*
* This function is based on bug demonstration code provided by Thomas
- * Guignon (thomas.guignon@ifp.fr), and is intended to verify the
+ * Guignon (thomas.guignon@ifp.fr), and is intended to verify the
* correctness of my fix for that bug.
*
- * In essence, the bug appeared when at least one process attempted to
- * write a point selection -- for which collective I/O is not supported,
- * and at least one other attempted to write some other type of selection
- * for which collective I/O is supported.
+ * In essence, the bug appeared when at least one process attempted to
+ * write a point selection -- for which collective I/O is not supported,
+ * and at least one other attempted to write some other type of selection
+ * for which collective I/O is supported.
*
- * Since the processes did not compare notes before performing the I/O,
+ * Since the processes did not compare notes before performing the I/O,
* some would attempt collective I/O while others performed independent
* I/O. A hang resulted.
*
@@ -1317,7 +1317,7 @@ void io_mode_confusion(void)
/*
* HDF5 APIs definitions
*/
-
+
const int rank = 1;
const char *dataset_name = "IntArray";
@@ -1325,7 +1325,7 @@ void io_mode_confusion(void)
hid_t filespace, memspace; /* file and memory dataspace */
/* identifiers */
hsize_t dimsf[1]; /* dataset dimensions */
- int data[N] = {1}; /* pointer to data buffer to write */
+ int data[N] = {1}; /* pointer to data buffer to write */
hsize_t coord[N] = {0L,1L,2L,3L};
hsize_t start[1];
hsize_t stride[1];
@@ -1363,7 +1363,7 @@ void io_mode_confusion(void)
*/
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Setting up property list.\n",
+ HDfprintf(stdout, "%0d:%s: Setting up property list.\n",
mpi_rank, fcn_name);
plist_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -1426,7 +1426,7 @@ void io_mode_confusion(void)
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n",
+ HDfprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n",
mpi_rank, fcn_name);
memspace = H5Screate_simple(rank, dimsf, NULL);
@@ -1435,7 +1435,7 @@ void io_mode_confusion(void)
if( mpi_rank == 0 ) {
-
+
if ( verbose )
HDfprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n",
mpi_rank, fcn_name);
@@ -1453,19 +1453,19 @@ void io_mode_confusion(void)
status = H5Sselect_none(memspace);
VRFY(( status >= 0 ), "H5Sselect_none() failed");
-
+
}
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n",
+ HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n",
mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Calling H5Dget_space().\n",
+ HDfprintf(stdout, "%0d:%s: Calling H5Dget_space().\n",
mpi_rank, fcn_name);
filespace = H5Dget_space(dset_id);
@@ -1487,7 +1487,7 @@ void io_mode_confusion(void)
"%0d:%s: Calling H5Sselect_elements() -- set up hang?\n",
mpi_rank, fcn_name);
- status = H5Sselect_elements(filespace, H5S_SELECT_SET, N,
+ status = H5Sselect_elements(filespace, H5S_SELECT_SET, N,
(const hsize_t **)&coord);
VRFY(( status >= 0 ), "H5Sselect_elements() failed");
@@ -1508,7 +1508,7 @@ void io_mode_confusion(void)
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n",
+ HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n",
mpi_rank, fcn_name);
MPI_Barrier(MPI_COMM_WORLD);
@@ -1523,7 +1523,7 @@ void io_mode_confusion(void)
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n",
+ HDfprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n",
mpi_rank, fcn_name);
status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE);
@@ -1539,7 +1539,7 @@ void io_mode_confusion(void)
plist_id, data);
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n",
+ HDfprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n",
mpi_rank, fcn_name, status);
VRFY(( status >= 0 ), "H5Dwrite() failed");
@@ -1549,7 +1549,7 @@ void io_mode_confusion(void)
*/
if ( verbose )
- HDfprintf(stdout, "%0d:%s: Cleaning up from test.\n",
+ HDfprintf(stdout, "%0d:%s: Cleaning up from test.\n",
mpi_rank, fcn_name);
status = H5Dclose(dset_id);
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 7b7a96b..b98b3f0 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -99,7 +99,7 @@ test_mpio_overlap_writes(char *filename)
mrc = MPI_File_write_at(fh, mpi_off, buf, (int)stride, MPI_BYTE,
&mpi_stat);
VRFY((mrc==MPI_SUCCESS), "");
-
+
/* move the offset pointer to last byte written by all processes */
mpi_off += (mpi_size - 1 - mpi_rank) * stride;
@@ -116,7 +116,7 @@ test_mpio_overlap_writes(char *filename)
VRFY((mrc==MPI_SUCCESS), "MPI_FILE_CLOSE");
mrc = MPI_Comm_free(&comm);
VRFY((mrc==MPI_SUCCESS), "MPI_Comm_free");
-
+
/* sync with the other waiting processes */
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc==MPI_SUCCESS), "Sync after writes");
@@ -181,10 +181,10 @@ test_mpio_overlap_writes(char *filename)
* Print any failure as information only, not as an error so that this
* won't abort the remaining test or other separated tests.
*
- * Test if MPIO can write file from under 2GB to over 2GB and then
+ * Test if MPIO can write file from under 2GB to over 2GB and then
* from under 4GB to over 4GB.
* Each process writes 1MB in round robin fashion.
- * Then reads the file back in by reverse order, that is process 0
+ * Then reads the file back in by reverse order, that is process 0
* reads the data of process n-1 and vice versa.
*/
static int
@@ -321,7 +321,7 @@ test_mpio_gb_file(char *filename)
/* close file and free the communicator */
mrc = MPI_File_close(&fh);
VRFY((mrc==MPI_SUCCESS), "MPI_FILE_CLOSE");
-
+
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc==MPI_SUCCESS), "Sync after writes");
@@ -419,7 +419,7 @@ test_mpio_1wMr(char *filename, int special_request)
int mpi_err;
unsigned char writedata[DIMSIZE], readdata[DIMSIZE];
unsigned char expect_val;
- int i, irank;
+ int i, irank;
int nerrs = 0; /* number of errors */
int atomicity;
MPI_Offset mpi_off;
diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c
index 0c92c46..187ef06 100644
--- a/testpar/t_ph5basic.c
+++ b/testpar/t_ph5basic.c
@@ -88,7 +88,7 @@ test_fapl_mpio_dup(void)
VRFY((ret >= 0), "");
/* Case 1:
- * Free the created communicator and INFO object.
+ * Free the created communicator and INFO object.
* Check if the access property list is still valid and can return
* valid communicator and INFO object.
*/
@@ -253,7 +253,7 @@ test_fapl_mpiposix_dup(void)
VRFY((ret >= 0), "");
/* Case 1:
- * Free the created communicator object.
+ * Free the created communicator object.
* Check if the access property list is still valid and can return
* valid communicator object.
*/
@@ -308,7 +308,7 @@ test_fapl_mpiposix_dup(void)
VRFY((mpi_rank_tmp==mpi_rank), "MPI_Comm_rank");
/* Case 3:
- * Close the property list and verify the retrieved communicator
+ * Close the property list and verify the retrieved communicator
* object is still valid.
*/
H5Pclose(acc_pl);
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 26f25bf..a632823 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -13,7 +13,7 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
+/*
This program will test irregular hyperslab selections with collective write and read.
The way to test whether collective write and read works is to use independent IO
output to verify the collective output.
@@ -24,15 +24,15 @@
2) We will read two datasets with the same hyperslab selection settings,
1. independent read to read independent output,
independent read to read collecive output,
- Compare the result,
+ Compare the result,
If the result is the same, then collective write succeeds.
2. collective read to read independent output,
independent read to read independent output,
Compare the result,
If the result is the same, then collective read succeeds.
- */
-
+ */
+
#include "hdf5.h"
#include "H5private.h"
#include "testphdf5.h"
@@ -45,7 +45,7 @@ static void coll_read_test(int chunk_factor);
/*-------------------------------------------------------------------------
* Function: coll_irregular_cont_write
*
- * Purpose: Test the collectively irregular hyperslab write in contiguous
+ * Purpose: Test the collectively irregular hyperslab write in contiguous
storage
*
* Return: Success: 0
@@ -72,7 +72,7 @@ coll_irregular_cont_write(void)
/*-------------------------------------------------------------------------
* Function: coll_irregular_cont_read
*
- * Purpose: Test the collectively irregular hyperslab read in contiguous
+ * Purpose: Test the collectively irregular hyperslab read in contiguous
storage
*
* Return: Success: 0
@@ -98,7 +98,7 @@ coll_irregular_cont_read(void)
/*-------------------------------------------------------------------------
* Function: coll_irregular_simple_chunk_write
*
- * Purpose: Test the collectively irregular hyperslab write in chunk
+ * Purpose: Test the collectively irregular hyperslab write in chunk
storage(1 chunk)
*
* Return: Success: 0
@@ -125,7 +125,7 @@ coll_irregular_simple_chunk_write(void)
/*-------------------------------------------------------------------------
* Function: coll_irregular_simple_chunk_read
*
- * Purpose: Test the collectively irregular hyperslab read in chunk
+ * Purpose: Test the collectively irregular hyperslab read in chunk
storage(1 chunk)
*
* Return: Success: 0
@@ -150,7 +150,7 @@ coll_irregular_simple_chunk_read(void)
/*-------------------------------------------------------------------------
* Function: coll_irregular_complex_chunk_write
*
- * Purpose: Test the collectively irregular hyperslab write in chunk
+ * Purpose: Test the collectively irregular hyperslab write in chunk
storage(4 chunks)
*
* Return: Success: 0
@@ -177,7 +177,7 @@ coll_irregular_complex_chunk_write(void)
/*-------------------------------------------------------------------------
* Function: coll_irregular_complex_chunk_read
*
- * Purpose: Test the collectively irregular hyperslab read in chunk
+ * Purpose: Test the collectively irregular hyperslab read in chunk
storage(1 chunk)
*
* Return: Success: 0
@@ -209,12 +209,12 @@ void coll_write_test(int chunk_factor)
hid_t mspaceid1, mspaceid, fspaceid,fspaceid1; /* Dataspace identifiers */
hid_t plist; /* Dataset property list identifier */
- hsize_t mdim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
- (in memory) */
-
- hsize_t fsdim[] = {FSPACE_DIM1, FSPACE_DIM2};
+ hsize_t mdim1[] = {MSPACE1_DIM}; /* Dimension size of the first dataset
+ (in memory) */
+
+ hsize_t fsdim[] = {FSPACE_DIM1, FSPACE_DIM2};
/* Dimension sizes of the dataset (on disk) */
- hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
+ hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
dataset in memory when we
read selection from the
dataset on the disk */
@@ -229,8 +229,8 @@ void coll_write_test(int chunk_factor)
unsigned i,j;
int fillvalue = 0; /* Fill value for the dataset */
- int matrix_out[MSPACE_DIM1][MSPACE_DIM2];
- int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
+ int matrix_out[MSPACE_DIM1][MSPACE_DIM2];
+ int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
dataset */
int vector[MSPACE1_DIM];
@@ -245,7 +245,7 @@ void coll_write_test(int chunk_factor)
/* Obtain file name */
- filename = GetTestParameters();
+ filename = GetTestParameters();
/*
* Buffers' initialization.
@@ -254,11 +254,11 @@ void coll_write_test(int chunk_factor)
for (i = 1; i < MSPACE1_DIM - 1; i++) vector[i] = i;
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
- VRFY((acc_plist >= 0),"");
+ VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
-
+
/*
* Create a file.
*/
@@ -271,7 +271,7 @@ void coll_write_test(int chunk_factor)
plist = H5Pcreate(H5P_DATASET_CREATE);
VRFY((acc_plist >= 0),"");
- ret = H5Pset_fill_value(plist, H5T_NATIVE_INT, &fillvalue);
+ ret = H5Pset_fill_value(plist, H5T_NATIVE_INT, &fillvalue);
VRFY((ret >= 0),"Fill value creation property list succeeded");
if(chunk_factor != 0) {
@@ -281,7 +281,7 @@ void coll_write_test(int chunk_factor)
ret = H5Pset_chunk(plist, 2, chunk_dims);
VRFY((ret >= 0),"chunk creation property list succeeded");
}
- /*
+ /*
* Create dataspace for the dataset in the file.
*/
fspaceid = H5Screate_simple(FSPACE_RANK, fsdim, NULL);
@@ -297,35 +297,35 @@ void coll_write_test(int chunk_factor)
dataseti = H5Dcreate(file, "independ_write", H5T_NATIVE_INT, fspaceid, plist);
VRFY((dataseti >= 0),"dataset created succeeded");
/*
- * Select hyperslab for the dataset in the file, using 3x2 blocks,
+ * Select hyperslab for the dataset in the file, using 3x2 blocks,
* (4,3) stride and (1,4) count starting at the position (0,1)
for the first selection
*/
- start[0] = FHSTART0;
+ start[0] = FHSTART0;
start[1] = FHSTART1+mpi_rank*FHSTRIDE1*FHCOUNT1/mpi_size;
- stride[0] = FHSTRIDE0;
+ stride[0] = FHSTRIDE0;
stride[1] = FHSTRIDE1;
- count[0] = FHCOUNT0;
- count[1] = FHCOUNT1/mpi_size;
- block[0] = FHBLOCK0;
+ count[0] = FHCOUNT0;
+ count[1] = FHCOUNT1/mpi_size;
+ block[0] = FHBLOCK0;
block[1] = FHBLOCK1;
ret = H5Sselect_hyperslab(fspaceid, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
/*
- * Select hyperslab for the dataset in the file, using 3x2*4 blocks,
+ * Select hyperslab for the dataset in the file, using 3x2*4 blocks,
* stride 1 and (1,1) count starting at the position (4,0).
*/
- start[0] = SHSTART0;
+ start[0] = SHSTART0;
start[1] = SHSTART1+SHCOUNT1*SHBLOCK1*mpi_rank/mpi_size;
- stride[0] = SHSTRIDE0;
+ stride[0] = SHSTRIDE0;
stride[1] = SHSTRIDE1;
- count[0] = SHCOUNT0;
- count[1] = SHCOUNT1;
- block[0] = SHBLOCK0;
+ count[0] = SHCOUNT0;
+ count[1] = SHCOUNT1;
+ block[0] = SHBLOCK0;
block[1] = SHBLOCK1/mpi_size;
ret = H5Sselect_hyperslab(fspaceid, H5S_SELECT_OR, start, stride, count, block);
@@ -338,7 +338,7 @@ void coll_write_test(int chunk_factor)
VRFY((mspaceid1 >= 0),"memory dataspace created succeeded");
/*
- * Select hyperslab.
+ * Select hyperslab.
* We will use 48 elements of the vector buffer starting at the second element.
* Selected elements are 1 2 3 . . . 48
*/
@@ -350,26 +350,26 @@ void coll_write_test(int chunk_factor)
ret = H5Sselect_hyperslab(mspaceid1, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
-
+
ret = H5Dwrite(dataseti, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);
VRFY((ret >= 0),"dataset independent write succeed");
xfer_plist = H5Pcreate(H5P_DATASET_XFER);
- VRFY((xfer_plist >= 0),"");
+ VRFY((xfer_plist >= 0),"");
ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
- VRFY((ret >= 0),"MPIO data transfer property list succeed");
+ VRFY((ret >= 0),"MPIO data transfer property list succeed");
ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, xfer_plist, vector);
/*ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);*/
- VRFY((ret >= 0),"dataset collective write succeed");
+ VRFY((ret >= 0),"dataset collective write succeed");
ret = H5Sclose(mspaceid1);
VRFY((ret >= 0),"");
- ret = H5Sclose(fspaceid);
+ ret = H5Sclose(fspaceid);
VRFY((ret >= 0),"");
-
+
/*
* Close dataset.
*/
@@ -377,7 +377,7 @@ void coll_write_test(int chunk_factor)
VRFY((ret >= 0),"");
ret = H5Dclose(dataseti);
VRFY((ret >= 0),"");
-
+
/*
* Close the file.
*/
@@ -401,11 +401,11 @@ void coll_write_test(int chunk_factor)
/*** For testing collective hyperslab selection write ***/
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
- VRFY((acc_plist >= 0),"");
+ VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
-
+
file = H5Fopen(filename, H5F_ACC_RDONLY, acc_plist);
VRFY((file >= 0),"H5Fopen succeeded");
@@ -416,8 +416,8 @@ void coll_write_test(int chunk_factor)
VRFY((datasetc >= 0),"H5Dopen succeeded");
dataseti = H5Dopen(file,"independ_write");
VRFY((dataseti >= 0),"H5Dopen succeeded");
-
- /*
+
+ /*
* Get dataspace of the open dataset.
*/
fspaceid = H5Dget_space(datasetc);
@@ -427,16 +427,16 @@ void coll_write_test(int chunk_factor)
VRFY((fspaceid1 >= 0),"file dataspace obtained succeeded");
-
- start[0] = RFFHSTART0;
+
+ start[0] = RFFHSTART0;
start[1] = RFFHSTART1+mpi_rank*RFFHCOUNT1/mpi_size;
- block[0] = RFFHBLOCK0;
+ block[0] = RFFHBLOCK0;
block[1] = RFFHBLOCK1;
- stride[0] = RFFHSTRIDE0;
+ stride[0] = RFFHSTRIDE0;
stride[1] = RFFHSTRIDE1;
- count[0] = RFFHCOUNT0;
- count[1] = RFFHCOUNT1/mpi_size;
-
+ count[0] = RFFHCOUNT0;
+ count[1] = RFFHCOUNT1/mpi_size;
+
ret = H5Sselect_hyperslab(fspaceid, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
@@ -445,13 +445,13 @@ void coll_write_test(int chunk_factor)
/*start[0] = RFSHSTART0+mpi_rank*RFSHCOUNT1/mpi_size; */
start[0] = RFSHSTART0;
- start[1] = RFSHSTART1+RFSHCOUNT1*mpi_rank/mpi_size;
- block[0] = RFSHBLOCK0;
- block[1] = RFSHBLOCK1;
- stride[0] = RFSHSTRIDE0;
+ start[1] = RFSHSTART1+RFSHCOUNT1*mpi_rank/mpi_size;
+ block[0] = RFSHBLOCK0;
+ block[1] = RFSHBLOCK1;
+ stride[0] = RFSHSTRIDE0;
stride[1] = RFSHSTRIDE0;
- count[0] = RFSHCOUNT0;
- count[1] = RFSHCOUNT1/mpi_size;
+ count[0] = RFSHCOUNT0;
+ count[1] = RFSHCOUNT1/mpi_size;
ret = H5Sselect_hyperslab(fspaceid, H5S_SELECT_OR, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
ret = H5Sselect_hyperslab(fspaceid1, H5S_SELECT_OR, start, stride, count, block);
@@ -463,60 +463,60 @@ void coll_write_test(int chunk_factor)
*/
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
- /*
+ /*
* Select two hyperslabs in memory. Hyperslabs has the same
* size and shape as the selected hyperslabs for the file dataspace.
*/
- start[0] = RMFHSTART0;
+ start[0] = RMFHSTART0;
start[1] = RMFHSTART1+mpi_rank*RMFHCOUNT1/mpi_size;
- block[0] = RMFHBLOCK0;
+ block[0] = RMFHBLOCK0;
block[1] = RMFHBLOCK1;
- stride[0] = RMFHSTRIDE0;
+ stride[0] = RMFHSTRIDE0;
stride[1] = RMFHSTRIDE1;
- count[0] = RMFHCOUNT0;
- count[1] = RMFHCOUNT1/mpi_size;
+ count[0] = RMFHCOUNT0;
+ count[1] = RMFHCOUNT1/mpi_size;
ret = H5Sselect_hyperslab(mspaceid, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
- start[0] = RMSHSTART0;
+ start[0] = RMSHSTART0;
start[1] = RMSHSTART1+mpi_rank*RMSHCOUNT1/mpi_size;
- block[0] = RMSHBLOCK0;
+ block[0] = RMSHBLOCK0;
block[1] = RMSHBLOCK1;
- stride[0] = RMSHSTRIDE0;
+ stride[0] = RMSHSTRIDE0;
stride[1] = RMSHSTRIDE1;
- count[0] = RMSHCOUNT0;
- count[1] = RMSHCOUNT1/mpi_size;
+ count[0] = RMSHCOUNT0;
+ count[1] = RMSHCOUNT1/mpi_size;
+
-
ret = H5Sselect_hyperslab(mspaceid, H5S_SELECT_OR, start, stride, count, block);
- VRFY((ret >= 0),"hyperslab selection succeeded");
+ VRFY((ret >= 0),"hyperslab selection succeeded");
- /*
+ /*
* Initialize data buffer.
*/
for (i = 0; i < MSPACE_DIM1; i++) {
for (j = 0; j < MSPACE_DIM2; j++)
matrix_out[i][j] = 0;
}
-
+
/*
* Read data back to the buffer matrix_out.
*/
ret = H5Dread(datasetc, H5T_NATIVE_INT, mspaceid, fspaceid,
H5P_DEFAULT, matrix_out);
- VRFY((ret >= 0),"H5D independent read succeed");
+ VRFY((ret >= 0),"H5D independent read succeed");
+
-
for (i = 0; i < MSPACE_DIM1; i++) {
for (j = 0; j < MSPACE_DIM2; j++)
matrix_out1[i][j] = 0;
}
ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid,
H5P_DEFAULT, matrix_out1);
- VRFY((ret >= 0),"H5D independent read succeed");
+ VRFY((ret >= 0),"H5D independent read succeed");
ret = 0;
for (i = 0; i < MSPACE_DIM1; i++){
@@ -525,37 +525,37 @@ void coll_write_test(int chunk_factor)
if(ret < 0) break;
}
}
- VRFY((ret >= 0),"H5D contiguous irregular collective write succeed");
-
+ VRFY((ret >= 0),"H5D contiguous irregular collective write succeed");
+
/*
* Close memory file and memory dataspaces.
- */
+ */
ret = H5Sclose(mspaceid);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
ret = H5Sclose(fspaceid);
- VRFY((ret >= 0),"");
-
+ VRFY((ret >= 0),"");
+
/*
* Close dataset.
- */
+ */
ret = H5Dclose(dataseti);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
ret = H5Dclose(datasetc);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
/*
* Close property list
*/
ret = H5Pclose(acc_plist);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
+
-
/*
* Close the file.
- */
+ */
ret = H5Fclose(file);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
return ;
}
@@ -568,9 +568,9 @@ void coll_read_test(int chunk_factor)
hid_t acc_plist,xfer_plist;
hid_t file, dataseti; /* File and dataset identifiers */
hid_t mspaceid, fspaceid1; /* Dataspace identifiers */
-
+
/* Dimension sizes of the dataset (on disk) */
- hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
+ hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
dataset in memory when we
read selection from the
dataset on the disk */
@@ -583,8 +583,8 @@ void coll_read_test(int chunk_factor)
herr_t ret;
unsigned i,j;
- int matrix_out[MSPACE_DIM1][MSPACE_DIM2];
- int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
+ int matrix_out[MSPACE_DIM1][MSPACE_DIM2];
+ int matrix_out1[MSPACE_DIM1][MSPACE_DIM2]; /* Buffer to read from the
dataset */
int mpi_size,mpi_rank;
@@ -598,7 +598,7 @@ void coll_read_test(int chunk_factor)
/* Obtain file name */
- filename = GetTestParameters();
+ filename = GetTestParameters();
/*
* Buffers' initialization.
@@ -611,11 +611,11 @@ void coll_read_test(int chunk_factor)
/*** For testing collective hyperslab selection read ***/
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
- VRFY((acc_plist >= 0),"");
+ VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
-
+
file = H5Fopen(filename, H5F_ACC_RDONLY, acc_plist);
VRFY((file >= 0),"H5Fopen succeeded");
@@ -624,34 +624,34 @@ void coll_read_test(int chunk_factor)
*/
dataseti = H5Dopen(file,"independ_write");
VRFY((dataseti >= 0),"H5Dopen succeeded");
-
- /*
+
+ /*
* Get dataspace of the open dataset.
*/
fspaceid1 = H5Dget_space(dataseti);
VRFY((fspaceid1 >= 0),"file dataspace obtained succeeded");
- start[0] = RFFHSTART0;
+ start[0] = RFFHSTART0;
start[1] = RFFHSTART1+mpi_rank*RFFHCOUNT1/mpi_size;
- block[0] = RFFHBLOCK0;
+ block[0] = RFFHBLOCK0;
block[1] = RFFHBLOCK1;
- stride[0] = RFFHSTRIDE0;
+ stride[0] = RFFHSTRIDE0;
stride[1] = RFFHSTRIDE1;
- count[0] = RFFHCOUNT0;
- count[1] = RFFHCOUNT1/mpi_size;
-
+ count[0] = RFFHCOUNT0;
+ count[1] = RFFHCOUNT1/mpi_size;
+
ret = H5Sselect_hyperslab(fspaceid1, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
start[0] = RFSHSTART0;
- start[1] = RFSHSTART1+RFSHCOUNT1*mpi_rank/mpi_size;
- block[0] = RFSHBLOCK0;
- block[1] = RFSHBLOCK1;
- stride[0] = RFSHSTRIDE0;
+ start[1] = RFSHSTART1+RFSHCOUNT1*mpi_rank/mpi_size;
+ block[0] = RFSHBLOCK0;
+ block[1] = RFSHBLOCK1;
+ stride[0] = RFSHSTRIDE0;
stride[1] = RFSHSTRIDE0;
- count[0] = RFSHCOUNT0;
+ count[0] = RFSHCOUNT0;
count[1] = RFSHCOUNT1/mpi_size;
ret = H5Sselect_hyperslab(fspaceid1, H5S_SELECT_OR, start, stride, count, block);
@@ -663,58 +663,58 @@ void coll_read_test(int chunk_factor)
*/
mspaceid = H5Screate_simple(MSPACE_RANK, mdim, NULL);
- /*
+ /*
* Select two hyperslabs in memory. Hyperslabs has the same
* size and shape as the selected hyperslabs for the file dataspace.
*/
- start[0] = RMFHSTART0;
+ start[0] = RMFHSTART0;
start[1] = RMFHSTART1+mpi_rank*RMFHCOUNT1/mpi_size;
- block[0] = RMFHBLOCK0;
+ block[0] = RMFHBLOCK0;
block[1] = RMFHBLOCK1;
- stride[0] = RMFHSTRIDE0;
+ stride[0] = RMFHSTRIDE0;
stride[1] = RMFHSTRIDE1;
- count[0] = RMFHCOUNT0;
- count[1] = RMFHCOUNT1/mpi_size;
+ count[0] = RMFHCOUNT0;
+ count[1] = RMFHCOUNT1/mpi_size;
ret = H5Sselect_hyperslab(mspaceid, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
- start[0] = RMSHSTART0;
+ start[0] = RMSHSTART0;
start[1] = RMSHSTART1+mpi_rank*RMSHCOUNT1/mpi_size;
- block[0] = RMSHBLOCK0;
+ block[0] = RMSHBLOCK0;
block[1] = RMSHBLOCK1;
- stride[0] = RMSHSTRIDE0;
+ stride[0] = RMSHSTRIDE0;
stride[1] = RMSHSTRIDE1;
- count[0] = RMSHCOUNT0;
- count[1] = RMSHCOUNT1/mpi_size;
+ count[0] = RMSHCOUNT0;
+ count[1] = RMSHCOUNT1/mpi_size;
ret = H5Sselect_hyperslab(mspaceid, H5S_SELECT_OR, start, stride, count, block);
- VRFY((ret >= 0),"hyperslab selection succeeded");
+ VRFY((ret >= 0),"hyperslab selection succeeded");
- /*
+ /*
* Initialize data buffer.
*/
for (i = 0; i < MSPACE_DIM1; i++) {
for (j = 0; j < MSPACE_DIM2; j++)
matrix_out[i][j] = 0;
}
-
+
/*
* Read data back to the buffer matrix_out.
*/
xfer_plist = H5Pcreate(H5P_DATASET_XFER);
- VRFY((xfer_plist >= 0),"");
+ VRFY((xfer_plist >= 0),"");
ret = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
- VRFY((ret >= 0),"MPIO data transfer property list succeed");
+ VRFY((ret >= 0),"MPIO data transfer property list succeed");
ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid1,
xfer_plist, matrix_out);
- VRFY((ret >= 0),"H5D collecive read succeed");
+ VRFY((ret >= 0),"H5D collecive read succeed");
ret = H5Pclose(xfer_plist);
- VRFY((ret >= 0),"");
-
+ VRFY((ret >= 0),"");
+
for (i = 0; i < MSPACE_DIM1; i++) {
for (j = 0; j < MSPACE_DIM2; j++)
matrix_out1[i][j] = 0;
@@ -722,7 +722,7 @@ void coll_read_test(int chunk_factor)
ret = H5Dread(dataseti, H5T_NATIVE_INT, mspaceid, fspaceid1,
H5P_DEFAULT, matrix_out1);
- VRFY((ret >= 0),"H5D independent read succeed");
+ VRFY((ret >= 0),"H5D independent read succeed");
ret = 0;
for (i = 0; i < MSPACE_DIM1; i++){
for (j = 0; j < MSPACE_DIM2; j++){
@@ -730,33 +730,33 @@ void coll_read_test(int chunk_factor)
if(ret < 0) break;
}
}
- VRFY((ret >= 0),"H5D contiguous irregular collective read succeed");
+ VRFY((ret >= 0),"H5D contiguous irregular collective read succeed");
/*
* Close memory file and memory dataspaces.
- */
+ */
ret = H5Sclose(mspaceid);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
ret = H5Sclose(fspaceid1);
- VRFY((ret >= 0),"");
-
+ VRFY((ret >= 0),"");
+
/*
* Close dataset.
- */
+ */
ret = H5Dclose(dataseti);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
/*
* Close property list
*/
ret = H5Pclose(acc_plist);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
+
-
/*
* Close the file.
- */
+ */
ret = H5Fclose(file);
- VRFY((ret >= 0),"");
+ VRFY((ret >= 0),"");
return ;
}
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index e3d2b24..6786032 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -70,7 +70,7 @@ void pause_proc(void)
/* mpi variables */
int mpi_size, mpi_rank;
- int mpi_namelen;
+ int mpi_namelen;
char mpi_name[MPI_MAX_PROCESSOR_NAME];
pid = getpid();
@@ -113,7 +113,7 @@ usage(void)
printf("\t-m<n_datasets>"
"\tset number of datasets for the multiple dataset test\n");
printf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
+ "\tset number of groups for the multiple group test\n");
printf("\t-f <prefix>\tfilename prefix\n");
printf("\t-2\t\tuse Split-file together with MPIO\n");
printf("\t-p\t\tuse combo MPI-POSIX driver\n");
@@ -269,7 +269,7 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type,
if (l_facc_type == FACC_MPIO){
/* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(ret_pl, comm, info);
+ ret = H5Pset_fapl_mpio(ret_pl, comm, info);
VRFY((ret >= 0), "");
return(ret_pl);
}
@@ -280,7 +280,7 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type,
mpio_pl = H5Pcreate (H5P_FILE_ACCESS);
VRFY((mpio_pl >= 0), "");
/* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
+ ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
VRFY((ret >= 0), "");
/* setup file access template */
@@ -357,66 +357,66 @@ int main(int argc, char **argv)
TestInit(argv[0], usage, parse_options);
/* Tests are generally arranged from least to most complexity... */
- AddTest("mpiodup", test_fapl_mpio_dup, NULL,
+ AddTest("mpiodup", test_fapl_mpio_dup, NULL,
"fapl_mpio duplicate", NULL);
- AddTest("posixdup", test_fapl_mpiposix_dup, NULL,
+ AddTest("posixdup", test_fapl_mpiposix_dup, NULL,
"fapl_mpiposix duplicate", NULL);
- AddTest("split", test_split_comm_access, NULL,
+ AddTest("split", test_split_comm_access, NULL,
"dataset using split communicators", PARATESTFILE);
- AddTest("idsetw", dataset_writeInd, NULL,
+ AddTest("idsetw", dataset_writeInd, NULL,
"dataset independent write", PARATESTFILE);
- AddTest("idsetr", dataset_readInd, NULL,
+ AddTest("idsetr", dataset_readInd, NULL,
"dataset independent read", PARATESTFILE);
- AddTest("cdsetw", dataset_writeAll, NULL,
+ AddTest("cdsetw", dataset_writeAll, NULL,
"dataset collective write", PARATESTFILE);
- AddTest("cdsetr", dataset_readAll, NULL,
+ AddTest("cdsetr", dataset_readAll, NULL,
"dataset collective read", PARATESTFILE);
- AddTest("eidsetw", extend_writeInd, NULL,
+ AddTest("eidsetw", extend_writeInd, NULL,
"extendible dataset independent write", PARATESTFILE);
- AddTest("eidsetr", extend_readInd, NULL,
+ AddTest("eidsetr", extend_readInd, NULL,
"extendible dataset independent read", PARATESTFILE);
- AddTest("ecdsetw", extend_writeAll, NULL,
+ AddTest("ecdsetw", extend_writeAll, NULL,
"extendible dataset collective write", PARATESTFILE);
- AddTest("ecdsetr", extend_readAll, NULL,
+ AddTest("ecdsetr", extend_readAll, NULL,
"extendible dataset collective read", PARATESTFILE);
- AddTest("eidsetw2", extend_writeInd2, NULL,
+ AddTest("eidsetw2", extend_writeInd2, NULL,
"extendible dataset independent write #2", PARATESTFILE);
#ifdef H5_HAVE_FILTER_DEFLATE
- AddTest("cmpdsetr", compress_readAll, NULL,
+ AddTest("cmpdsetr", compress_readAll, NULL,
"compressed dataset collective read", PARATESTFILE);
#endif /* H5_HAVE_FILTER_DEFLATE */
ndsets_params.name = PARATESTFILE;
ndsets_params.count = ndatasets;
- AddTest("ndsetw", multiple_dset_write, NULL,
+ AddTest("ndsetw", multiple_dset_write, NULL,
"multiple datasets write", &ndsets_params);
ngroups_params.name = PARATESTFILE;
ngroups_params.count = ngroups;
- AddTest("ngrpw", multiple_group_write, NULL,
+ AddTest("ngrpw", multiple_group_write, NULL,
"multiple groups write", &ngroups_params);
- AddTest("ngrpr", multiple_group_read, NULL,
+ AddTest("ngrpr", multiple_group_read, NULL,
"multiple groups read", &ngroups_params);
- AddTest("compact", compact_dataset, NULL,
+ AddTest("compact", compact_dataset, NULL,
"compact dataset test", PARATESTFILE);
collngroups_params.name = PARATESTFILE;
collngroups_params.count = ngroups;
- AddTest("cngrpw", collective_group_write, NULL,
+ AddTest("cngrpw", collective_group_write, NULL,
"collective group and dataset write", &collngroups_params);
- AddTest("ingrpr", independent_group_read, NULL,
+ AddTest("ingrpr", independent_group_read, NULL,
"independent group and dataset read", &collngroups_params);
/* By default, do not run big dataset. */
- AddTest("-bigdset", big_dataset, NULL,
+ AddTest("-bigdset", big_dataset, NULL,
"big dataset test", PARATESTFILE);
- AddTest("fill", dataset_fillvalue, NULL,
+ AddTest("fill", dataset_fillvalue, NULL,
"dataset fill value", PARATESTFILE);
if(mpi_size > 64) {
@@ -439,7 +439,7 @@ int main(int argc, char **argv)
"collective to independent chunk io",PARATESTFILE);
}
-#ifdef KYANG
+#ifdef KYANG
AddTest("ccontw",coll_irregular_cont_write,NULL,
"collective irregular contiguous write",PARATESTFILE);
AddTest("ccontr",coll_irregular_cont_read,NULL,
@@ -460,8 +460,8 @@ int main(int argc, char **argv)
io_mode_confusion_params.name = PARATESTFILE;
io_mode_confusion_params.count = 0; /* value not used */
- AddTest("I/Omodeconf", io_mode_confusion, NULL,
- "I/O mode confusion test -- hangs quickly on failure",
+ AddTest("I/Omodeconf", io_mode_confusion, NULL,
+ "I/O mode confusion test -- hangs quickly on failure",
&io_mode_confusion_params);
/* Display testing information */
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 9121ef3..a71e37d 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -122,94 +122,94 @@
/*Constants for MPI derived data type generated from span tree */
-#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
-#define MSPACE1_DIM 19000 /* Dataset size in memory */
-#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
-#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */
-#define FSPACE_DIM2 2400 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
-#define MSPACE_RANK 2
-#define MSPACE_DIM1 9
-#define MSPACE_DIM2 2400
-#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/
-#define FHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
-#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/
-#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/
-#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
-#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/
-#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/
-#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/
-
-#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/
-#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/
-#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
-#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
-#define SHBLOCK1 512 /* Block of the second dimension of the first hyperslab selection*/
-#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/
-#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
-
-#define MHCOUNT0 4608 /* Count of the first dimension of the first hyperslab selection*/
-#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
-#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
-
-
-
-#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RFFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
-#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
-#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
-#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
-#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
-#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/
-
-
-#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RFSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
-#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
-#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
-#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
-#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/
-#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/
-
-
-#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RMFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
-#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
-#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
-#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
-#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/
-#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
-
-#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RMSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
-#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
-#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
-#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
-#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
-#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
-#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/
-
-
-#define NPOINTS 4 /* Number of points that will be selected
- and overwritten */
+#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
+#define MSPACE1_DIM 19000 /* Dataset size in memory */
+#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
+#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */
+#define FSPACE_DIM2 2400 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
+#define MSPACE_RANK 2
+#define MSPACE_DIM1 9
+#define MSPACE_DIM2 2400
+#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/
+#define FHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/
+#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/
+#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
+#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/
+#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/
+#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/
+
+#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/
+#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/
+#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
+#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
+#define SHBLOCK1 512 /* Block of the second dimension of the first hyperslab selection*/
+#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/
+#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
+
+#define MHCOUNT0 4608 /* Count of the first dimension of the first hyperslab selection*/
+#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
+#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
+
+
+
+#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
+#define RFFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
+#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
+#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
+#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
+#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/
+
+
+#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
+#define RFSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
+#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
+#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
+#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
+#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/
+#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/
+
+
+#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
+#define RMFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
+#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
+#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
+#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/
+#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
+
+#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
+#define RMSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
+#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
+#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
+#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
+#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/
+#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
+#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/
+
+
+#define NPOINTS 4 /* Number of points that will be selected
+ and overwritten */
/* Don't erase these lines, they are put here for debugging purposes */
/*
-#define MSPACE1_RANK 1
-#define MSPACE1_DIM 50
-#define MSPACE2_RANK 1
-#define MSPACE2_DIM 4
-#define FSPACE_RANK 2
-#define FSPACE_DIM1 8
-#define FSPACE_DIM2 12
-#define MSPACE_RANK 2
-#define MSPACE_DIM1 8
-#define MSPACE_DIM2 9
-#define NPOINTS 4
+#define MSPACE1_RANK 1
+#define MSPACE1_DIM 50
+#define MSPACE2_RANK 1
+#define MSPACE2_DIM 4
+#define FSPACE_RANK 2
+#define FSPACE_DIM1 8
+#define FSPACE_DIM2 12
+#define MSPACE_RANK 2
+#define MSPACE_DIM1 8
+#define MSPACE_DIM2 9
+#define NPOINTS 4
*/ /* end of debugging macro */