[Darshan-commits] [Git][darshan/darshan][master] 2 commits: bug fix for common access counter updates

Shane Snyder xgitlab at cels.anl.gov
Fri May 15 10:13:02 CDT 2020



Shane Snyder pushed to branch master at darshan / darshan


Commits:
f7b2b8fd by Shane Snyder at 2020-05-15T10:10:42-05:00
bug fix for common access counter updates

- - - - -
f523614c by Shane Snyder at 2020-05-15T10:13:00-05:00
Merge branch 'dev-common-access-274' into 'master'

bug fix for common access counter updates

Closes #274

See merge request darshan/darshan!55
- - - - -


1 changed file:

- darshan-runtime/darshan-common.h


Changes:

=====================================
darshan-runtime/darshan-common.h
=====================================
@@ -95,7 +95,7 @@
     if(*(int64_t *)__vals == 0) break; \
     for(i_=0; i_<4; i_++) { \
         if(__add_flag && \
-            !memcmp(__val_p + (i_ * sizeof(*__vals) * __val_size), \
+            !memcmp(__val_p + (i_ * __val_size), \
                 __vals, sizeof(*__vals) * __val_size)) { \
             total_count += *(__cnt_p + i_); \
             break; \
@@ -107,8 +107,8 @@
     for(i_=0; i_ < 4; i_++) { \
         if((*(__cnt_p + i_) > total_count) || \
            ((*(__cnt_p + i_) == total_count) && \
-           (*(__val_p + (i_ * sizeof(*__vals) * __val_size)) > *(int64_t *)__vals))) { \
-            memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * sizeof(*__vals) * __val_size), \
+           (*(__val_p + (i_ * __val_size)) > *(int64_t *)__vals))) { \
+            memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * __val_size), \
                 sizeof(*__vals) * __val_size); \
             tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
             tmp_ndx++; \
@@ -122,9 +122,9 @@
     tmp_ndx++; \
     /* last, copy over any remaining counters to make sure we have 4 sets total */ \
     while(tmp_ndx != 4) { \
-        if(memcmp(__val_p + (i_ * sizeof(*__vals) * __val_size), \
+        if(memcmp(__val_p + (i_ * __val_size), \
                 __vals, sizeof(*__vals) * __val_size)) { \
-            memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * sizeof(*__vals) * __val_size), \
+            memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * __val_size), \
                 sizeof(*__vals) * __val_size); \
             tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
             tmp_ndx++; \



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/79ec4106512f745800cba6aca9ce8eeb85f52e65...f523614c64b0c983e9f94191acf635d20ebafb07

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/79ec4106512f745800cba6aca9ce8eeb85f52e65...f523614c64b0c983e9f94191acf635d20ebafb07
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200515/77882f19/attachment-0001.html>


More information about the Darshan-commits mailing list