summaryrefslogtreecommitdiffstats
path: root/testpar/t_dset.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-09-24 00:45:45 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-09-24 00:45:45 (GMT)
commit2eae09de84219a7b8c046fa53fb9ec163ec493ba (patch)
tree688db2576711b2f83bc0506ca97234bf0a0791a5 /testpar/t_dset.c
parentc2e1541f9954d0b8244a4e500537cd7a08b589f5 (diff)
downloadhdf5-2eae09de84219a7b8c046fa53fb9ec163ec493ba.zip
hdf5-2eae09de84219a7b8c046fa53fb9ec163ec493ba.tar.gz
hdf5-2eae09de84219a7b8c046fa53fb9ec163ec493ba.tar.bz2
[svn-r2590] Purpose:
Bug fix Description: The old code was using count as the block size. The result was asking for a slab of count blocks, each of 1 element. The recent change in the hyperslab algorithm exposed this problem. (The old algorithm merge the count blocks back into 1 big block of count elements.) (This error was due to that the block argument was not in the very early version of hyperslab. Then it was not updated since it had been "working".) Solution: Added in the block argument to the setup and calculation of slab and its data. Also found a dumb error in the dataset_fill algorithm in which stride was used in the calculation. Not so for the cases of BYROW and BYCOL. Platforms tested: modi4 parallel, both -64 an -n32 modes.
Diffstat (limited to 'testpar/t_dset.c')
-rw-r--r--testpar/t_dset.c207
1 files changed, 111 insertions, 96 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index fcc7973..1bbc1a4 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -26,51 +26,59 @@
*/
void
slab_set(int mpi_rank, int mpi_size, hssize_t start[], hsize_t count[],
- hsize_t stride[], int mode)
+ hsize_t stride[], hsize_t block[], int mode)
{
switch (mode){
case BYROW:
/* Each process takes a slabs of rows. */
- stride[0] = 1;
- stride[1] = 1;
- count[0] = dim0/mpi_size;
- count[1] = dim1;
- start[0] = mpi_rank*count[0];
+ block[0] = dim0/mpi_size;
+ block[1] = dim1;
+ stride[0] = block[0];
+ stride[1] = block[1];
+ count[0] = 1;
+ count[1] = 1;
+ start[0] = mpi_rank*block[0];
start[1] = 0;
if (verbose) printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
- stride[0] = 1;
- stride[1] = 1;
- count[0] = dim0;
- count[1] = dim1/mpi_size;
+ block[0] = dim0;
+ block[1] = dim1/mpi_size;
+ stride[0] = block[0];
+ stride[1] = block[1];
+ count[0] = 1;
+ count[1] = 1;
start[0] = 0;
- start[1] = mpi_rank*count[1];
+ start[1] = mpi_rank*block[1];
#ifdef DISABLED
/* change the above macro to #ifndef if you want to test */
/* zero elements access. */
printf("set to size 0\n");
if (!(mpi_rank % 3))
- count[1]=0;
+ block[1]=0;
#endif
if (verbose) printf("slab_set BYCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
printf("unknown slab_set mode (%d)\n", mode);
- stride[0] = 1;
- stride[1] = 1;
- count[0] = dim0;
- count[1] = dim1;
+ block[0] = dim0;
+ block[1] = dim1;
+ stride[0] = block[0];
+ stride[1] = block[1];
+ count[0] = 1;
+ count[1] = 1;
start[0] = 0;
start[1] = 0;
if (verbose) printf("slab_set wholeset\n");
break;
}
if (verbose){
- printf("start[]=(%ld,%ld), count[]=(%lu,%lu), total datapoints=%lu\n",
- start[0], start[1], count[0], count[1], count[0]*count[1]);
+ printf("start[]=(%ld,%ld), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
+ start[0], start[1], count[0], count[1],
+ stride[0], stride[1], block[0], block[1],
+ block[0]*block[1]*count[0]*count[1]);
}
}
@@ -80,15 +88,15 @@ if (verbose){
* Assume dimension rank is 2 and data is stored contiguous.
*/
void
-dataset_fill(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset)
+dataset_fill(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
int i, j;
/* put some trivial data in the data_array */
- for (i=0; i < count[0]; i++){
- for (j=0; j < count[1]; j++){
- *dataptr = (i*stride[0]+start[0])*100 + (j*stride[1]+start[1]+1);
+ for (i=0; i < block[0]; i++){
+ for (j=0; j < block[1]; j++){
+ *dataptr = (i+start[0])*100 + (j+start[1]+1);
dataptr++;
}
}
@@ -98,22 +106,22 @@ dataset_fill(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dat
/*
* Print the content of the dataset.
*/
-void dataset_print(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE * dataset)
+void dataset_print(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
int i, j;
/* print the column heading */
printf("%-8s", "Cols:");
- for (j=0; j < count[1]; j++){
+ for (j=0; j < block[1]; j++){
printf("%3ld ", start[1]+j);
}
printf("\n");
/* print the slab data */
- for (i=0; i < count[0]; i++){
- printf("Row %2ld: ", i*stride[0]+start[0]);
- for (j=0; j < count[1]; j++){
+ for (i=0; i < block[0]; i++){
+ printf("Row %2ld: ", i+start[0]);
+ for (j=0; j < block[1]; j++){
printf("%03d ", *dataptr++);
}
printf("\n");
@@ -124,7 +132,7 @@ void dataset_print(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE
/*
* Print the content of the dataset.
*/
-int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *dataset, DATATYPE *original)
+int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original)
{
#define MAX_ERR_REPORT 10 /* Maximum number of errors reported */
DATATYPE *dataptr = dataset;
@@ -135,22 +143,23 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], DATATYPE *
/* print it if verbose */
if (verbose) {
printf("dataset_vrfy dumping:::\n");
- printf("start(%ld, %ld), count(%lu, %lu), stride(%lu, %lu)\n",
- start[0], start[1], count[0], count[1], stride[0], stride[1]);
+ printf("start(%ld, %ld), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ start[0], start[1], count[0], count[1],
+ stride[0], stride[1], block[0], block[1]);
printf("original values:\n");
- dataset_print(start, count, stride, original);
+ dataset_print(start, count, stride, block, original);
printf("compared values:\n");
- dataset_print(start, count, stride, dataset);
+ dataset_print(start, count, stride, block, dataset);
}
vrfyerrs = 0;
- for (i=0; i < count[0]; i++){
- for (j=0; j < count[1]; j++){
+ for (i=0; i < block[0]; i++){
+ for (j=0; j < block[1]; j++){
if (*dataset != *original){
if (vrfyerrs++ < MAX_ERR_REPORT || verbose){
printf("Dataset Verify failed at [%d][%d](row %d, col %d): expect %d, got %d\n",
i, j,
- (int)(i*stride[0]+start[0]), (int)(j*stride[1]+start[1]),
+ (int)(i+start[0]), (int)(j+start[1]),
*(original), *(dataset));
}
dataset++;
@@ -192,6 +201,7 @@ dataset_writeInd(char *filename)
hssize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int i, j;
@@ -260,20 +270,20 @@ dataset_writeInd(char *filename)
*/
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* put some trivial data in the data_array */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* write data independently */
@@ -318,7 +328,8 @@ dataset_readInd(char *filename)
DATATYPE *data_origin1 = NULL; /* expected data buffer */
hssize_t start[RANK]; /* for hyperslab setting */
- hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int i, j;
@@ -367,20 +378,20 @@ dataset_readInd(char *filename)
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill dataset with test data */
- dataset_fill(start, count, stride, data_origin1);
+ dataset_fill(start, count, stride, block, data_origin1);
/* read data independently */
ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
@@ -388,7 +399,7 @@ dataset_readInd(char *filename)
VRFY((ret >= 0), "");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
if (ret) nerrors++;
/* read data independently */
@@ -397,7 +408,7 @@ dataset_readInd(char *filename)
VRFY((ret >= 0), "");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
if (ret) nerrors++;
/* close dataset collectively */
@@ -447,6 +458,7 @@ dataset_writeAll(char *filename)
hssize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int mpi_size, mpi_rank;
@@ -512,24 +524,24 @@ dataset_writeAll(char *filename)
*/
/* Dataset1: each process takes a block of rows. */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill the local slab with some trivial data */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* set up the collective transfer properties list */
@@ -551,32 +563,32 @@ dataset_writeAll(char *filename)
H5Pclose(xfer_plist);
/* Dataset2: each process takes a block of columns. */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYCOL);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYCOL);
/* put some trivial data in the data_array */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill the local slab with some trivial data */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* set up the collective transfer properties list */
@@ -638,6 +650,7 @@ dataset_readAll(char *filename)
hssize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int mpi_size, mpi_rank;
@@ -693,24 +706,24 @@ dataset_readAll(char *filename)
*/
/* Dataset1: each process takes a block of columns. */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYCOL);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYCOL);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill dataset with test data */
- dataset_fill(start, count, stride, data_origin1);
+ dataset_fill(start, count, stride, block, data_origin1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_origin1);
+ dataset_print(start, count, stride, block, data_origin1);
}
/* set up the collective transfer properties list */
@@ -725,7 +738,7 @@ dataset_readAll(char *filename)
VRFY((ret >= 0), "H5Dread succeeded");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
if (ret) nerrors++;
/* release all temporary handles. */
@@ -736,24 +749,24 @@ dataset_readAll(char *filename)
H5Pclose(xfer_plist);
/* Dataset2: each process takes a block of rows. */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill dataset with test data */
- dataset_fill(start, count, stride, data_origin1);
+ dataset_fill(start, count, stride, block, data_origin1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_origin1);
+ dataset_print(start, count, stride, block, data_origin1);
}
/* set up the collective transfer properties list */
@@ -768,7 +781,7 @@ dataset_readAll(char *filename)
VRFY((ret >= 0), "H5Dread succeeded");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
if (ret) nerrors++;
/* release all temporary handles. */
@@ -822,9 +835,10 @@ extend_writeInd(char *filename)
hsize_t chunk_dims[RANK]; /* chunk sizes */
hid_t dataset_pl; /* dataset create prop. list */
- hssize_t start[RANK]; /* for hyperslab setting */
- hsize_t count[RANK]; /* for hyperslab setting */
- hsize_t stride[RANK]; /* for hyperslab setting */
+ hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t count[RANK]; /* for hyperslab setting */
+ hsize_t stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int i, j;
@@ -903,18 +917,18 @@ extend_writeInd(char *filename)
* Test writing to dataset1
* -------------------------*/
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* put some trivial data in the data_array */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* Extend its current dim sizes before writing */
@@ -926,7 +940,7 @@ extend_writeInd(char *filename)
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently */
@@ -943,18 +957,18 @@ extend_writeInd(char *filename)
* Test writing to dataset2
* -------------------------*/
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYCOL);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYCOL);
/* put some trivial data in the data_array */
- dataset_fill(start, count, stride, data_array1);
+ dataset_fill(start, count, stride, block, data_array1);
MESG("data_array initialized");
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
#ifndef DISABLE
@@ -966,7 +980,7 @@ extend_writeInd(char *filename)
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently. Should fail. */
@@ -991,7 +1005,7 @@ extend_writeInd(char *filename)
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
/* write data independently */
@@ -1036,6 +1050,7 @@ extend_readInd(char *filename)
hssize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
+ hsize_t block[RANK]; /* for hyperslab setting */
herr_t ret; /* Generic return value */
int i, j;
@@ -1105,23 +1120,23 @@ extend_readInd(char *filename)
/* Read dataset1 using BYROW pattern */
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYROW);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYROW);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill dataset with test data */
- dataset_fill(start, count, stride, data_origin1);
+ dataset_fill(start, count, stride, block, data_origin1);
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* read data independently */
@@ -1130,7 +1145,7 @@ extend_readInd(char *filename)
VRFY((ret >= 0), "H5Dread succeeded");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset1 read verified correct");
if (ret) nerrors++;
@@ -1140,23 +1155,23 @@ extend_readInd(char *filename)
/* Read dataset2 using BYCOL pattern */
/* set up dimensions of the slab this process accesses */
- slab_set(mpi_rank, mpi_size, start, count, stride, BYCOL);
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYCOL);
/* 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, NULL);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "");
/* create a memory dataspace independently */
- mem_dataspace = H5Screate_simple (RANK, count, NULL);
+ mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
/* fill dataset with test data */
- dataset_fill(start, count, stride, data_origin1);
+ dataset_fill(start, count, stride, block, data_origin1);
if (verbose){
MESG("data_array created");
- dataset_print(start, count, stride, data_array1);
+ dataset_print(start, count, stride, block, data_array1);
}
/* read data independently */
@@ -1165,7 +1180,7 @@ extend_readInd(char *filename)
VRFY((ret >= 0), "H5Dread succeeded");
/* verify the read data with original expected data */
- ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
+ ret = dataset_vrfy(start, count, stride, block, data_array1, data_origin1);
VRFY((ret == 0), "dataset2 read verified correct");
if (ret) nerrors++;