<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Shane Snyder pushed to branch mmap-dev
at <a href="https://xgitlab.cels.anl.gov/darshan/darshan">darshan / darshan</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/bb625cbdd397f3697d304af2a7bb774d3164b1b7">bb625cbd</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-02-05T13:53:21-06:00</i>
</div>
<pre class='commit-message'>allow common counters to be updated on the go</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b">37b1bb02</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-02-05T17:27:54-06:00</i>
</div>
<pre class='commit-message'>add common counter aggregation to logutils</pre>
</li>
</ul>
<h4>6 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/darshan-common.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/lib/darshan-common.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/lib/darshan-mpiio.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-runtime/lib/darshan-posix.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
darshan-util/darshan-mpiio-logutils.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
darshan-util/darshan-posix-logutils.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-0'>
<strong>
darshan-runtime/darshan-common.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/darshan-common.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/darshan-common.h
</span><span style="color: #aaaaaa">@@ -73,18 +73,24 @@
</span>  * base of the value counters (i.e., the first of 4 contiguous common value
  * counters) and __cnt_p is a pointer to the base of the count counters (i.e.
  * the first of 4 contiguous common count counters). It is assumed your counters
<span style="color: #000000;background-color: #ffdddd">- * are stored as int64_t types.
</span><span style="color: #000000;background-color: #ddffdd">+ * are stored as int64_t types. __online_flag is set if the common val counters are
+ * updated during runtime (as opposed to being updated once at darshan shutdown time).
</span>  */
<span style="color: #000000;background-color: #ffdddd">-#define DARSHAN_COMMON_VAL_COUNTER_INC(__val_p, __cnt_p, __value, __count) do {\
</span><span style="color: #000000;background-color: #ddffdd">+#define DARSHAN_COMMON_VAL_COUNTER_INC(__val_p, __cnt_p, __value, __count, __online_flag) do {\
</span>     int i; \
     int set = 0; \
     int64_t min = *(__cnt_p); \
     int min_index = 0; \
<span style="color: #000000;background-color: #ddffdd">+    int inc_count; \
</span>     if(__value == 0) break; \
<span style="color: #000000;background-color: #ddffdd">+    if(__online_flag) \
+        inc_count = 1; \
+    else \
+        inc_count = __count; \
</span>     for(i=0; i<4; i++) { \
         /* increment bucket if already exists */ \
         if(*(__val_p + i) == __value) { \
<span style="color: #000000;background-color: #ffdddd">-            *(__cnt_p + i) += __count; \
</span><span style="color: #000000;background-color: #ddffdd">+            *(__cnt_p + i) += inc_count; \
</span>             set = 1; \
             break; \
         } \
<span style="color: #aaaaaa">@@ -138,7 +144,7 @@ struct darshan_variance_dt
</span>  * path string.
  */
 char* darshan_clean_file_path(
<span style="color: #000000;background-color: #ffdddd">-    const char* path);
</span><span style="color: #000000;background-color: #ddffdd">+    const char *path);
</span> 
 /* darshan_common_val_counter()
  *
<span style="color: #aaaaaa">@@ -148,13 +154,19 @@ char* darshan_clean_file_path(
</span>  * used by a specific module, for instance. 'common_val_root' is the
  * root pointer for the tree which stores common value info, 
  * 'common_val_count' is a pointer to the number of nodes in the 
<span style="color: #000000;background-color: #ffdddd">- * tree (i.e., the number of allocated common value counters), and
- * 'val' is the new value to attempt to add.
</span><span style="color: #000000;background-color: #ddffdd">+ * tree (i.e., the number of allocated common value counters), 'val'
+ * is the new value to attempt to add, 'val_p' is a pointer to the
+ * base counter (i.e., the first) of the common values (which are
+ * assumed to be 4 total and contiguous in memory), and 'cnt_p' is
+ * a pointer to the base counter of the common counts (which are
+ * again expected to be contiguous in memory).
</span>  */
 void darshan_common_val_counter(
<span style="color: #000000;background-color: #ffdddd">-    void** common_val_root,
-    int* common_val_count,
-    int64_t val);
</span><span style="color: #000000;background-color: #ddffdd">+    void **common_val_root,
+    int *common_val_count,
+    int64_t val,
+    int64_t *val_p,
+    int64_t *cnt_p);
</span> 
 /* darshan_walk_common_vals()
  *
<span style="color: #aaaaaa">@@ -168,9 +180,9 @@ void darshan_common_val_counter(
</span>  * (which are again expected to be contiguous in memory).
  */
 void darshan_walk_common_vals(
<span style="color: #000000;background-color: #ffdddd">-    void* common_val_root,
-    int64_t* val_p,
-    int64_t* cnt_p);
</span><span style="color: #000000;background-color: #ddffdd">+    void *common_val_root,
+    int64_t *val_p,
+    int64_t *cnt_p);
</span> 
 /* darshan_variance_reduce()
  *
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-1'>
<strong>
darshan-runtime/lib/darshan-common.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-common.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-common.c
</span><span style="color: #aaaaaa">@@ -83,7 +83,7 @@ static int64_t* walker_val_p = NULL;
</span> static int64_t* walker_cnt_p = NULL;
 
 void darshan_common_val_counter(void **common_val_root, int *common_val_count,
<span style="color: #000000;background-color: #ffdddd">-    int64_t val)
</span><span style="color: #000000;background-color: #ddffdd">+    int64_t val, int64_t *common_val_p, int64_t *common_cnt_p)
</span> {
     struct darshan_common_val_counter* counter;
     struct darshan_common_val_counter* found;
<span style="color: #aaaaaa">@@ -102,12 +102,10 @@ void darshan_common_val_counter(void **common_val_root, int *common_val_count,
</span>     {
         found = *(struct darshan_common_val_counter**)tmp;
         found->freq++;
<span style="color: #000000;background-color: #ffdddd">-        return;
</span>     }
<span style="color: #000000;background-color: #ffdddd">-
-    /* we can add a new one as long as we haven't hit the limit */
-    if(*common_val_count < DARSHAN_COMMON_VAL_MAX_RUNTIME_COUNT)
</span><span style="color: #000000;background-color: #ddffdd">+    else if(*common_val_count < DARSHAN_COMMON_VAL_MAX_RUNTIME_COUNT)
</span>     {
<span style="color: #000000;background-color: #ddffdd">+        /* we can add a new one as long as we haven't hit the limit */
</span>         counter = malloc(sizeof(*counter));
         if(!counter)
         {
<span style="color: #aaaaaa">@@ -127,22 +125,28 @@ void darshan_common_val_counter(void **common_val_root, int *common_val_count,
</span>         (*common_val_count)++;
     }
 
<span style="color: #000000;background-color: #ddffdd">+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
+    /* if we are using darshan's mmap feature, update common access
+     * counters as we go
+     */
+    DARSHAN_COMMON_VAL_COUNTER_INC(common_val_p, common_cnt_p,
+        found->val, found->freq, 1);
+#endif
+
</span>     return;
 }
 
<span style="color: #000000;background-color: #ffdddd">-void darshan_walk_common_vals(void *common_val_root, int64_t* val_p,
-    int64_t* cnt_p)
</span><span style="color: #000000;background-color: #ddffdd">+void darshan_walk_common_vals(void *common_val_root, int64_t *val_p,
+    int64_t *cnt_p)
</span> {
     walker_val_p = val_p;
     walker_cnt_p = cnt_p;
 
     twalk(common_val_root, darshan_common_val_walker);
<span style="color: #000000;background-color: #ffdddd">-    tdestroy(common_val_root, free);
-
</span>     return;
 }
 
<span style="color: #000000;background-color: #ffdddd">-static void darshan_common_val_walker(const void* nodep, const VISIT which,
</span><span style="color: #000000;background-color: #ddffdd">+static void darshan_common_val_walker(const void *nodep, const VISIT which,
</span>     const int depth)
 {
     struct darshan_common_val_counter* counter;
<span style="color: #aaaaaa">@@ -153,7 +157,7 @@ static void darshan_common_val_walker(const void* nodep, const VISIT which,
</span>         case leaf:
             counter = *(struct darshan_common_val_counter**)nodep;
             DARSHAN_COMMON_VAL_COUNTER_INC(walker_val_p, walker_cnt_p,
<span style="color: #000000;background-color: #ffdddd">-                counter->val, counter->freq);
</span><span style="color: #000000;background-color: #ddffdd">+                counter->val, counter->freq, 0);
</span>         default:
             break;
     }
<span style="color: #aaaaaa">@@ -161,7 +165,7 @@ static void darshan_common_val_walker(const void* nodep, const VISIT which,
</span>     return;
 }
 
<span style="color: #000000;background-color: #ffdddd">-static int darshan_common_val_compare(const void* a_p, const void* b_p)
</span><span style="color: #000000;background-color: #ddffdd">+static int darshan_common_val_compare(const void *a_p, const void *b_p)
</span> {
     const struct darshan_common_val_counter* a = a_p;
     const struct darshan_common_val_counter* b = b_p;
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-2'>
<strong>
darshan-runtime/lib/darshan-mpiio.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-mpiio.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-mpiio.c
</span><span style="color: #aaaaaa">@@ -4,6 +4,9 @@
</span>  *
  */
 
<span style="color: #000000;background-color: #ddffdd">+#define _XOPEN_SOURCE 500
+#define _GNU_SOURCE
+
</span> #include "darshan-runtime-config.h"
 #include <stdio.h>
 #include <unistd.h>
<span style="color: #aaaaaa">@@ -17,7 +20,6 @@
</span> #include <errno.h>
 #include <search.h>
 #include <assert.h>
<span style="color: #000000;background-color: #ffdddd">-#define __USE_GNU
</span> #include <pthread.h>
 
 #include "uthash.h"
<span style="color: #aaaaaa">@@ -138,7 +140,9 @@ static void mpiio_shutdown(void);
</span>     DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size);  \
     size = size * __count; \
     DARSHAN_BUCKET_INC(&(file->file_record->counters[MPIIO_SIZE_READ_AGG_0_100]), size); \
<span style="color: #000000;background-color: #ffdddd">-    darshan_common_val_counter(&file->access_root, &file->access_count, size); \
</span><span style="color: #000000;background-color: #ddffdd">+    darshan_common_val_counter(&file->access_root, &file->access_count, size, \
+        &(file->file_record->counters[MPIIO_ACCESS1_ACCESS]), \
+        &(file->file_record->counters[MPIIO_ACCESS1_COUNT])); \
</span>     file->file_record->counters[MPIIO_BYTES_READ] += size; \
     file->file_record->counters[__counter] += 1; \
     if(file->last_io_type == DARSHAN_IO_WRITE) \
<span style="color: #aaaaaa">@@ -150,7 +154,8 @@ static void mpiio_shutdown(void);
</span>     if(file->file_record->fcounters[MPIIO_F_MAX_READ_TIME] < __elapsed) { \
         file->file_record->fcounters[MPIIO_F_MAX_READ_TIME] = __elapsed; \
         file->file_record->counters[MPIIO_MAX_READ_TIME_SIZE] = size; } \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[MPIIO_F_READ_TIME], __tm1, __tm2, file->last_read_end); \
</span><span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[MPIIO_F_READ_TIME], \
+        __tm1, __tm2, file->last_read_end); \
</span> } while(0)
 
 #define MPIIO_RECORD_WRITE(__ret, __fh, __count, __datatype, __counter, __tm1, __tm2) do { \
<span style="color: #aaaaaa">@@ -163,7 +168,9 @@ static void mpiio_shutdown(void);
</span>     DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size);  \
     size = size * __count; \
     DARSHAN_BUCKET_INC(&(file->file_record->counters[MPIIO_SIZE_WRITE_AGG_0_100]), size); \
<span style="color: #000000;background-color: #ffdddd">-    darshan_common_val_counter(&file->access_root, &file->access_count, size); \
</span><span style="color: #000000;background-color: #ddffdd">+    darshan_common_val_counter(&file->access_root, &file->access_count, size, \
+        &(file->file_record->counters[MPIIO_ACCESS1_ACCESS]), \
+        &(file->file_record->counters[MPIIO_ACCESS1_COUNT])); \
</span>     file->file_record->counters[MPIIO_BYTES_WRITTEN] += size; \
     file->file_record->counters[__counter] += 1; \
     if(file->last_io_type == DARSHAN_IO_READ) \
<span style="color: #aaaaaa">@@ -175,7 +182,8 @@ static void mpiio_shutdown(void);
</span>     if(file->file_record->fcounters[MPIIO_F_MAX_WRITE_TIME] < __elapsed) { \
         file->file_record->fcounters[MPIIO_F_MAX_WRITE_TIME] = __elapsed; \
         file->file_record->counters[MPIIO_MAX_WRITE_TIME_SIZE] = size; } \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[MPIIO_F_WRITE_TIME], __tm1, __tm2, file->last_write_end); \
</span><span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[MPIIO_F_WRITE_TIME], \
+        __tm1, __tm2, file->last_write_end); \
</span> } while(0)
 
 /**********************************************************
<span style="color: #aaaaaa">@@ -1088,7 +1096,7 @@ static void mpiio_record_reduction_op(
</span>         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[MPIIO_ACCESS1_ACCESS]),
                 &(tmp_file.counters[MPIIO_ACCESS1_COUNT]), infile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                infile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile->counters[j+4], 0);
</span>         }
 
         /* second set */
<span style="color: #aaaaaa">@@ -1096,7 +1104,7 @@ static void mpiio_record_reduction_op(
</span>         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[MPIIO_ACCESS1_ACCESS]),
                 &(tmp_file.counters[MPIIO_ACCESS1_COUNT]), inoutfile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                inoutfile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                inoutfile->counters[j+4], 0);
</span>         }
 
         /* min non-zero (if available) value */
<span style="color: #aaaaaa">@@ -1328,10 +1336,18 @@ static void mpiio_get_output_data(
</span>     {
         tmp = &(mpiio_runtime->file_runtime_array[i]);
 
<span style="color: #000000;background-color: #ddffdd">+#ifndef __DARSHAN_ENABLE_MMAP_LOGS
+        /* walk common counters to get 4 most common -- only if mmap
+         * feature is disabled (mmap updates counters on the go)
+         */
+
</span>         /* common access sizes */
         darshan_walk_common_vals(tmp->access_root,
             &(tmp->file_record->counters[MPIIO_ACCESS1_ACCESS]),
             &(tmp->file_record->counters[MPIIO_ACCESS1_COUNT]));
<span style="color: #000000;background-color: #ddffdd">+#endif
+
+        tdestroy(tmp->access_root, free);
</span>     }
 
     /* if there are globally shared files, do a shared file reduction */
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-3'>
<strong>
darshan-runtime/lib/darshan-posix.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #aaaaaa">@@ -220,7 +220,8 @@ static void posix_shutdown(void);
</span>         file->file_record->counters[POSIX_OPENS] += 1; \
     if(file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] == 0) \
         file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] = __tm1; \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_META_TIME], __tm1, __tm2, file->last_meta_end); \
</span><span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_META_TIME], \
+        __tm1, __tm2, file->last_meta_end); \
</span> } while(0)
 
 #define POSIX_RECORD_READ(__ret, __fd, __pread_flag, __pread_offset, __aligned, __stream_flag, __tm1, __tm2) do{ \
<span style="color: #aaaaaa">@@ -255,8 +256,12 @@ static void posix_shutdown(void);
</span>     else \
         file->file_record->counters[POSIX_READS] += 1; \
     DARSHAN_BUCKET_INC(&(file->file_record->counters[POSIX_SIZE_READ_0_100]), __ret); \
<span style="color: #000000;background-color: #ffdddd">-    darshan_common_val_counter(&file->access_root, &file->access_count, __ret); \
-    darshan_common_val_counter(&file->stride_root, &file->stride_count, stride); \
</span><span style="color: #000000;background-color: #ddffdd">+    darshan_common_val_counter(&file->access_root, &file->access_count, __ret, \
+        &(file->file_record->counters[POSIX_ACCESS1_ACCESS]), \
+        &(file->file_record->counters[POSIX_ACCESS1_COUNT])); \
+    darshan_common_val_counter(&file->stride_root, &file->stride_count, stride, \
+        &(file->file_record->counters[POSIX_STRIDE1_STRIDE]), \
+        &(file->file_record->counters[POSIX_STRIDE1_COUNT])); \
</span>     if(!__aligned) \
         file->file_record->counters[POSIX_MEM_NOT_ALIGNED] += 1; \
     file_alignment = file->file_record->counters[POSIX_FILE_ALIGNMENT]; \
<span style="color: #aaaaaa">@@ -271,7 +276,8 @@ static void posix_shutdown(void);
</span>     if(file->file_record->fcounters[POSIX_F_MAX_READ_TIME] < __elapsed) { \
         file->file_record->fcounters[POSIX_F_MAX_READ_TIME] = __elapsed; \
         file->file_record->counters[POSIX_MAX_READ_TIME_SIZE] = __ret; } \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_READ_TIME], __tm1, __tm2, file->last_read_end); \
</span><span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_READ_TIME], \
+        __tm1, __tm2, file->last_read_end); \
</span> } while(0)
 
 #define POSIX_RECORD_WRITE(__ret, __fd, __pwrite_flag, __pwrite_offset, __aligned, __stream_flag, __tm1, __tm2) do{ \
<span style="color: #aaaaaa">@@ -306,8 +312,12 @@ static void posix_shutdown(void);
</span>     else \
         file->file_record->counters[POSIX_WRITES] += 1; \
     DARSHAN_BUCKET_INC(&(file->file_record->counters[POSIX_SIZE_WRITE_0_100]), __ret); \
<span style="color: #000000;background-color: #ffdddd">-    darshan_common_val_counter(&file->access_root, &file->access_count, __ret); \
-    darshan_common_val_counter(&file->stride_root, &file->stride_count, stride); \
</span><span style="color: #000000;background-color: #ddffdd">+    darshan_common_val_counter(&file->access_root, &file->access_count, __ret, \
+        &(file->file_record->counters[POSIX_ACCESS1_ACCESS]), \
+        &(file->file_record->counters[POSIX_ACCESS1_COUNT])); \
+    darshan_common_val_counter(&file->stride_root, &file->stride_count, stride, \
+        &(file->file_record->counters[POSIX_STRIDE1_STRIDE]), \
+        &(file->file_record->counters[POSIX_STRIDE1_COUNT])); \
</span>     if(!__aligned) \
         file->file_record->counters[POSIX_MEM_NOT_ALIGNED] += 1; \
     file_alignment = file->file_record->counters[POSIX_FILE_ALIGNMENT]; \
<span style="color: #aaaaaa">@@ -322,7 +332,8 @@ static void posix_shutdown(void);
</span>     if(file->file_record->fcounters[POSIX_F_MAX_WRITE_TIME] < __elapsed) { \
         file->file_record->fcounters[POSIX_F_MAX_WRITE_TIME] = __elapsed; \
         file->file_record->counters[POSIX_MAX_WRITE_TIME_SIZE] = __ret; } \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_WRITE_TIME], __tm1, __tm2, file->last_write_end); \
</span><span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_WRITE_TIME], \
+        __tm1, __tm2, file->last_write_end); \
</span> } while(0)
 
 #define POSIX_LOOKUP_RECORD_STAT(__path, __statbuf, __tm1, __tm2) do { \
<span style="color: #aaaaaa">@@ -336,8 +347,9 @@ static void posix_shutdown(void);
</span> } while(0)
 
 #define POSIX_RECORD_STAT(__file, __statbuf, __tm1, __tm2) do { \
<span style="color: #000000;background-color: #ffdddd">-    DARSHAN_TIMER_INC_NO_OVERLAP((__file)->file_record->fcounters[POSIX_F_META_TIME], __tm1, __tm2, (__file)->last_meta_end); \
</span>     (__file)->file_record->counters[POSIX_STATS] += 1; \
<span style="color: #000000;background-color: #ddffdd">+    DARSHAN_TIMER_INC_NO_OVERLAP((__file)->file_record->fcounters[POSIX_F_META_TIME], \
+        __tm1, __tm2, (__file)->last_meta_end); \
</span> } while(0)
 
 
<span style="color: #aaaaaa">@@ -1773,14 +1785,14 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
</span>         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[POSIX_STRIDE1_STRIDE]),
                 &(tmp_file.counters[POSIX_STRIDE1_COUNT]), infile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                infile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile->counters[j+4], 0);
</span>         }
         /* second set */
         for(j=POSIX_STRIDE1_STRIDE; j<=POSIX_STRIDE4_STRIDE; j++)
         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[POSIX_STRIDE1_STRIDE]),
                 &(tmp_file.counters[POSIX_STRIDE1_COUNT]), inoutfile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                inoutfile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                inoutfile->counters[j+4], 0);
</span>         }
 
         /* same for access counts */
<span style="color: #aaaaaa">@@ -1804,14 +1816,14 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
</span>         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[POSIX_ACCESS1_ACCESS]),
                 &(tmp_file.counters[POSIX_ACCESS1_COUNT]), infile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                infile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile->counters[j+4], 0);
</span>         }
         /* second set */
         for(j=POSIX_ACCESS1_ACCESS; j<=POSIX_ACCESS4_ACCESS; j++)
         {
             DARSHAN_COMMON_VAL_COUNTER_INC(&(tmp_file.counters[POSIX_ACCESS1_ACCESS]),
                 &(tmp_file.counters[POSIX_ACCESS1_COUNT]), inoutfile->counters[j],
<span style="color: #000000;background-color: #ffdddd">-                inoutfile->counters[j+4]);
</span><span style="color: #000000;background-color: #ddffdd">+                inoutfile->counters[j+4], 0);
</span>         }
 
         /* min non-zero (if available) value */
<span style="color: #aaaaaa">@@ -2046,6 +2058,11 @@ static void posix_get_output_data(
</span>     {
         tmp = &(posix_runtime->file_runtime_array[i]);
 
<span style="color: #000000;background-color: #ddffdd">+#ifndef __DARSHAN_ENABLE_MMAP_LOGS
+        /* walk common counters to get 4 most common -- only if mmap
+         * feature is disabled (mmap updates counters on the go)
+         */
+
</span>         /* common accesses */
         darshan_walk_common_vals(tmp->access_root,
             &(tmp->file_record->counters[POSIX_ACCESS1_ACCESS]),
<span style="color: #aaaaaa">@@ -2054,6 +2071,10 @@ static void posix_get_output_data(
</span>         darshan_walk_common_vals(tmp->stride_root,
             &(tmp->file_record->counters[POSIX_STRIDE1_STRIDE]),
             &(tmp->file_record->counters[POSIX_STRIDE1_COUNT]));
<span style="color: #000000;background-color: #ddffdd">+#endif
+
+        tdestroy(tmp->access_root, free);
+        tdestroy(tmp->stride_root, free);
</span>     }
 
     /* if there are globally shared files, do a shared file reduction */
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-4'>
<strong>
darshan-util/darshan-mpiio-logutils.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-mpiio-logutils.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-mpiio-logutils.c
</span><span style="color: #aaaaaa">@@ -228,7 +228,10 @@ static void darshan_log_agg_mpiio_files(void *rec, void *agg_rec, int init_flag)
</span> {
     struct darshan_mpiio_file *mpi_rec = (struct darshan_mpiio_file *)rec;
     struct darshan_mpiio_file *agg_mpi_rec = (struct darshan_mpiio_file *)agg_rec;
<span style="color: #000000;background-color: #ffdddd">-    int i;
</span><span style="color: #000000;background-color: #ddffdd">+    int i, j, k;
+    int set;
+    int min_ndx;
+    int64_t min;
</span>     double mpi_time = mpi_rec->fcounters[MPIIO_F_READ_TIME] +
         mpi_rec->fcounters[MPIIO_F_WRITE_TIME] +
         mpi_rec->fcounters[MPIIO_F_META_TIME];
<span style="color: #aaaaaa">@@ -310,8 +313,44 @@ static void darshan_log_agg_mpiio_files(void *rec, void *agg_rec, int init_flag)
</span>             case MPIIO_SLOWEST_RANK_BYTES:
                 /* these are set with the FP counters */
                 break;
<span style="color: #000000;background-color: #ddffdd">+            case MPIIO_ACCESS1_ACCESS:
+                /* increment common value counters */
+                for(j = i; j < i + 4; j++)
+                {
+                    min = agg_mpi_rec->counters[i + 4];
+                    min_ndx = 0;
+                    set = 0;
+                    for(k = 0; k < 4; k++)
+                    {
+                        if(agg_mpi_rec->counters[i + k] == mpi_rec->counters[j])
+                        {
+                            agg_mpi_rec->counters[i + k + 4] += mpi_rec->counters[j + 4];
+                            set = 1;
+                            break;
+                        }
+                        else if(agg_mpi_rec->counters[i + k + 4] < min)
+                        {
+                            min = agg_mpi_rec->counters[i + k + 4];
+                            min_ndx = k;
+                        }
+                    }
+                    if(!set && (mpi_rec->counters[j + 4] > min))
+                    {
+                        agg_mpi_rec->counters[i + min_ndx] = mpi_rec->counters[j];
+                        agg_mpi_rec->counters[i + min_ndx + 4] = mpi_rec->counters[j + 4];
+                    }
+                }
+                break;
+            case MPIIO_ACCESS2_ACCESS:
+            case MPIIO_ACCESS3_ACCESS:
+            case MPIIO_ACCESS4_ACCESS:
+            case MPIIO_ACCESS1_COUNT:
+            case MPIIO_ACCESS2_COUNT:
+            case MPIIO_ACCESS3_COUNT:
+            case MPIIO_ACCESS4_COUNT:
+                /* these are set all at once with common counters above */
+                break;
</span>             default:
<span style="color: #000000;background-color: #ffdddd">-                /* TODO: common access sizes */
</span>                 agg_mpi_rec->counters[i] = -1;
                 break;
         }
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b#diff-5'>
<strong>
darshan-util/darshan-posix-logutils.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-posix-logutils.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-posix-logutils.c
</span><span style="color: #aaaaaa">@@ -229,7 +229,10 @@ static void darshan_log_agg_posix_files(void *rec, void *agg_rec, int init_flag)
</span> {
     struct darshan_posix_file *psx_rec = (struct darshan_posix_file *)rec;
     struct darshan_posix_file *agg_psx_rec = (struct darshan_posix_file *)agg_rec;
<span style="color: #000000;background-color: #ffdddd">-    int i;
</span><span style="color: #000000;background-color: #ddffdd">+    int i, j, k;
+    int set;
+    int min_ndx;
+    int64_t min;
</span>     double psx_time = psx_rec->fcounters[POSIX_F_READ_TIME] +
         psx_rec->fcounters[POSIX_F_WRITE_TIME] +
         psx_rec->fcounters[POSIX_F_META_TIME];
<span style="color: #aaaaaa">@@ -326,8 +329,52 @@ static void darshan_log_agg_posix_files(void *rec, void *agg_rec, int init_flag)
</span>             case POSIX_SLOWEST_RANK_BYTES:
                 /* these are set with the FP counters */
                 break;
<span style="color: #000000;background-color: #ddffdd">+            case POSIX_STRIDE1_STRIDE:
+            case POSIX_ACCESS1_ACCESS:
+                /* increment common value counters */
+                for(j = i; j < i + 4; j++)
+                {
+                    min = agg_psx_rec->counters[i + 4];
+                    min_ndx = 0;
+                    set = 0;
+                    for(k = 0; k < 4; k++)
+                    {
+                        if(agg_psx_rec->counters[i + k] == psx_rec->counters[j])
+                        {
+                            agg_psx_rec->counters[i + k + 4] += psx_rec->counters[j + 4];
+                            set = 1;
+                            break;
+                        }
+                        else if(agg_psx_rec->counters[i + k + 4] < min)
+                        {
+                            min = agg_psx_rec->counters[i + k + 4];
+                            min_ndx = k;
+                        }
+                    }
+                    if(!set && (psx_rec->counters[j + 4] > min))
+                    {
+                        agg_psx_rec->counters[i + min_ndx] = psx_rec->counters[j];
+                        agg_psx_rec->counters[i + min_ndx + 4] = psx_rec->counters[j + 4];
+                    }
+                }
+                break;
+            case POSIX_STRIDE2_STRIDE:
+            case POSIX_STRIDE3_STRIDE:
+            case POSIX_STRIDE4_STRIDE:
+            case POSIX_STRIDE1_COUNT:
+            case POSIX_STRIDE2_COUNT:
+            case POSIX_STRIDE3_COUNT:
+            case POSIX_STRIDE4_COUNT:
+            case POSIX_ACCESS2_ACCESS:
+            case POSIX_ACCESS3_ACCESS:
+            case POSIX_ACCESS4_ACCESS:
+            case POSIX_ACCESS1_COUNT:
+            case POSIX_ACCESS2_COUNT:
+            case POSIX_ACCESS3_COUNT:
+            case POSIX_ACCESS4_COUNT:
+                /* these are set all at once with common counters above */
+                break;
</span>             default:
<span style="color: #000000;background-color: #ffdddd">-                /* TODO: common access counters and strides */
</span>                 agg_psx_rec->counters[i] = -1;
                 break;
         }
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/compare/a22233d71f256a142c0ddc2729e8d5cc0d59de45...37b1bb02d5c0a9bb80b024890d8ebaf6a73d977b">View it on GitLab</a>.
<br>
You're receiving this email because of your account on xgitlab.cels.anl.gov.
If you'd like to receive fewer emails, you can
adjust your notification settings.

</p>
</div>
</body>
</html>