Skip to content

Commit

Permalink
Fix a hdf5 api compatibility issue
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Wang <[email protected]>
  • Loading branch information
wangvsa committed Jan 4, 2025
1 parent e3ddd11 commit 36404a6
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions include/recorder-gotcha.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "mpi.h"

#include "hdf5.h"
#include "hdf5_hl.h"
#include "hdf5_hl.h"

#ifdef RECORDER_WITH_PNETCDF
#include "pnetcdf.h"
Expand Down Expand Up @@ -47,16 +47,19 @@
#define H5O_info2_t int
#define H5L_info1_t int
#define H5L_info2_t int
#define H5O_iterate1_t int
#define H5O_iterate2_t int
#define H5O_iterate1_t int
#define H5O_iterate2_t int
#define H5L_iterate2_t int
#define H5VL_class_value_t int
#define H5O_native_info_t int
#define H5VL_subclass_t int
#define H5R_ref_t int
#define H5D_chunk_iter_op_t int
#endif /* H5_VERS_MINOR < 12 */

#if H5_VERS_MINOR < 13
#define H5D_chunk_iter_op_t int
#endif /* H5_VERS_MINOR < 13 */

#if H5_VERS_MINOR < 14
#define H5_atclose_func_t int
#define H5ES_err_info_t int
Expand Down Expand Up @@ -101,8 +104,8 @@ bool gotcha_netcdf_tracing();

/**
* WRAPPER_TYPE: type of function pointer of the wrapper
* WRAPPEE_HANDLE: wrapee handle name
* WRAPPER_NAME: wrapper name
* WRAPPEE_HANDLE: wrapee handle name
* WRAPPER_NAME: wrapper name
*/
#define WRAPPER_TYPE(func) fptr_type_##func
#define WRAPPEE_HANDLE(func) wrappee_handle_##func
Expand Down Expand Up @@ -135,8 +138,8 @@ bool gotcha_netcdf_tracing();
* gotcha_get_wrappee() to get the correct pointer.
* Otherwise, simply return the acutal funciton pointer.
*
* The _NOCHECK version assumes the function has been
* wrapped by GOTCHA library (i.e. function will be
* The _NOCHECK version assumes the function has been
* wrapped by GOTCHA library (i.e. function will be
* intercepted by Recorder). Caller of this version must
* make sure of this!
*/
Expand Down Expand Up @@ -366,7 +369,7 @@ GOTCHA_WRAP(MPI_Cart_sub, int, (MPI_Comm comm, const int remain_dims[], MPI_Comm
GOTCHA_WRAP(MPI_Comm_split_type, int, (MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm));


// HDF5
// HDF5
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));
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));
GOTCHA_WRAP(H5Fflush, herr_t, (hid_t object_id, H5F_scope_t scope));
Expand Down

0 comments on commit 36404a6

Please sign in to comment.