diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2014-06-05 00:46:50 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2014-06-05 00:46:50 (GMT) |
commit | cbaffd3924247ce21ed55626aac14d6d1dbf3311 (patch) | |
tree | f8bf49b5ab18681f671208da2190ccc437025051 /testff/h5ff_client_index.c | |
parent | f73776bd637197d4e372b5c90ca63b353ed76a39 (diff) | |
download | hdf5-cbaffd3924247ce21ed55626aac14d6d1dbf3311.zip hdf5-cbaffd3924247ce21ed55626aac14d6d1dbf3311.tar.gz hdf5-cbaffd3924247ce21ed55626aac14d6d1dbf3311.tar.bz2 |
[svn-r25240] First working version of H5X_Alacrity
Add H5X__alacrity_findBinRange1C
Add H5X__alacrity_readIndex
Generate dataspace selection from selected bins (only part of the index that
corresponds to the selected bins is read)
Update example to use float type (ALACRITY only supports float and double types)
Diffstat (limited to 'testff/h5ff_client_index.c')
-rw-r--r-- | testff/h5ff_client_index.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testff/h5ff_client_index.c b/testff/h5ff_client_index.c index b364d26..c637eb1 100644 --- a/testff/h5ff_client_index.c +++ b/testff/h5ff_client_index.c @@ -238,7 +238,7 @@ main(int argc, char **argv) hsize_t ntuples = NTUPLES; hsize_t ncomponents = 3; hsize_t start, total; - int *data; + float *data; hid_t file_id, fapl_id; hid_t estack_id = H5_EVENT_STACK_NULL; herr_t ret; @@ -263,10 +263,11 @@ main(int argc, char **argv) total = ntuples; /* Initialize the dataset. */ - data = (int *) malloc(sizeof(int) * ncomponents * ntuples); + data = (float *) malloc(sizeof(float) * ncomponents * ntuples); + for (i = 0; i < ntuples; i++) { for (j = 0; j < ncomponents; j++) { - data[ncomponents * i + j] = my_rank * ntuples + i; + data[ncomponents * i + j] = (float) (my_rank * ntuples + i); } } @@ -283,7 +284,7 @@ main(int argc, char **argv) ret = H5Pclose(fapl_id); assert(0 == ret); - write_dataset(file_id, dataset_name, total, ncomponents, H5T_NATIVE_INT, + write_dataset(file_id, dataset_name, total, ncomponents, H5T_NATIVE_FLOAT, ntuples, start, data, estack_id); MPI_Barrier(MPI_COMM_WORLD); @@ -305,6 +306,7 @@ main(int argc, char **argv) MPI_Barrier(MPI_COMM_WORLD); EFF_finalize(); + MPI_Finalize(); return 0; |