[Darshan-commits] [Git][darshan/darshan][master] bug fix in lustre module sort

Shane Snyder xgitlab at cels.anl.gov
Fri Jul 1 13:54:55 CDT 2016


Shane Snyder pushed to branch master at darshan / darshan


Commits:
642a9db7 by Shane Snyder at 2016-07-01T11:54:30-07:00
bug fix in lustre module sort

- - - - -


1 changed file:

- darshan-runtime/lib/darshan-lustre.c


Changes:

=====================================
darshan-runtime/lib/darshan-lustre.c
=====================================
--- a/darshan-runtime/lib/darshan-lustre.c
+++ b/darshan-runtime/lib/darshan-lustre.c
@@ -293,8 +293,8 @@ static void lustre_set_rec_ref_pointers(void *rec_ref_p)
 /* compare function for sorting file records by descending rank */
 static int lustre_record_compare(const void* a_p, const void* b_p)
 {
-    const struct lustre_record_ref* a = a_p;
-    const struct lustre_record_ref* b = b_p;
+    const struct lustre_record_ref* a = *((struct lustre_record_ref **)a_p);
+    const struct lustre_record_ref* b = *((struct lustre_record_ref **)b_p);
 
     if (a->record->base_rec.rank < b->record->base_rec.rank)
         return 1;
@@ -358,7 +358,7 @@ int sort_lustre_records()
     qsort(
         lustre_runtime->record_ref_array,
         lustre_runtime->record_count,
-        sizeof(struct lustre_record_ref),
+        sizeof(struct lustre_record_ref *),
         lustre_record_compare
     );
 



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/642a9db73055d53db11ed7b048e67f68fc46fb60
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160701/3b6e151e/attachment-0001.html>


More information about the Darshan-commits mailing list