summaryrefslogtreecommitdiffstats
path: root/testpar/t_coll_chunk.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
commit427ff7da2848042f68ecfadf5a321b1d8077e9db (patch)
tree73024b1954031fbb724c2d96a485590348e5cc22 /testpar/t_coll_chunk.c
parent9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff)
downloadhdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2
[svn-r9727] 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/t_coll_chunk.c')
-rw-r--r--testpar/t_coll_chunk.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index 1dc3c71..8b9554e 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;
@@ -330,7 +330,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){
@@ -374,8 +374,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]));
}
@@ -387,7 +387,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;
@@ -418,7 +418,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;
@@ -427,13 +427,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++);
}
@@ -446,7 +446,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;
@@ -455,8 +455,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);
@@ -478,8 +478,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));
}
}