summaryrefslogtreecommitdiffstats
path: root/tools/test/perform
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/perform')
-rw-r--r--tools/test/perform/chunk.c2
-rw-r--r--tools/test/perform/iopipe.c2
-rw-r--r--tools/test/perform/pio_engine.c36
-rw-r--r--tools/test/perform/sio_engine.c28
-rw-r--r--tools/test/perform/sio_standalone.h6
5 files changed, 40 insertions, 34 deletions
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index 804f88e..3603c9b 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -72,7 +72,7 @@
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
-static hid_t fapl_g = -1;
+static hid_t fapl_g = H5I_INVALID_HID;
/* Local function prototypes */
static size_t
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 2d9c44f..57c0d52 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -168,7 +168,7 @@ main (void)
static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
unsigned char *the_data = NULL;
- hid_t file, dset, file_space = -1;
+ hid_t file, dset, file_space = H5I_INVALID_HID;
herr_t status;
#ifdef H5_HAVE_GETRUSAGE
struct rusage r_start, r_stop;
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 5d8474b..d000f60 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -557,16 +557,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dcpl = -1; /* Dataset creation property list */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -1402,7 +1402,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -1458,7 +1458,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -1468,7 +1468,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -1478,7 +1478,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -1537,15 +1537,15 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -2357,7 +2357,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -2413,7 +2413,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -2423,7 +2423,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -2433,7 +2433,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -2451,7 +2451,7 @@ done:
do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
{
int ret_code = SUCCESS, mrc;
- hid_t acc_tpl = -1; /* file access templates */
+ hid_t acc_tpl = H5I_INVALID_HID; /* file access templates */
switch (param->io_type) {
case POSIXIO:
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 4dc4d0b..69409bb 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -114,11 +114,11 @@ static const char *multi_letters = "msbrglo"; /* string for multi driver */
/* HDF5 global variables */
static hsize_t h5count[MAX_DIMS]; /*selection count */
static hssize_t h5offset[MAX_DIMS]; /* Selection offset within dataspace */
-static hid_t h5dset_space_id = -1; /*dataset space ID */
-static hid_t h5mem_space_id = -1; /*memory dataspace ID */
-static hid_t h5ds_id = -1; /*dataset handle */
-static hid_t h5dcpl = -1; /* Dataset creation property list */
-static hid_t h5dxpl = -1; /* Dataset transfer property list */
+static hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+static hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+static hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
+static hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/*
* Function: do_sio
@@ -575,7 +575,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -587,7 +587,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -597,7 +597,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -607,7 +607,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -894,7 +894,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -906,7 +906,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -916,7 +916,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -926,7 +926,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -1137,7 +1137,7 @@ done:
hid_t
set_vfd(parameters *param)
{
- hid_t my_fapl = -1;
+ hid_t my_fapl = H5I_INVALID_HID;
vfdtype vfd;
vfd = param->vfd;
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 248ef9a..faa8317 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -527,4 +527,10 @@ typedef struct long_options {
extern int get_option(int argc, const char **argv, const char *opt,
const struct long_options *l_opt);
+
+extern int nCols; /*max number of columns for outputting */
+
+/* Definitions of useful routines */
+extern void print_version(const char *progname);
+
#endif