summaryrefslogtreecommitdiffstats
path: root/examples/h5ff_client_adv_analysis.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-18 21:34:28 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-18 21:34:28 (GMT)
commit730ca41e9a48de89679391301c4a28cdf4bd1c43 (patch)
treecdc66c1957f1f1cb67794c21bc2f8bcc3762bfa7 /examples/h5ff_client_adv_analysis.c
parent4edeaf0c13c0bfee62c68b0c547719badb17a909 (diff)
downloadhdf5-730ca41e9a48de89679391301c4a28cdf4bd1c43.zip
hdf5-730ca41e9a48de89679391301c4a28cdf4bd1c43.tar.gz
hdf5-730ca41e9a48de89679391301c4a28cdf4bd1c43.tar.bz2
[svn-r25325] - fix bugs in analysis shipping
- move ship_analysis to after fclose in example
Diffstat (limited to 'examples/h5ff_client_adv_analysis.c')
-rw-r--r--examples/h5ff_client_adv_analysis.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/h5ff_client_adv_analysis.c b/examples/h5ff_client_adv_analysis.c
index 8e7edca..05bc09d 100644
--- a/examples/h5ff_client_adv_analysis.c
+++ b/examples/h5ff_client_adv_analysis.c
@@ -153,8 +153,8 @@ init_data(size_t ntuples, struct analysis_data *data)
data->temperature = (double *) malloc(sizeof(double) * ncomponents * ntuples);
for (i = 0; i < ntuples; i++) {
for (j = 0; j < ncomponents; j++) {
- data->temperature[ncomponents * i + j] =
- (double) (((hsize_t) my_rank) * ntuples + i);
+ data->temperature[ncomponents * i + j] = i;
+ //(double) (((hsize_t) my_rank) * ntuples + i);
}
}
}
@@ -334,20 +334,19 @@ main(int argc, char **argv)
MPI_Barrier(MPI_COMM_WORLD);
free_data(&data);
-
- if(0 == my_rank) {
- ship_analysis(file_name);
- }
-
- MPI_Barrier(MPI_COMM_WORLD);
-
ret = H5ESclose(estack_id);
assert(ret == 0);
/* Close the file. */
ret = H5Fclose_ff(file_id, 1, H5_EVENT_STACK_NULL);
assert(0 == ret);
+ MPI_Barrier(MPI_COMM_WORLD);
+ if(0 == my_rank) {
+ ship_analysis(file_name);
+ }
+
+ MPI_Barrier(MPI_COMM_WORLD);
EFF_finalize();
MPI_Finalize();