diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 12:54:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 12:54:53 (GMT) |
commit | aefc39ac325f25d1978ad07785ee0b57617d17a5 (patch) | |
tree | fca00816adc4c767109b92e4892f77abc40be3b9 /testpar | |
parent | 64b7be4a52b14dfefc7729aaf8be6649fb668cc4 (diff) | |
download | hdf5-aefc39ac325f25d1978ad07785ee0b57617d17a5.zip hdf5-aefc39ac325f25d1978ad07785ee0b57617d17a5.tar.gz hdf5-aefc39ac325f25d1978ad07785ee0b57617d17a5.tar.bz2 |
[svn-r5667] Purpose:
Code cleanup
Description:
Turn on more warnings in the IRIX builds and clean them up.
Platforms tested:
IRIX64 6.5 (modi4) w/parallel
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_dset.c | 28 | ||||
-rw-r--r-- | testpar/t_mdset.c | 8 | ||||
-rw-r--r-- | testpar/t_mpi.c | 5 | ||||
-rw-r--r-- | testpar/testphdf5.h | 14 |
4 files changed, 27 insertions, 28 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 3639e7a..91b6bd5 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -97,9 +97,9 @@ if (verbose) printf("slab_set wholeset\n"); } if (verbose){ 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]); + (long)start[0], (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])); } } @@ -135,13 +135,13 @@ void dataset_print(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t /* print the column heading */ printf("%-8s", "Cols:"); for (j=0; j < block[1]; j++){ - printf("%3ld ", start[1]+j); + printf("%3ld ", (long)start[1]+j); } printf("\n"); /* print the slab data */ for (i=0; i < block[0]; i++){ - printf("Row %2ld: ", i+start[0]); + printf("Row %2ld: ", (long)(i+start[0])); for (j=0; j < block[1]; j++){ printf("%03d ", *dataptr++); } @@ -155,17 +155,14 @@ void dataset_print(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t */ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original) { - DATATYPE *dataptr = dataset; - DATATYPE *originptr = original; - int i, j, vrfyerrs; /* print it if verbose */ if (verbose) { printf("dataset_vrfy dumping:::\n"); 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]); + (long)start[0], (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, count, stride, block, original); printf("compared values:\n"); @@ -224,9 +221,7 @@ dataset_writeInd(char *filename) hsize_t block[RANK]; /* for hyperslab setting */ herr_t ret; /* Generic return value */ - int i, j; int mpi_size, mpi_rank; - char *fname; MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; @@ -356,7 +351,6 @@ dataset_readInd(char *filename) { hid_t fid; /* HDF5 file ID */ hid_t acc_tpl; /* File access templates */ - hid_t sid; /* Dataspace ID */ hid_t file_dataspace; /* File dataspace ID */ hid_t mem_dataspace; /* memory dataspace ID */ hid_t dataset1, dataset2; /* Dataset ID */ @@ -368,7 +362,6 @@ dataset_readInd(char *filename) hsize_t block[RANK]; /* for hyperslab setting */ herr_t ret; /* Generic return value */ - int i, j; int mpi_size, mpi_rank; MPI_Comm comm = MPI_COMM_WORLD; @@ -702,7 +695,6 @@ dataset_readAll(char *filename) hid_t fid; /* HDF5 file ID */ hid_t acc_tpl; /* File access templates */ hid_t xfer_plist; /* Dataset transfer properties list */ - hid_t sid; /* Dataspace ID */ hid_t file_dataspace; /* File dataspace ID */ hid_t mem_dataspace; /* memory dataspace ID */ hid_t dataset1, dataset2; /* Dataset ID */ @@ -939,9 +931,7 @@ extend_writeInd(char *filename) hsize_t block[RANK]; /* for hyperslab setting */ herr_t ret; /* Generic return value */ - int i, j; int mpi_size, mpi_rank; - char *fname; MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; @@ -983,7 +973,7 @@ extend_writeInd(char *filename) /* set up dataset storage chunk sizes and creation property list */ if (verbose) - printf("chunks[]=%lu,%lu\n", chunk_dims[0], chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims); @@ -1130,7 +1120,6 @@ extend_readInd(char *filename) { hid_t fid; /* HDF5 file ID */ hid_t acc_tpl; /* File access templates */ - hid_t sid; /* Dataspace ID */ hid_t file_dataspace; /* File dataspace ID */ hid_t mem_dataspace; /* memory dataspace ID */ hid_t dataset1, dataset2; /* Dataset ID */ @@ -1144,7 +1133,6 @@ extend_readInd(char *filename) hsize_t block[RANK]; /* for hyperslab setting */ herr_t ret; /* Generic return value */ - int i, j; int mpi_size, mpi_rank; MPI_Comm comm = MPI_COMM_WORLD; diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 271aed0..bd06cc9 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -109,7 +109,7 @@ void multiple_dset_write(char *filename, int ndatasets) void multiple_group_write(char *filename, int ngroups) { int mpi_rank, mpi_size; - int i, j, l, m; + int m; char gname[64]; hid_t fid, gid, plist, memspace, filespace; hssize_t chunk_origin[DIM]; @@ -248,7 +248,7 @@ void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, void multiple_group_read(char *filename, int ngroups) { int mpi_rank, mpi_size, error_num; - int l, m; + int m; char gname[64]; hid_t plist, fid, gid, memspace, filespace; hssize_t chunk_origin[DIM]; @@ -316,7 +316,6 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid) char dname[32]; DATATYPE *outdata, *indata; hid_t did; - hsize_t block[DIM]={SIZE,SIZE}; MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -350,6 +349,9 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } + free(indata); + free(outdata); + return vrfy_errors; } diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 3758d75..8f6b55a 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -25,7 +25,6 @@ hid_t fapl; /* file access property list */ /* protocols */ static void test_mpio_overlap_writes(char *filename); -static void test_mpio_offset(void); static void test_mpio_gb_file(char *filename); static void test_mpio_gb_file(char *filename); static int parse_options(int argc, char **argv); @@ -137,7 +136,7 @@ test_mpio_overlap_writes(char *filename) if ((buf[i] != expected) && (vrfyerrs++ < MAX_ERR_REPORT || verbose)) printf("proc %d: found data error at [%ld], expect %d, got %d\n", - mpi_rank, mpi_off+i, expected, buf[i]); + mpi_rank, (long)(mpi_off+i), expected, buf[i]); } if (vrfyerrs > MAX_ERR_REPORT && !verbose) printf("proc %d: [more errors ...]\n", mpi_rank); @@ -332,7 +331,7 @@ test_mpio_gb_file(char *filename) if ((*(buf+j) != expected) && (vrfyerrs++ < MAX_ERR_REPORT || verbose)) printf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", - mpi_rank, mpi_off, j, expected, *(buf+j)); + mpi_rank, (long)mpi_off, j, expected, *(buf+j)); } if (vrfyerrs > MAX_ERR_REPORT && !verbose) printf("proc %d: [more errors ...]\n", mpi_rank); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index fb613bf..636769d 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -102,7 +102,17 @@ extern void *old_client_data; /*previous error handler arg.*/ extern int facc_type; /*Test file access type */ /* prototypes */ -hid_t -create_faccess_plist(MPI_Comm comm, MPI_Info info, int facc_type ); +hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int facc_type ); +void multiple_dset_write(char *filename, int ndatasets); +void multiple_group_write(char *filename, int ngroups); +void multiple_group_read(char *filename, int ngroups); +void test_split_comm_access(char *filename); +void dataset_writeInd(char *filename); +void dataset_writeAll(char *filename); +void extend_writeInd(char *filename); +void dataset_readInd(char *filename); +void dataset_readAll(char *filename); +void extend_readInd(char *filename); +int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original); #endif /* PHDF5TEST_H */ |