summaryrefslogtreecommitdiffstats
path: root/testpar/t_mdset.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_mdset.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_mdset.c')
-rw-r--r--testpar/t_mdset.c73
1 files changed, 36 insertions, 37 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index b23a26e..06aedf3 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);
@@ -293,12 +293,12 @@ void null_dataset(void)
char dname[]="dataset";
char attr_name[]="attribute";
herr_t ret;
- 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();
plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL,
facc_type, use_gpfs);
@@ -398,7 +398,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);
@@ -406,7 +406,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");
@@ -530,19 +530,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. */
@@ -710,15 +710,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;
@@ -803,11 +803,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;
@@ -927,14 +927,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;
@@ -1098,13 +1098,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;
@@ -1335,7 +1335,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);
@@ -1349,7 +1349,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");
@@ -1367,7 +1367,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[],
@@ -1429,13 +1429,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;
@@ -1450,13 +1449,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);
@@ -1592,7 +1591,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");