Commit 604df8cc authored by Philip Carns's avatar Philip Carns

fix __wrap_H5get_libversion undefined reference

- reported by Jialin Liu
- triggered by some HDF5 programs
- solved by eliminating incomplete wrapper mechanisms for H5get_libversion()
  and invoking it directly (Darshan needs to use, not wrap, this
  function)
parent 61a1fa01
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Darshan Release Change Log Darshan Release Change Log
-------------------------- --------------------------
Darshan-3.1.5-pre1 Darshan-3.1.5
============= =============
* modify Darshan MPI instrumentation method to intercept both MPI and * modify Darshan MPI instrumentation method to intercept both MPI and
PMPI symbols to workaround MPI implementations that are calling PMPI symbols to workaround MPI implementations that are calling
...@@ -19,6 +19,8 @@ Darshan-3.1.5-pre1 ...@@ -19,6 +19,8 @@ Darshan-3.1.5-pre1
* add support for DARSHAN_EXCLUDE_DIRS environment variable to * add support for DARSHAN_EXCLUDE_DIRS environment variable to
explicitly disable instrumentation for files in given explicitly disable instrumentation for files in given
directories. Contributed by Cristian Simarro. directories. Contributed by Cristian Simarro.
* correct "undefined reference to `__wrap_H5get_libversion'" linker failure
when compiling some HDF5 programs, reported by Jialin Liu
Darshan-3.1.4 Darshan-3.1.4
============= =============
......
...@@ -36,7 +36,11 @@ typedef int herr_t; //hf5-1.10.0p1: H5public.h:126 ...@@ -36,7 +36,11 @@ typedef int herr_t; //hf5-1.10.0p1: H5public.h:126
DARSHAN_FORWARD_DECL(H5Fcreate, hid_t, (const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist)); DARSHAN_FORWARD_DECL(H5Fcreate, hid_t, (const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist));
DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_t access_plist)); DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_t access_plist));
DARSHAN_FORWARD_DECL(H5Fclose, herr_t, (hid_t file_id)); DARSHAN_FORWARD_DECL(H5Fclose, herr_t, (hid_t file_id));
DARSHAN_FORWARD_DECL(H5get_libversion, herr_t, (unsigned *majnum, unsigned *minnum, unsigned *relnum));
/* prototype for HDF symbols that we will call directly from within other
* wrappers if HDF is linked in
*/
extern herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum);
/* structure that can track i/o stats for a given HDF5 file record at runtime */ /* structure that can track i/o stats for a given HDF5 file record at runtime */
struct hdf5_file_record_ref struct hdf5_file_record_ref
...@@ -122,8 +126,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, ...@@ -122,8 +126,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
double tm1; double tm1;
unsigned majnum, minnum, relnum; unsigned majnum, minnum, relnum;
MAP_OR_FAIL(H5get_libversion); H5get_libversion(&majnum, &minnum, &relnum);
__real_H5get_libversion(&majnum, &minnum, &relnum);
#ifdef __DARSHAN_ENABLE_HDF5110 #ifdef __DARSHAN_ENABLE_HDF5110
if(majnum < 1 || (majnum == 1 && minnum < 10)) if(majnum < 1 || (majnum == 1 && minnum < 10))
#else #else
...@@ -171,8 +174,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -171,8 +174,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
double tm1; double tm1;
unsigned majnum, minnum, relnum; unsigned majnum, minnum, relnum;
MAP_OR_FAIL(H5get_libversion); H5get_libversion(&majnum, &minnum, &relnum);
__real_H5get_libversion(&majnum, &minnum, &relnum);
#ifdef __DARSHAN_ENABLE_HDF5110 #ifdef __DARSHAN_ENABLE_HDF5110
if(majnum < 1 || (majnum == 1 && minnum < 10)) if(majnum < 1 || (majnum == 1 && minnum < 10))
#else #else
......
...@@ -2,4 +2,3 @@ ...@@ -2,4 +2,3 @@
--wrap=H5Fcreate --wrap=H5Fcreate
--wrap=H5Fopen --wrap=H5Fopen
--wrap=H5Fclose --wrap=H5Fclose
--wrap=H5get_libversion
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment