summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
commit37232bd4f0f8199f956c823cdff72ece2ca9aa16 (patch)
tree38e37f7208355500b7f223e90bf014424c63300b /testpar
parent20146575aaeead9e05af73977dee863de63bf50f (diff)
downloadhdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.zip
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.gz
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.bz2
[svn-r9729] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'testpar')
-rw-r--r--testpar/Makefile.in2
-rw-r--r--testpar/t_coll_chunk.c54
-rw-r--r--testpar/t_dset.c45
-rw-r--r--testpar/t_file.c8
-rw-r--r--testpar/t_mdset.c69
-rw-r--r--testpar/t_mpi.c15
-rw-r--r--testpar/testphdf5.c27
-rw-r--r--testpar/testphdf5.h102
8 files changed, 217 insertions, 105 deletions
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 20fbb5d..31850b6 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -43,7 +43,7 @@ MOSTLYCLEAN=MPItest.h5 Para*.h5 *.clog
DISTCLEAN=go Makefile testph5.sh
## Test source files
-TEST_PHDF5_SRC=testphdf5.c t_dset.c t_file.c t_mdset.c t_ph5basic.c t_coll_chunk.c
+TEST_PHDF5_SRC=testphdf5.c t_dset.c t_file.c t_mdset.c t_ph5basic.c t_coll_chunk.c t_span_tree.c
TEST_PHDF5_OBJ=$(TEST_PHDF5_SRC:.c=.lo)
TEST_SRC=t_mpi.c $(TEST_PHDF5_SRC)
TEST_OBJ=$(TEST_SRC:.c=.lo)
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index c7d4bef..3176741 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -23,18 +23,18 @@
*/
/* some commonly used routines for collective chunk IO tests*/
-static void ccslab_set(int mpi_rank,int mpi_size,hssize_t start[],hsize_t count[],
+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(hssize_t start[],hsize_t count[],
+static void ccdataset_fill(hsize_t start[],hsize_t count[],
hsize_t stride[],hsize_t block[],DATATYPE*dataset);
-static void ccdataset_print(hssize_t start[],hsize_t block[],DATATYPE*dataset);
+static void ccdataset_print(hsize_t start[],hsize_t block[],DATATYPE*dataset);
-static int ccdataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[],
+static int ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[],
hsize_t block[], DATATYPE *dataset, DATATYPE *original);
-static void coll_chunktest(char* filename,int chunk_factor,int select_factor);
+static void coll_chunktest(const char* filename,int chunk_factor,int select_factor);
/*-------------------------------------------------------------------------
* Function: coll_chunk1
@@ -56,8 +56,8 @@ void
coll_chunk1(void)
{
- char *filename;
- filename = (char *) GetTestParameters();
+ const char *filename;
+ filename = GetTestParameters();
coll_chunktest(filename,1,BYROW_CONT);
}
@@ -66,8 +66,8 @@ void
coll_chunk2(void)
{
- char *filename;
- filename = (char *) GetTestParameters();
+ const char *filename;
+ filename = GetTestParameters();
coll_chunktest(filename,1,BYROW_DISCONT);
}
@@ -77,11 +77,11 @@ void
coll_chunk3(void)
{
- char *filename;
+ const char *filename;
int mpi_size;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Comm_size(comm,&mpi_size);
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
coll_chunktest(filename,mpi_size,BYROW_CONT);
}
@@ -90,17 +90,17 @@ void
coll_chunk4(void)
{
- char *filename;
+ const char *filename;
int mpi_size;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Comm_size(comm,&mpi_size);
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
coll_chunktest(filename,mpi_size*2,BYROW_DISCONT);
}
static void
-coll_chunktest(char* filename,int chunk_factor,int select_factor) {
+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;
@@ -108,7 +108,7 @@ coll_chunktest(char* filename,int chunk_factor,int select_factor) {
int* data_array1 = NULL;
int* data_origin1 = NULL;
herr_t status;
- hssize_t start[RANK];
+ hsize_t start[RANK];
hsize_t count[RANK],stride[RANK],block[RANK];
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
unsigned prop_value;
@@ -320,7 +320,7 @@ coll_chunktest(char* filename,int chunk_factor,int select_factor) {
static void
-ccslab_set(int mpi_rank, int mpi_size, hssize_t start[], hsize_t count[],
+ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[],
hsize_t stride[], hsize_t block[], int mode)
{
switch (mode){
@@ -364,8 +364,8 @@ if (VERBOSE_MED) printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED){
- printf("start[]=(%ld,%ld), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
- (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
(unsigned long)(block[0]*block[1]*count[0]*count[1]));
}
@@ -377,7 +377,7 @@ if (VERBOSE_MED){
* Assume dimension rank is 2 and data is stored contiguous.
*/
static void
-ccdataset_fill(hssize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[], DATATYPE * dataset)
+ccdataset_fill(hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
DATATYPE *tmptr;
@@ -408,7 +408,7 @@ ccdataset_fill(hssize_t start[], hsize_t stride[], hsize_t count[], hsize_t bloc
* Print the first block of the content of the dataset.
*/
static void
-ccdataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
+ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
hsize_t i, j;
@@ -417,13 +417,13 @@ ccdataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
printf("Print only the first block of the dataset\n");
printf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- printf("%3ld ", (long)(start[1]+j));
+ printf("%3lu ", (unsigned long)(start[1]+j));
}
printf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- printf("Row %2ld: ", (long)(i+start[0]));
+ printf("Row %2lu: ", (unsigned long)(i+start[0]));
for (j=0; j < block[1]; j++){
printf("%03d ", *dataptr++);
}
@@ -436,7 +436,7 @@ ccdataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
* Print the content of the dataset.
*/
static int
-ccdataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original)
+ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original)
{
hsize_t i, j,k1,k2;
int vrfyerrs;
@@ -445,8 +445,8 @@ ccdataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bloc
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
printf("dataset_vrfy dumping:::\n");
- printf("start(%ld, %ld), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
printf("original values:\n");
ccdataset_print(start, block, original);
@@ -468,8 +468,8 @@ ccdataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bloc
if (*dataptr != *oriptr){
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- printf("Dataset Verify failed at [%ld][%ld]: expect %d, got %d\n",
- (long)i, (long)j,
+ printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j,
*(original), *(dataset));
}
}
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index b45fdb3..962a6f4 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -43,7 +43,7 @@
* ZCOL same as BYCOL except process 0 gets 0 columns
*/
static void
-slab_set(int mpi_rank, int mpi_size, hssize_t start[], hsize_t count[],
+slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[],
hsize_t stride[], hsize_t block[], int mode)
{
switch (mode){
@@ -110,8 +110,8 @@ if (VERBOSE_MED) printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED){
- printf("start[]=(%ld,%ld), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
- (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1],
(unsigned long)(block[0]*block[1]*count[0]*count[1]));
}
@@ -123,7 +123,7 @@ if (VERBOSE_MED){
* Assume dimension rank is 2 and data is stored contiguous.
*/
static void
-dataset_fill(hssize_t start[], hsize_t block[], DATATYPE * dataset)
+dataset_fill(hsize_t start[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
hsize_t i, j;
@@ -142,7 +142,7 @@ dataset_fill(hssize_t start[], hsize_t block[], DATATYPE * dataset)
* Print the content of the dataset.
*/
static void
-dataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
+dataset_print(hsize_t start[], hsize_t block[], DATATYPE * dataset)
{
DATATYPE *dataptr = dataset;
hsize_t i, j;
@@ -150,13 +150,13 @@ dataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
/* print the column heading */
printf("%-8s", "Cols:");
for (j=0; j < block[1]; j++){
- printf("%3ld ", (long)(start[1]+j));
+ printf("%3lu ", (unsigned long)(start[1]+j));
}
printf("\n");
/* print the slab data */
for (i=0; i < block[0]; i++){
- printf("Row %2ld: ", (long)(i+start[0]));
+ printf("Row %2lu: ", (unsigned long)(i+start[0]));
for (j=0; j < block[1]; j++){
printf("%03d ", *dataptr++);
}
@@ -168,7 +168,8 @@ dataset_print(hssize_t start[], hsize_t block[], DATATYPE * dataset)
/*
* Print the content of the dataset.
*/
-int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original)
+int
+dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original)
{
hsize_t i, j;
int vrfyerrs;
@@ -176,8 +177,8 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bl
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
printf("dataset_vrfy dumping:::\n");
- printf("start(%ld, %ld), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1],
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], (unsigned long)count[1],
(unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1]);
printf("original values:\n");
dataset_print(start, block, original);
@@ -190,9 +191,9 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bl
for (j=0; j < block[1]; j++){
if (*dataset != *original){
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){
- printf("Dataset Verify failed at [%ld][%ld](row %ld, col %ld): expect %d, got %d\n",
- (long)i, (long)j,
- (long)(i+start[0]), (long)(j+start[1]),
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j,
+ (unsigned long)(i+start[0]), (unsigned long)(j+start[1]),
*(original), *(dataset));
}
dataset++;
@@ -234,7 +235,7 @@ dataset_writeInd(void)
DATATYPE *data_array1 = NULL; /* data buffer */
const char *filename;
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
@@ -380,7 +381,7 @@ dataset_readInd(void)
DATATYPE *data_origin1 = NULL; /* expected data buffer */
const char *filename;
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
@@ -506,7 +507,7 @@ dataset_writeAll(void)
DATATYPE *data_array1 = NULL; /* data buffer */
const char *filename;
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
@@ -865,7 +866,7 @@ dataset_readAll(void)
DATATYPE *data_origin1 = NULL; /* expected data buffer */
const char *filename;
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
@@ -1092,7 +1093,7 @@ extend_writeInd(void)
hsize_t chunk_dims[RANK]; /* chunk sizes */
hid_t dataset_pl; /* dataset create prop. list */
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_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 */
@@ -1438,7 +1439,7 @@ extend_writeInd2(void)
printf("%s%d", i?", ":"", written[i]);
printf("\n");
}
- ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, (hssize_t *)&orig_size, NULL, &one, &orig_size);
+ ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -1487,7 +1488,7 @@ extend_readInd(void)
DATATYPE *data_origin1 = NULL; /* expected data buffer */
const char *filename;
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
@@ -1670,7 +1671,7 @@ extend_writeAll(void)
hsize_t chunk_dims[RANK]; /* chunk sizes */
hid_t dataset_pl; /* dataset create prop. list */
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_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 */
@@ -1913,7 +1914,7 @@ extend_readAll(void)
DATATYPE *data_array2 = NULL; /* data buffer */
DATATYPE *data_origin1 = NULL; /* expected data buffer */
- hssize_t start[RANK]; /* for hyperslab setting */
+ hsize_t start[RANK]; /* for hyperslab setting */
hsize_t count[RANK], stride[RANK]; /* for hyperslab setting */
hsize_t block[RANK]; /* for hyperslab setting */
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 6fcde32..7f703a5 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -41,9 +41,9 @@ test_split_comm_access(void)
hid_t acc_tpl; /* File access properties */
hbool_t use_gpfs = FALSE; /* Use GPFS hints */
herr_t ret; /* generic return value */
- char *filename;
+ const char *filename;
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
if (VERBOSE_MED)
printf("Split Communicator access test on file %s\n",
filename);
@@ -82,9 +82,9 @@ test_split_comm_access(void)
ret=H5Fclose(fid);
VRFY((ret >= 0), "");
- /* detele the test file */
+ /* delete the test file */
if (sub_mpi_rank == 0){
- mrc = MPI_File_delete(filename, info);
+ mrc = MPI_File_delete((char *)filename, info);
/*VRFY((mrc==MPI_SUCCESS), ""); */
}
}
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 191a1f8..d99cbc3 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -30,7 +30,7 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m);
void write_attribute(hid_t, int, int);
int read_attribute(hid_t, int, int);
int check_value(DATATYPE *, DATATYPE *, int);
-void get_slab(hssize_t[], hsize_t[], hsize_t[], hsize_t[], int);
+void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
/*
@@ -87,18 +87,18 @@ void multiple_dset_write(void)
hid_t iof, plist, dataset, memspace, filespace;
hid_t dcpl; /* Dataset creation property list */
hbool_t use_gpfs = FALSE; /* Use GPFS hints */
- hssize_t chunk_origin [DIM];
+ hsize_t chunk_origin [DIM];
hsize_t chunk_dims [DIM], file_dims [DIM];
hsize_t count[DIM]={1,1};
double * outme = NULL;
double fill=1.0; /* Fill value */
char dname [100];
herr_t ret;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ndatasets;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ndatasets = pt->count;
@@ -180,7 +180,7 @@ void compact_dataset(void)
double * inme;
char dname[]="dataset";
herr_t ret;
- char *filename;
+ const char *filename;
size = get_size();
@@ -198,7 +198,7 @@ void compact_dataset(void)
inme = HDmalloc((size_t)(size * size * sizeof(double)));
VRFY((outme != NULL), "HDmalloc succeeded for inme");
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
VRFY((mpi_size <= size), "mpi_size <= size");
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
@@ -295,7 +295,7 @@ void big_dataset(void)
char dname[]="dataset"; /* Name of dataset */
MPI_Offset file_size; /* Size of file on disk */
herr_t ret; /* Generic return value */
- char *filename;
+ const char *filename;
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
@@ -303,7 +303,7 @@ void big_dataset(void)
/* Verify MPI_Offset can handle larger than 2GB sizes */
VRFY((sizeof(MPI_Offset)>4), "sizeof(MPI_Offset)>4");
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type, use_gpfs);
VRFY((fapl >= 0), "create_faccess_plist succeeded");
@@ -427,19 +427,19 @@ void dataset_fillvalue(void)
filespace; /* Dataset's dataspace ID */
char dname[]="dataset"; /* Name of dataset */
hsize_t dset_dims[4] = {0, 6, 7, 8};
- hssize_t req_start[4] = {0, 0, 0, 0};
+ hsize_t req_start[4] = {0, 0, 0, 0};
hsize_t req_count[4] = {1, 6, 7, 8};
hsize_t dset_size; /* Dataset size */
int *rdata, *wdata; /* Buffers for data to read and write */
int *twdata, *trdata; /* Temporary pointer into buffer */
int acc, i, j, k, l; /* Local index variables */
herr_t ret; /* Generic return value */
- char *filename;
+ const char *filename;
MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank);
MPI_Comm_size (MPI_COMM_WORLD, &mpi_size);
- filename = (char *) GetTestParameters();
+ filename = GetTestParameters();
/* Set the dataset dimension to be one row more than number of processes */
/* and calculate the actual dataset size. */
@@ -607,15 +607,15 @@ void collective_group_write(void)
char gname[64], dname[32];
hid_t fid, gid, did, plist, dcpl, memspace, filespace;
DATATYPE * outme = NULL;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
hsize_t chunk_size[2]; /* Chunk dimensions - computed shortly */
herr_t ret1, ret2;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -700,11 +700,11 @@ void independent_group_read(void)
int mpi_rank, m;
hid_t plist, fid;
hbool_t use_gpfs = FALSE;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -824,14 +824,14 @@ void multiple_group_write(void)
hbool_t use_gpfs = FALSE;
char gname[64];
hid_t fid, gid, plist, memspace, filespace;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
herr_t ret;
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -995,13 +995,13 @@ void multiple_group_read(void)
hbool_t use_gpfs = FALSE;
char gname[64];
hid_t plist, fid, gid, memspace, filespace;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], file_dims[DIM], count[DIM];
- H5Ptest_param_t *pt;
+ const H5Ptest_param_t *pt;
char *filename;
int ngroups;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
ngroups = pt->count;
@@ -1232,7 +1232,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
{
int mpi_rank, mpi_size, err_num=0;
hsize_t i, j;
- hssize_t chunk_origin[DIM];
+ hsize_t chunk_origin[DIM];
hsize_t chunk_dims[DIM], count[DIM];
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -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 [%ld][%ld](row %ld, col%ld): expect %d, got %d\n", (long)i, (long)j, (long)i, (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,7 +1264,7 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
* JRM - 8/11/04
*/
-void get_slab(hssize_t chunk_origin[],
+void get_slab(hsize_t chunk_origin[],
hsize_t chunk_dims[],
hsize_t count[],
hsize_t file_dims[],
@@ -1326,13 +1326,12 @@ void io_mode_confusion(void)
/* identifiers */
hsize_t dimsf[1]; /* dataset dimensions */
int data[N] = {1}; /* pointer to data buffer to write */
- hssize_t select[N] = {0L,1L,2L,3L};
- hssize_t start[1];
- hsize_t stride[1];
- hsize_t count[1];
- hsize_t block[1];
+ hsize_t coord[N] = {0L,1L,2L,3L};
+ hsize_t start[1];
+ hsize_t stride[1];
+ hsize_t count[1];
+ hsize_t block[1];
hid_t plist_id; /* property list identifier */
- int i;
herr_t status;
@@ -1347,13 +1346,13 @@ void io_mode_confusion(void)
* test bed related variables
*/
- char * fcn_name = "io_mode_confusion";
+ const char * fcn_name = "io_mode_confusion";
const hbool_t verbose = FALSE;
- H5Ptest_param_t * pt;
+ const H5Ptest_param_t * pt;
char * filename;
- pt = (H5Ptest_param_t *) GetTestParameters();
+ pt = GetTestParameters();
filename = pt->name;
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -1489,7 +1488,7 @@ void io_mode_confusion(void)
mpi_rank, fcn_name);
status = H5Sselect_elements(filespace, H5S_SELECT_SET, N,
- (const hssize_t **)&select);
+ (const hsize_t **)&coord);
VRFY(( status >= 0 ), "H5Sselect_elements() failed");
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 71494d4..7b7a96b 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -37,10 +37,11 @@ int nerrors = 0;
hid_t fapl; /* file access property list */
/* protocols */
+static int errors_sum(int nerrs);
#define MPIO_TEST_WRITE_SIZE 1024*1024 /* 1 MB */
-int
+static int
test_mpio_overlap_writes(char *filename)
{
int mpi_size, mpi_rank;
@@ -186,7 +187,7 @@ test_mpio_overlap_writes(char *filename)
* Then reads the file back in by reverse order, that is process 0
* reads the data of process n-1 and vice versa.
*/
-int
+static int
test_mpio_gb_file(char *filename)
{
int mpi_size, mpi_rank;
@@ -407,7 +408,8 @@ finish:
#define USEFSYNC 2 /* request file_sync */
-int test_mpio_1wMr(char *filename, int special_request)
+static int
+test_mpio_1wMr(char *filename, int special_request)
{
char hostname[128];
int mpi_size, mpi_rank;
@@ -593,7 +595,7 @@ if (special_request & USEFSYNC){
/*
* parse the command line options
*/
-int
+static int
parse_options(int argc, char **argv)
{
while (--argc){
@@ -655,7 +657,7 @@ parse_options(int argc, char **argv)
/*
* Show command usage
*/
-void
+static void
usage(void)
{
printf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n");
@@ -667,7 +669,8 @@ usage(void)
/*
* return the sum of all errors.
*/
-int errors_sum(nerrs)
+static int
+errors_sum(int nerrs)
{
int temp;
MPI_Allreduce(&nerrs, &temp, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index d8fb74b..8121c9b 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -438,6 +438,24 @@ int main(int argc, char **argv)
"collective to independent chunk io",PARATESTFILE);
}
+#ifdef KYANG
+ AddTest("ccontw",coll_irregular_cont_write,NULL,
+ "collective irregular contiguous write",PARATESTFILE);
+ AddTest("ccontr",coll_irregular_cont_read,NULL,
+ "collective irregular contiguous read",PARATESTFILE);
+
+ AddTest("cschunkw",coll_irregular_simple_chunk_write,NULL,
+ "collective irregular simple chunk write",PARATESTFILE);
+ AddTest("cschunkr",coll_irregular_simple_chunk_read,NULL,
+ "collective irregular simple chunk read",PARATESTFILE);
+
+ AddTest("ccchunkw",coll_irregular_complex_chunk_write,NULL,
+ "collective irregular complex chunk write",PARATESTFILE);
+
+ AddTest("ccchunkr",coll_irregular_complex_chunk_read,NULL,
+ "collective irregular complex chunk read",PARATESTFILE);
+#endif
+
io_mode_confusion_params.name = PARATESTFILE;
io_mode_confusion_params.count = 0; /* value not used */
@@ -455,14 +473,6 @@ int main(int argc, char **argv)
/* Parse command line arguments */
TestParseCmdLine(argc, argv);
- /*
- if (parse_options(argc, argv) != 0){
- if (MAINPROCESS)
- usage();
- goto finish;
- }
- */
-
if (facc_type == FACC_MPIPOSIX && MAINPROCESS){
printf("===================================\n"
" Using MPIPOSIX driver\n"
@@ -472,7 +482,6 @@ int main(int argc, char **argv)
/* Perform requested testing */
PerformTests();
-finish:
/* make sure all processes are finished before final report, cleanup
* and exit.
*/
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index a01c62e..9121ef3 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -119,6 +119,100 @@
#define BYROW_DISCONT 2
#define DSET_COLLECTIVE_CHUNK_NAME "coll_chunk_name"
+
+/*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 */
+
+/* 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
+
+
+*/ /* end of debugging macro */
/* type definitions */
typedef struct H5Ptest_param_t /* holds extra test parameters */
{
@@ -162,6 +256,12 @@ void coll_chunk1(void);
void coll_chunk2(void);
void coll_chunk3(void);
void coll_chunk4(void);
+void coll_irregular_cont_read(void);
+void coll_irregular_cont_write(void);
+void coll_irregular_simple_chunk_read(void);
+void coll_irregular_simple_chunk_write(void);
+void coll_irregular_complex_chunk_read(void);
+void coll_irregular_complex_chunk_write(void);
void io_mode_confusion(void);
#ifdef H5_HAVE_FILTER_DEFLATE
void compress_readAll(void);
@@ -170,7 +270,7 @@ void compress_readAll(void);
/* commonly used prototypes */
hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs);
MPI_Offset h5_mpi_get_file_size(const char *filename, MPI_Comm comm, MPI_Info info);
-int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[],
+int dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[],
hsize_t block[], DATATYPE *dataset, DATATYPE *original);
#endif /* PHDF5TEST_H */