summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Warren <Richard.Warren@hdfgroup.org>2018-12-10 18:07:41 (GMT)
committerRichard Warren <Richard.Warren@hdfgroup.org>2018-12-10 18:07:41 (GMT)
commite9d65425a206dffa8eef903945096954841934c8 (patch)
treec5f5fc72be6d8f7110c20dcd00bd27e8b9fa1f71 /src
parent83f32a3aba4b5b0b98ffe7f4a0df129cbdf06a6b (diff)
downloadhdf5-e9d65425a206dffa8eef903945096954841934c8.zip
hdf5-e9d65425a206dffa8eef903945096954841934c8.tar.gz
hdf5-e9d65425a206dffa8eef903945096954841934c8.tar.bz2
Fixed a bug in the examples/vpic-query.c code and also added a restriction in the query reference generation in the fastbit plugin
Diffstat (limited to 'src')
-rw-r--r--src/H5Xfastbit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5Xfastbit.c b/src/H5Xfastbit.c
index 5f49126..830a8d6 100644
--- a/src/H5Xfastbit.c
+++ b/src/H5Xfastbit.c
@@ -51,6 +51,7 @@
/****************/
/* Local Macros */
/****************/
+#define LIMIT_RESULTS_FOR_TESTING
#define SHOW_TIME
// #define H5X_FASTBIT_DEBUG
@@ -114,6 +115,7 @@ typedef struct H5X_fastbit_t {
hid_t filespace_id;
hid_t memspace_id;
hid_t index_info_group_id;
+ hsize_t filespace_offset;
int64_t blocksize;
int64_t nelmts;
@@ -1960,6 +1962,8 @@ H5X__fastbit_create_selection(H5X_fastbit_t *fastbit, hid_t dataspace_id,
hsize_t start_coord[H5S_MAX_RANK + 1], end_coord[H5S_MAX_RANK + 1], nelmts;
herr_t ret_value = SUCCEED; /* Return value */
size_t i, dataset_rank;
+ uint64_t colimit = ncoords;
+
double t_start, t_end, t_loop, t_select_bounds, t_select_npoints;
double t_hyperslab = 0, temp, t0, t1;
double t_min = 0.1, t_max = 0, target = 0.01;
@@ -1969,13 +1973,16 @@ H5X__fastbit_create_selection(H5X_fastbit_t *fastbit, hid_t dataspace_id,
/* Check for non-null selections */
if (ncoords > 0) {
/* Initialize count */
+#ifdef LIMIT_RESULTS_FOR_TESTING
+ if (colimit > 10000) colimit = 10000;
+#endif
for (i = 0; i < H5S_MAX_RANK; i++)
count[i] = 1;
#ifdef SHOW_TIME
t_start = MPI_Wtime();
#endif
- for (i = 0; i < ncoords; i++) {
+ for (i = 0; i < colimit /* ncoords*/; i++) {
hsize_t new_coords[H5S_MAX_RANK + 1];
const hsize_t point = coords[i];
/* Convert coordinates */