Skip to content

Commit 36404a6

Browse files
committed
Fix a hdf5 api compatibility issue
Signed-off-by: Chen Wang <[email protected]>
1 parent e3ddd11 commit 36404a6

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

include/recorder-gotcha.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "mpi.h"
99

1010
#include "hdf5.h"
11-
#include "hdf5_hl.h"
11+
#include "hdf5_hl.h"
1212

1313
#ifdef RECORDER_WITH_PNETCDF
1414
#include "pnetcdf.h"
@@ -47,16 +47,19 @@
4747
#define H5O_info2_t int
4848
#define H5L_info1_t int
4949
#define H5L_info2_t int
50-
#define H5O_iterate1_t int
51-
#define H5O_iterate2_t int
50+
#define H5O_iterate1_t int
51+
#define H5O_iterate2_t int
5252
#define H5L_iterate2_t int
5353
#define H5VL_class_value_t int
5454
#define H5O_native_info_t int
5555
#define H5VL_subclass_t int
5656
#define H5R_ref_t int
57-
#define H5D_chunk_iter_op_t int
5857
#endif /* H5_VERS_MINOR < 12 */
5958

59+
#if H5_VERS_MINOR < 13
60+
#define H5D_chunk_iter_op_t int
61+
#endif /* H5_VERS_MINOR < 13 */
62+
6063
#if H5_VERS_MINOR < 14
6164
#define H5_atclose_func_t int
6265
#define H5ES_err_info_t int
@@ -101,8 +104,8 @@ bool gotcha_netcdf_tracing();
101104

102105
/**
103106
* WRAPPER_TYPE: type of function pointer of the wrapper
104-
* WRAPPEE_HANDLE: wrapee handle name
105-
* WRAPPER_NAME: wrapper name
107+
* WRAPPEE_HANDLE: wrapee handle name
108+
* WRAPPER_NAME: wrapper name
106109
*/
107110
#define WRAPPER_TYPE(func) fptr_type_##func
108111
#define WRAPPEE_HANDLE(func) wrappee_handle_##func
@@ -135,8 +138,8 @@ bool gotcha_netcdf_tracing();
135138
* gotcha_get_wrappee() to get the correct pointer.
136139
* Otherwise, simply return the acutal funciton pointer.
137140
*
138-
* The _NOCHECK version assumes the function has been
139-
* wrapped by GOTCHA library (i.e. function will be
141+
* The _NOCHECK version assumes the function has been
142+
* wrapped by GOTCHA library (i.e. function will be
140143
* intercepted by Recorder). Caller of this version must
141144
* make sure of this!
142145
*/
@@ -366,7 +369,7 @@ GOTCHA_WRAP(MPI_Cart_sub, int, (MPI_Comm comm, const int remain_dims[], MPI_Comm
366369
GOTCHA_WRAP(MPI_Comm_split_type, int, (MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm));
367370

368371

369-
// HDF5
372+
// HDF5
370373
GOTCHA_WRAP(H5Dread, herr_t, (hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, void *buf));
371374
GOTCHA_WRAP(H5Adelete_by_idx, herr_t, (hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id));
372375
GOTCHA_WRAP(H5Fflush, herr_t, (hid_t object_id, H5F_scope_t scope));

0 commit comments

Comments
 (0)