summaryrefslogtreecommitdiffstats
path: root/testpar/t_mdset.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-12-12 23:12:57 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-12-12 23:12:57 (GMT)
commit061ed07676eccb82c3d46ae744fb094bcd9169e4 (patch)
treeaae107b6290f66862eaf161ad583be533ea1c92d /testpar/t_mdset.c
parentf401dda2d7b1ef22505d285c14218143be011321 (diff)
downloadhdf5-061ed07676eccb82c3d46ae744fb094bcd9169e4.zip
hdf5-061ed07676eccb82c3d46ae744fb094bcd9169e4.tar.gz
hdf5-061ed07676eccb82c3d46ae744fb094bcd9169e4.tar.bz2
[svn-r3119] Purpose:
New features Description: Some testers found the filename lengths too short. Changed it to use the FILENAME_MAX usually defined in stdio.h. If not, set it to 512 which should be sufficient for users but should not exceed any system limits. Also added a new test parameters of ndatasets so that the tester can specific a different number of datasets for the multiple datasets tests. Changed the datatype of datasets created to DOUBLE. This eliminates the current racing conditions. But the racing bugs during conversion still need to be tracked down and squashed. Platforms tested: Modi4 -64.
Diffstat (limited to 'testpar/t_mdset.c')
-rw-r--r--testpar/t_mdset.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 8b9d505..2ee7c30 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -2,9 +2,8 @@
#define DIM 2
#define SIZE 32
-#define NUMITEMS 300
-void multiple_dset_write(char *filename)
+void multiple_dset_write(char *filename, int ndatasets)
{
int i, j, n, mpi_size, mpi_rank;
hid_t iof, plist, dataset, memspace, filespace;
@@ -37,10 +36,10 @@ void multiple_dset_write(char *filename)
filespace = H5Screate_simple (DIM, file_dims, NULL);
H5Sselect_hyperslab (filespace, H5S_SELECT_SET, chunk_origin, chunk_dims, count, chunk_dims);
- for (n = 0; n < NUMITEMS; n++) {
+ for (n = 0; n < ndatasets; n++) {
sprintf (dname, "dataset %d", n);
- dataset = H5Dcreate (iof, dname, H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT);
- VRFY((dataset > 0), "dataset create succeeded");
+ dataset = H5Dcreate (iof, dname, H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT);
+ VRFY((dataset > 0), dname);
/* calculate data to write */
for (i = 0; i < SIZE; i++)
@@ -52,8 +51,8 @@ void multiple_dset_write(char *filename)
H5Dclose (dataset);
if (! ((n+1) % 10)) {
printf("created %d datasets\n", n+1);
- }
MPI_Barrier(MPI_COMM_WORLD);
+ }
}
H5Sclose (filespace);