Block-Structured AMR Software Framework
AMReX_ParticleUtilHDF5.H
Go to the documentation of this file.
1 #ifdef AMREX_USE_HDF5_ASYNC
2 #include "hdf5.h"
3 
4 hid_t es_par_g = 0;
5 
6 void async_vol_es_wait_particle()
7 {
8  size_t num_in_progress;
9  hbool_t op_failed;
10  if (es_par_g != 0) {
11  H5ESwait(es_par_g, H5ES_WAIT_FOREVER, &num_in_progress, &op_failed);
12  if (num_in_progress != 0)
13  std::cout << "After H5ESwait, still has async operations in progress!" << std::endl;
14  }
15  return;
16 }
17 
18 void async_vol_es_wait_close_particle()
19 {
20  size_t num_in_progress;
21  hbool_t op_failed;
22  if (es_par_g != 0) {
23  H5ESwait(es_par_g, H5ES_WAIT_FOREVER, &num_in_progress, &op_failed);
24  if (num_in_progress != 0)
25  std::cout << "After H5ESwait, still has async operations in progress!" << std::endl;
26  H5ESclose(es_par_g);
27  /* std::cout << "es_par_g closed!" << std::endl; */
28  es_par_g = 0;
29  }
30  return;
31 }
32 #endif