[Darshan-commits] [Git][darshan/darshan][issue-217-hdf5-abi-switch] bug fix

Philip Carns xgitlab at cels.anl.gov
Wed Jan 25 23:16:13 CST 2017


Philip Carns pushed to branch issue-217-hdf5-abi-switch at darshan / darshan


Commits:
c9b803c9 by Phil Carns at 2017-01-25T21:15:48-08:00
bug fix

- - - - -


1 changed file:

- darshan-runtime/lib/darshan-hdf5.c


Changes:

=====================================
darshan-runtime/lib/darshan-hdf5.c
=====================================
--- a/darshan-runtime/lib/darshan-hdf5.c
+++ b/darshan-runtime/lib/darshan-hdf5.c
@@ -126,11 +126,13 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
     MAP_OR_FAIL(H5get_libversion);
     __real_H5get_libversion(&majnum, &minnum, &relnum);
 #ifdef __DARSHAN_ENABLE_HDF5110
-    if((ret < 0) || (majnum < 1 || (majnum == 1 && minnum < 10)))
+    if(majnum < 1 || (majnum == 1 && minnum < 10))
 #else
-    if((ret < 0) || (majnum > 1 || (majnum == 1 && minnum >= 10)))
+    if(majnum > 1 || (majnum == 1 && minnum >= 10))
 #endif
     {
+        if(my_rank < 0)
+            MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
         if(my_rank == 0)
         {
             fprintf(stderr, "Darshan HDF5 module error: runtime library version does not match Darshan module.\n");
@@ -173,11 +175,13 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
     MAP_OR_FAIL(H5get_libversion);
     __real_H5get_libversion(&majnum, &minnum, &relnum);
 #ifdef __DARSHAN_ENABLE_HDF5110
-    if((ret < 0) || (majnum < 1 || (majnum == 1 && minnum < 10)))
+    if(majnum < 1 || (majnum == 1 && minnum < 10))
 #else
-    if((ret < 0) || (majnum > 1 || (majnum == 1 && minnum >= 10)))
+    if(majnum > 1 || (majnum == 1 && minnum >= 10))
 #endif
     {
+        if(my_rank < 0)
+            MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
         if(my_rank == 0)
         {
             fprintf(stderr, "Darshan HDF5 module error: runtime library version does not match Darshan module.\n");



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/c9b803c95f202223daf8c6a3b0363678159c6f00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20170125/57119f14/attachment-0001.html>


More information about the Darshan-commits mailing list