summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2017-09-01 14:24:39 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2017-09-01 14:24:39 (GMT)
commitfa21f6af4daf54dc7cf0a80780a25b50f2cf0e3d (patch)
treea212d4385bdf7f9b3ae12fe685fd3aefd87027c9 /testpar
parent17029af344b23b89b64bd5ba14f5fe1870022c16 (diff)
parentabcf30f232914c1ec9b8c5f2a3bb3a621af7bfe4 (diff)
downloadhdf5-fa21f6af4daf54dc7cf0a80780a25b50f2cf0e3d.zip
hdf5-fa21f6af4daf54dc7cf0a80780a25b50f2cf0e3d.tar.gz
hdf5-fa21f6af4daf54dc7cf0a80780a25b50f2cf0e3d.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'abcf30f232914c1ec9b8c5f2a3bb3a621af7bfe4': HDFFV-10284 Add VS2017 support Add commentary around calling H5Screate_simple with a single element Miscellaneous improvements (cont.) Description: Put back H5Location::getNumObjs and marked as deprecated in favor of Group::getNumObjs. Platforms tested: Linux/32 2.6 (jam) Darwin (osx1010test) Miscellaneous improvements Description: Moved H5Location::getNumObjs to Group::getNumObjs (i.e., H5Gget_info) Switched reinterpret_cast to static_cast in H5Object::iterateAttrs Miscellaneous cleanup Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) HDFFV-10282 refactor out assert calls in tools Fix the t_bigio test so that it runs on 32bit machines
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_bigio.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index a4a1323..611ff1a 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -519,6 +519,7 @@ dataset_big_write(void)
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = mpi_size;
+
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate2(fid, DATASET1, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -596,6 +597,7 @@ dataset_big_write(void)
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = mpi_size;
+
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate2(fid, DATASET2, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -673,6 +675,7 @@ dataset_big_write(void)
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = 1;
+
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate2(fid, DATASET3, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -748,6 +751,7 @@ dataset_big_write(void)
/* Create a large dataset */
dims[0] = bigcount;
dims[1] = mpi_size * 4;
+
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate2(fid, DATASET4, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -785,7 +789,11 @@ dataset_big_write(void)
}
/* create a memory dataspace */
- mem_dataspace = H5Screate_simple (1, &bigcount, NULL);
+ /* Warning: H5Screate_simple requires an array of hsize_t elements
+ * even if we only pass only a single value. Attempting anything else
+ * appears to cause problems with 32 bit compilers.
+ */
+ mem_dataspace = H5Screate_simple (1, dims, NULL);
VRFY((mem_dataspace >= 0), "");
/* set up the collective transfer properties list */
@@ -821,6 +829,7 @@ dataset_big_write(void)
/* Create a large dataset */
dims[0] = bigcount/6;
dims[1] = mpi_size * 4;
+
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
dataset = H5Dcreate2(fid, DATASET5, H5T_NATIVE_LLONG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -841,7 +850,7 @@ dataset_big_write(void)
file_dataspace = H5Dget_space (dataset);
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
- dims[1] = 4;
+ // dims[1] = 4;
/* create a memory dataspace */
mem_dataspace = H5Screate_simple (RANK, dims, NULL);
VRFY((mem_dataspace >= 0), "");
@@ -903,7 +912,7 @@ dataset_big_write(void)
VRFY((ret >= 0), "H5Dclose1 succeeded");
free(wdata);
-#endif
+#endif
H5Fclose(fid);
}
@@ -1217,7 +1226,11 @@ dataset_big_read(void)
if(coords) free(coords);
/* create a memory dataspace */
- mem_dataspace = H5Screate_simple (1, &bigcount, NULL);
+ /* Warning: H5Screate_simple requires an array of hsize_t elements
+ * even if we only pass only a single value. Attempting anything else
+ * appears to cause problems with 32 bit compilers.
+ */
+ mem_dataspace = H5Screate_simple (1, dims, NULL);
VRFY((mem_dataspace >= 0), "");
/* set up the collective transfer properties list */
@@ -1276,7 +1289,6 @@ dataset_big_read(void)
VRFY((file_dataspace >= 0), "H5Dget_space succeeded");
/* create a memory dataspace */
- dims[1] = 4;
mem_dataspace = H5Screate_simple (RANK, dims, NULL);
VRFY((mem_dataspace >= 0), "");
@@ -1645,7 +1657,6 @@ coll_chunktest(const char* filename,
size_t num_points; /* for point selection */
hsize_t *coords = NULL; /* for point selection */
- hsize_t current_dims; /* for point selection */
int i;
/* Create the data space */
@@ -1676,6 +1687,10 @@ coll_chunktest(const char* filename,
VRFY((coords != NULL), "coords malloc succeeded");
point_set(start, count, stride, block, num_points, coords, mode);
+ /* Warning: H5Screate_simple requires an array of hsize_t elements
+ * even if we only pass only a single value. Attempting anything else
+ * appears to cause problems with 32 bit compilers.
+ */
file_dataspace = H5Screate_simple(2, dims, NULL);
VRFY((file_dataspace >= 0), "file dataspace created succeeded");
@@ -1684,8 +1699,9 @@ coll_chunktest(const char* filename,
VRFY((mem_dataspace >= 0), "mem dataspace created succeeded");
}
else {
- current_dims = num_points;
- mem_dataspace = H5Screate_simple (1, &current_dims, NULL);
+ /* Putting the warning about H5Screate_simple (above) into practice... */
+ hsize_t dsdims[1] = {num_points};
+ mem_dataspace = H5Screate_simple (1, dsdims, NULL);
VRFY((mem_dataspace >= 0), "mem_dataspace create succeeded");
}
@@ -1962,8 +1978,12 @@ coll_chunktest(const char* filename,
VRFY((mem_dataspace >= 0), "");
}
else {
- current_dims = num_points;
- mem_dataspace = H5Screate_simple (1, &current_dims, NULL);
+ /* Warning: H5Screate_simple requires an array of hsize_t elements
+ * even if we only pass only a single value. Attempting anything else
+ * appears to cause problems with 32 bit compilers.
+ */
+ hsize_t dsdims[1] = {num_points};
+ mem_dataspace = H5Screate_simple (1, dsdims, NULL);
VRFY((mem_dataspace >= 0), "mem_dataspace create succeeded");
}