<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/ac6c6442559821c10f6658fe30190bdf6a30cf55">ac6c6442</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-22T10:08:27Z</i>
</div>
<pre class='commit-message'>bug fix in darshan put_header routine</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/d5abad0f98b47206a21e0a2883c7633d61b19754">d5abad0f</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-22T10:53:52Z</i>
</div>
<pre class='commit-message'>remove profiling macros from posix module</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/bb25083be8c8a9b6a975919885aa501bc80812e5">bb25083b</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-25T13:19:59Z</i>
</div>
<pre class='commit-message'>rename merge log utility</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/e81a9cae64c2e232d973ed499cf147e0cfcc7439">e81a9cae</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-25T15:56:06Z</i>
</div>
<pre class='commit-message'>autconf/runtime changes for configuring mmap code</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/8070c83142df2116aebb8a0d3a412e79bd30434d">8070c831</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-26T12:59:32Z</i>
</div>
<pre class='commit-message'>update command line args for log merging utility</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/b4be0abd80b1f0031b57f6958dd3285e632ca99c">b4be0abd</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-26T13:00:11Z</i>
</div>
<pre class='commit-message'>allreduce job start time in darshan-core init.</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/5f4e06f67c6195738e7f098fc697461d07bd41ff">5f4e06f6</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-26T13:02:54Z</i>
</div>
<pre class='commit-message'>autogenerate an example epilog script</pre>
</li>
</ul>
<h4>11 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/Makefile.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/configure
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/configure.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-runtime/darshan-core.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
darshan-runtime/darshan-runtime-config.h.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
darshan-runtime/lib/darshan-core.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
darshan-runtime/lib/darshan-posix.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-7'>
<span class='new-file'>
+
darshan-runtime/share/darshan-mmap-epilog.sh.in
</span>
</a>
</li>
<li class='file-stats'>
<a href='#diff-8'>
darshan-util/Makefile.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-9'>
darshan-util/darshan-logutils.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-10'>
darshan-util/darshan-stitch-logs.c

darshan-util/darshan-merge.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-0'>
<strong>
darshan-runtime/Makefile.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/Makefile.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/Makefile.in
</span><span style="color: #aaaaaa">@@ -154,6 +154,7 @@ endif
</span>   install -m 755 share/mpi-profile/darshan-bg-cc.conf $(datarootdir)/mpi-profile/darshan-bg-cc.conf
        install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(datarootdir)/mpi-profile/darshan-bg-cxx.conf
        install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf
<span style="color: #000000;background-color: #ddffdd">+        install -m 755 share/darshan-mmap-epilog.sh $(datarootdir)/darshan-mmap-epilog.sh
</span>   install -m 644 darshan-base-ld-opts $(datarootdir)/darshan-base-ld-opts
        install -m 644 $(srcdir)/darshan-posix-ld-opts $(datarootdir)/darshan-posix-ld-opts
        install -m 644 $(srcdir)/darshan-hdf5-ld-opts $(datarootdir)/darshan-hdf5-ld-opts
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-1'>
<strong>
darshan-runtime/configure
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/configure
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/configure
</span><span style="color: #aaaaaa">@@ -684,15 +684,16 @@ ac_subst_files=''
</span> ac_user_opts='
 enable_option_checking
 with_zlib
-enable_cuserid
 enable_ld_preload
<span style="color: #000000;background-color: #ddffdd">+enable_cuserid
</span> enable_group_readable_logs
<span style="color: #000000;background-color: #ddffdd">+enable_bgq_mod
+enable_mmap_logs
</span> with_mem_align
 with_log_path_by_env
 with_log_hints
 with_log_path
 with_jobid_env
-enable_bgq_mod
 with_mod_mem
 '
       ac_precious_vars='build_alias
<span style="color: #aaaaaa">@@ -1313,10 +1314,12 @@ Optional Features:
</span>   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
<span style="color: #000000;background-color: #ffdddd">-  --disable-cuserid       Disables attempted use of cuserid() at run time
</span>   --disable-ld-preload    Disables support for LD_PRELOAD library
<span style="color: #000000;background-color: #ffdddd">-  --enable-group-readable-logs Set log files to be group readable
</span><span style="color: #000000;background-color: #ddffdd">+  --disable-cuserid       Disables attempted use of cuserid() at run time
+  --enable-group-readable-logs
+                          Set log files to be group readable
</span>   --disable-bgq-mod       Disables compilation and use of BG/Q module (for BG/Q systems)
<span style="color: #000000;background-color: #ddffdd">+  --enable-mmmap-logs     Enables ability to mmap I/O data to log file
</span> 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
<span style="color: #aaaaaa">@@ -1325,13 +1328,16 @@ Optional Packages:
</span>                     /usr/local or /usr if not found in /usr/local
   --without-zlib to disable zlib usage completely
   --with-mem-align=<num>  Memory alignment in bytes
<span style="color: #000000;background-color: #ffdddd">-  --with-log-path-by-env=<env var list> Comma separated list of environment variables to check for log path location before --with-log-path path
-  --with-log-hints=<hint1=x;hint2=y>  Semicolon-separated list of MPI-IO hints for log file write
</span><span style="color: #000000;background-color: #ddffdd">+  --with-log-path-by-env=<env var list>
+                          Comma separated list of environment variables to check for
+                          log path location before --with-log-path path
+  --with-log-hints=<hint1=x;hint2=y>
+                          Semicolon-separated list of MPI-IO hints for log file write
</span>   --with-log-path=<path>  Location to store log files at run time
   --with-jobid-env=<name> Name of environment variable that stores the jobid
<span style="color: #000000;background-color: #ffdddd">-    (specify "NONE" if no appropriate environment variable is available:
-    Darshan will use rank 0's pid instead)
-  --with-mod-mem=<num>  Maximum amount of memory (in MiB) for each Darshan module
</span><span style="color: #000000;background-color: #ddffdd">+                          (specify "NONE" if no appropriate environment variable
+                          is available: Darshan will use rank 0's pid instead)
+  --with-mod-mem=<num>    Maximum amount of memory (in MiB) for each Darshan module
</span> 
 Some influential environment variables:
   CC          C compiler command
<span style="color: #aaaaaa">@@ -3528,21 +3534,21 @@ fi
</span> 
 
 
-# Check whether --enable-cuserid was given.
-if test "${enable_cuserid+set}" = set; then :
<span style="color: #000000;background-color: #ffdddd">-  enableval=$enable_cuserid; if test "x$enableval" = "xno" ; then
</span>-
-$as_echo "#define DARSHAN_DISABLE_CUSERID 1" >>confdefs.h
-,
<span style="color: #000000;background-color: #ddffdd">+# Check whether --enable-ld-preload was given.
+if test "${enable_ld_preload+set}" = set; then :
+  enableval=$enable_ld_preload; if test "x$enableval" = "xno" ; then
+    DISABLE_LDPRELOAD="1"
</span> fi
 
 fi
 
 
-# Check whether --enable-ld-preload was given.
-if test "${enable_ld_preload+set}" = set; then :
<span style="color: #000000;background-color: #ffdddd">-  enableval=$enable_ld_preload; if test "x$enableval" = "xno" ; then
-    DISABLE_LDPRELOAD="1"
</span><span style="color: #000000;background-color: #ddffdd">+# Check whether --enable-cuserid was given.
+if test "${enable_cuserid+set}" = set; then :
+  enableval=$enable_cuserid; if test "x$enableval" = "xno" ; then
+
+$as_echo "#define __DARSHAN_DISABLE_CUSERID 1" >>confdefs.h
+
</span> fi
 
 fi
<span style="color: #aaaaaa">@@ -3559,6 +3565,26 @@ fi
</span> fi
 
 
<span style="color: #000000;background-color: #ddffdd">+# Check whether --enable-bgq_mod was given.
+if test "${enable_bgq_mod+set}" = set; then :
+  enableval=$enable_bgq_mod;
+else
+  enable_bgq_mod=check
+
+fi
+
+
+# Check whether --enable-mmap-logs was given.
+if test "${enable_mmap_logs+set}" = set; then :
+  enableval=$enable_mmap_logs; if test "x$enableval" = "xyes" ; then
+
+$as_echo "#define __DARSHAN_ENABLE_MMAP_LOGS 1" >>confdefs.h
+
+fi
+
+fi
+
+
</span> 
 # Check whether --with-mem-align was given.
 if test "${with_mem_align+set}" = set; then :
<span style="color: #aaaaaa">@@ -3648,6 +3674,54 @@ _ACEOF
</span> fi
 
 
<span style="color: #000000;background-color: #ddffdd">+
+# Check whether --with-mod-mem was given.
+if test "${with_mod_mem+set}" = set; then :
+  withval=$with_mod_mem; if test x$withval = xyes; then
+        as_fn_error $? "--with-mod-mem must be given a number" "$LINENO" 5
+    else
+
+cat >>confdefs.h <<_ACEOF
+#define __DARSHAN_MOD_MEM_MAX ${withval}
+_ACEOF
+
+    fi
+
+fi
+
+
+if test x$enable_bgq_mod != xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BG/Q environment" >&5
+$as_echo_n "checking for BG/Q environment... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+        #ifndef __bgq__
+        #error __bgq__ not set
+        #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        DARSHAN_USE_BGQ=1
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        if test "x$enable_bgq_mod" = xyes; then :
+  as_fn_error $? "BG/Q module enabled in non-BG/Q environment" "$LINENO" 5
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
</span> if test x$GOT_ALIGNMENT != x1; then
     as_fn_error $? "must provide --with-mem-align=<num> argument to configure." "$LINENO" 5
 fi
<span style="color: #aaaaaa">@@ -4239,63 +4313,6 @@ $as_echo "no" >&6; }
</span>     MPICH_LIB_OLD=0
 fi
 
-# check to see whether the bgq instrumentation module should be built
-# Check whether --enable-bgq_mod was given.
-if test "${enable_bgq_mod+set}" = set; then :
<span style="color: #000000;background-color: #ffdddd">-  enableval=$enable_bgq_mod;
</span>-else
<span style="color: #000000;background-color: #ffdddd">-  enable_bgq_mod=check
</span>-
-fi
-
-if test x$enable_bgq_mod != xno; then
<span style="color: #000000;background-color: #ffdddd">-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BG/Q environment" >&5
</span>-$as_echo_n "checking for BG/Q environment... " >&6; }
<span style="color: #000000;background-color: #ffdddd">-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
</span>-/* end confdefs.h.  */
-
<span style="color: #000000;background-color: #ffdddd">-        #ifndef __bgq__
-        #error __bgq__ not set
-        #endif
</span>-
-int
-main ()
-{
-
<span style="color: #000000;background-color: #ffdddd">-  ;
-  return 0;
</span>-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
<span style="color: #000000;background-color: #ffdddd">-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
</span>-$as_echo "yes" >&6; }
<span style="color: #000000;background-color: #ffdddd">-        DARSHAN_USE_BGQ=1
</span>-else
<span style="color: #000000;background-color: #ffdddd">-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
</span>-$as_echo "no" >&6; }
<span style="color: #000000;background-color: #ffdddd">-        if test "x$enable_bgq_mod" = xyes; then :
-  as_fn_error $? "BG/Q module enabled in non-BG/Q environment" "$LINENO" 5
</span>-fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-# Check whether --with-mod-mem was given.
-if test "${with_mod_mem+set}" = set; then :
<span style="color: #000000;background-color: #ffdddd">-  withval=$with_mod_mem; if test x$withval = xyes; then
-        as_fn_error $? "--with-mod-mem must be given a number" "$LINENO" 5
-    else
</span>-
-cat >>confdefs.h <<_ACEOF
-#define __DARSHAN_MOD_MEM_MAX ${withval}
-_ACEOF
-
<span style="color: #000000;background-color: #ffdddd">-    fi
</span>-
-fi
-
-
 DARSHAN_VERSION="3.0.0-pre3"
 
 
<span style="color: #aaaaaa">@@ -4305,8 +4322,7 @@ DARSHAN_VERSION="3.0.0-pre3"
</span> 
 
 
-
-ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-base-ld-opts darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf"
<span style="color: #000000;background-color: #ddffdd">+ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-base-ld-opts darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf share/darshan-mmap-epilog.sh"
</span> 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
<span style="color: #aaaaaa">@@ -5016,6 +5032,7 @@ do
</span>     "share/mpi-profile/darshan-bg-cc.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-cc.conf" ;;
     "share/mpi-profile/darshan-bg-cxx.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-cxx.conf" ;;
     "share/mpi-profile/darshan-bg-f.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-f.conf" ;;
<span style="color: #000000;background-color: #ddffdd">+    "share/darshan-mmap-epilog.sh") CONFIG_FILES="$CONFIG_FILES share/darshan-mmap-epilog.sh" ;;
</span> 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-2'>
<strong>
darshan-runtime/configure.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/configure.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/configure.in
</span><span style="color: #aaaaaa">@@ -24,27 +24,42 @@ AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)],
</span> dnl runtime libraries require zlib
 CHECK_ZLIB
 
-AC_ARG_ENABLE(cuserid, 
-[  --disable-cuserid       Disables attempted use of cuserid() at run time], 
<span style="color: #000000;background-color: #ddffdd">+AC_ARG_ENABLE(ld-preload, 
+[  --disable-ld-preload    Disables support for LD_PRELOAD library], 
</span> [if test "x$enableval" = "xno" ; then
<span style="color: #000000;background-color: #ffdddd">-    AC_DEFINE(DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled),
</span><span style="color: #000000;background-color: #ddffdd">+    DISABLE_LDPRELOAD="1"
</span> fi]
 ,)
 
-AC_ARG_ENABLE(ld-preload, 
-[  --disable-ld-preload    Disables support for LD_PRELOAD library], 
<span style="color: #000000;background-color: #ddffdd">+AC_ARG_ENABLE(cuserid, 
+[  --disable-cuserid       Disables attempted use of cuserid() at run time], 
</span> [if test "x$enableval" = "xno" ; then
<span style="color: #000000;background-color: #ffdddd">-    DISABLE_LDPRELOAD="1"
</span><span style="color: #000000;background-color: #ddffdd">+    AC_DEFINE(__DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled)
</span> fi]
 ,)
 
 AC_ARG_ENABLE(group-readable-logs, 
-[  --enable-group-readable-logs Set log files to be group readable], 
<span style="color: #000000;background-color: #ddffdd">+[  --enable-group-readable-logs
+                          Set log files to be group readable], 
</span> [if test "x$enableval" = "xyes" ; then
     AC_DEFINE(__DARSHAN_GROUP_READABLE_LOGS, 1, Define if Darshan should set log files to be group readable)
 fi]
 ,)
 
<span style="color: #000000;background-color: #ddffdd">+AC_ARG_ENABLE(
+    [bgq_mod],
+    [  --disable-bgq-mod       Disables compilation and use of BG/Q module (for BG/Q systems)],
+    [],
+    [enable_bgq_mod=check]
+)
+
+AC_ARG_ENABLE(mmap-logs,
+[  --enable-mmmap-logs     Enables ability to mmap I/O data to log file],
+[if test "x$enableval" = "xyes" ; then
+    AC_DEFINE(__DARSHAN_ENABLE_MMAP_LOGS, 1, Define if Darshan should mmap data structures to log file)
+fi]
+,)
+
</span> AC_ARG_WITH(mem-align,
 [  --with-mem-align=<num>  Memory alignment in bytes],
     if test x$withval = xyes; then
<span style="color: #aaaaaa">@@ -56,7 +71,9 @@ AC_ARG_WITH(mem-align,
</span> )
 
 AC_ARG_WITH(log-path-by-env,
-[  --with-log-path-by-env=<env var list> Comma separated list of environment variables to check for log path location before --with-log-path path],
<span style="color: #000000;background-color: #ddffdd">+[  --with-log-path-by-env=<env var list>
+                          Comma separated list of environment variables to check for
+                          log path location before --with-log-path path],
</span>     if test x$withval = xyes; then
         AC_MSG_ERROR(--with-log-path-by-env must be given at least one variable name)
     else
<span style="color: #aaaaaa">@@ -67,7 +84,8 @@ AC_ARG_WITH(log-path-by-env,
</span> )
 
 AC_ARG_WITH(log-hints,
-[  --with-log-hints=<hint1=x;hint2=y>  Semicolon-separated list of MPI-IO hints for log file write],
<span style="color: #000000;background-color: #ddffdd">+[  --with-log-hints=<hint1=x;hint2=y>
+                          Semicolon-separated list of MPI-IO hints for log file write],
</span>     if test x$withval = xyes; then
         AC_MSG_ERROR(--with-log-hints must be given an argument)
     else
<span style="color: #aaaaaa">@@ -90,8 +108,8 @@ AC_ARG_WITH(log-path,
</span> 
 AC_ARG_WITH(jobid-env,
 [  --with-jobid-env=<name> Name of environment variable that stores the jobid
<span style="color: #000000;background-color: #ffdddd">-    (specify "NONE" if no appropriate environment variable is available: 
-    Darshan will use rank 0's pid instead)],
</span><span style="color: #000000;background-color: #ddffdd">+                          (specify "NONE" if no appropriate environment variable
+                          is available: Darshan will use rank 0's pid instead)],
</span>     if test x$withval = xyes; then
         AC_MSG_ERROR(--with-jobid-env must be given a name)
     else
<span style="color: #aaaaaa">@@ -101,6 +119,30 @@ AC_ARG_WITH(jobid-env,
</span>     fi
 )
 
<span style="color: #000000;background-color: #ddffdd">+AC_ARG_WITH(mod-mem,
+[  --with-mod-mem=<num>    Maximum amount of memory (in MiB) for each Darshan module],
+    if test x$withval = xyes; then
+        AC_MSG_ERROR(--with-mod-mem must be given a number)
+    else
+        AC_DEFINE_UNQUOTED(__DARSHAN_MOD_MEM_MAX, ${withval}, Maximum memory (in MiB) for each Darshan module)
+    fi
+)
+
+if test x$enable_bgq_mod != xno; then
+    AC_MSG_CHECKING(for BG/Q environment)
+    AC_TRY_COMPILE([
+        #ifndef __bgq__
+        #error __bgq__ not set
+        #endif
+        ], [],
+        AC_MSG_RESULT(yes)
+        DARSHAN_USE_BGQ=1,
+        AC_MSG_RESULT(no)
+        AS_IF([test "x$enable_bgq_mod" = xyes],
+            AC_MSG_ERROR(BG/Q module enabled in non-BG/Q environment),
+            []))
+fi
+
</span> if test x$GOT_ALIGNMENT != x1; then
     AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.)
 fi
<span style="color: #aaaaaa">@@ -278,39 +320,7 @@ AS_IF([$CC -show foo.c -o foo |grep lmpich >& /dev/null],
</span>     AC_MSG_RESULT(no)
     MPICH_LIB_OLD=0)
 
-# check to see whether the bgq instrumentation module should be built
-AC_ARG_ENABLE(
<span style="color: #000000;background-color: #ffdddd">-    [bgq_mod],
-    [  --disable-bgq-mod       Disables compilation and use of BG/Q module (for BG/Q systems)],
-    [],
-    [enable_bgq_mod=check]
</span>-)
-if test x$enable_bgq_mod != xno; then
<span style="color: #000000;background-color: #ffdddd">-    AC_MSG_CHECKING(for BG/Q environment)
-    AC_TRY_COMPILE([
-        #ifndef __bgq__
-        #error __bgq__ not set
-        #endif
-        ], [],
-        AC_MSG_RESULT(yes)
-        DARSHAN_USE_BGQ=1,
-        AC_MSG_RESULT(no)
-        AS_IF([test "x$enable_bgq_mod" = xyes],
-            AC_MSG_ERROR(BG/Q module enabled in non-BG/Q environment),
-            []))
</span>-fi
-
-AC_ARG_WITH(mod-mem,
-[  --with-mod-mem=<num>  Maximum amount of memory (in MiB) for each Darshan module],
<span style="color: #000000;background-color: #ffdddd">-    if test x$withval = xyes; then
-        AC_MSG_ERROR(--with-mod-mem must be given a number)
-    else
-        AC_DEFINE_UNQUOTED(__DARSHAN_MOD_MEM_MAX, ${withval}, Maximum memory (in MiB) for each Darshan module)
-    fi
</span>-)
-
 DARSHAN_VERSION="AC_PACKAGE_VERSION"
-
 AC_SUBST(darshan_lib_path)
 AC_SUBST(darshan_share_path)
 AC_SUBST(LDFLAGS)
<span style="color: #aaaaaa">@@ -335,4 +345,5 @@ share/mpi-profile/darshan-f.conf
</span> share/mpi-profile/darshan-bg-cc.conf
 share/mpi-profile/darshan-bg-cxx.conf
 share/mpi-profile/darshan-bg-f.conf
<span style="color: #000000;background-color: #ddffdd">+share/darshan-mmap-epilog.sh
</span> )
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-3'>
<strong>
darshan-runtime/darshan-core.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/darshan-core.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/darshan-core.h
</span><span style="color: #aaaaaa">@@ -30,6 +30,9 @@
</span> /* Environment variable to override memory per module */
 #define DARSHAN_MOD_MEM_OVERRIDE "DARSHAN_MODMEM"
 
<span style="color: #000000;background-color: #ddffdd">+/* Environment variable to override default mmap log path */
+#define DARSHAN_MMAP_LOG_PATH_OVERRIDE "DARSHAN_MMAP_LOGPATH"
+
</span> /* Maximum amount of memory per instrumentation module in MiB */
 #ifdef __DARSHAN_MOD_MEM_MAX
 #define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024)
<span style="color: #aaaaaa">@@ -37,6 +40,9 @@
</span> #define DARSHAN_MOD_MEM_MAX (2 * 1024 * 1024) /* 2 MiB default */
 #endif
 
<span style="color: #000000;background-color: #ddffdd">+/* default path for storing mmap log files is '/tmp' */
+#define DARSHAN_DEF_MMAP_LOG_PATH "/tmp"
+
</span> #define DARSHAN_RECORD_BUF_SIZE (1024 * 100) /* store 1024 records, each of at most 100 bytes */
 
 /* Default runtime compression buffer size */
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-4'>
<strong>
darshan-runtime/darshan-runtime-config.h.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/darshan-runtime-config.h.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/darshan-runtime-config.h.in
</span><span style="color: #aaaaaa">@@ -3,9 +3,6 @@
</span> /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
-/* Define if cuserid() should be disabled */
-#undef DARSHAN_DISABLE_CUSERID
-
 /* Define if struct aiocb64 type is defined */
 #undef HAVE_AIOCB64
 
<span style="color: #aaaaaa">@@ -87,6 +84,12 @@
</span> # endif
 #endif
 
<span style="color: #000000;background-color: #ddffdd">+/* Define if cuserid() should be disabled */
+#undef __DARSHAN_DISABLE_CUSERID
+
+/* Define if Darshan should mmap data structures to log file */
+#undef __DARSHAN_ENABLE_MMAP_LOGS
+
</span> /* Define if Darshan should set log files to be group readable */
 #undef __DARSHAN_GROUP_READABLE_LOGS
 
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-5'>
<strong>
darshan-runtime/lib/darshan-core.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-core.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-core.c
</span><span style="color: #aaaaaa">@@ -98,6 +98,8 @@ static void darshan_add_record_hashref(
</span>     darshan_record_id id, struct darshan_core_record_ref **ref);
 static void darshan_block_size_from_path(
     const char *path, int *block_size);
<span style="color: #000000;background-color: #ddffdd">+static void darshan_get_user_name(
+    char *user);
</span> static void darshan_get_logfile_name(
     char* logfile_name, int jobid, struct tm* start_tm);
 static void darshan_get_shared_records(
<span style="color: #aaaaaa">@@ -127,6 +129,7 @@ void darshan_core_initialize(int argc, char **argv)
</span>     int mmap_fd;
     int mmap_size;
     int sys_page_size;
<span style="color: #000000;background-color: #ddffdd">+    char cuser[L_cuserid] = {0};
</span>     char *envstr;
     char *jobid_str;
     int jobid;
<span style="color: #aaaaaa">@@ -197,6 +200,7 @@ void darshan_core_initialize(int argc, char **argv)
</span>             memset(init_core, 0, sizeof(*init_core));
             init_core->wtime_offset = DARSHAN_MPI_CALL(PMPI_Wtime)();
 
<span style="color: #000000;background-color: #ddffdd">+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
</span>             sys_page_size = sysconf(_SC_PAGESIZE);
             assert(sys_page_size > 0);
 
<span style="color: #aaaaaa">@@ -205,11 +209,21 @@ void darshan_core_initialize(int argc, char **argv)
</span>             if(mmap_size % sys_page_size)
                 mmap_size = ((mmap_size / sys_page_size) + 1) * sys_page_size;
 
<span style="color: #000000;background-color: #ddffdd">+            char *mmap_log_dir;
+            envstr = getenv(DARSHAN_MMAP_LOG_PATH_OVERRIDE);
+            if(envstr)
+                mmap_log_dir = envstr;
+            else
+                mmap_log_dir = DARSHAN_DEF_MMAP_LOG_PATH;
+
+            darshan_get_user_name(cuser);
+
</span>             /* construct a unique temporary log file name for this process
              * to write mmap log data to
              */
<span style="color: #000000;background-color: #ffdddd">-            snprintf(init_core->mmap_log_name, PATH_MAX, "/tmp/darshan_job%d.%d",
-                jobid, my_rank);
</span><span style="color: #000000;background-color: #ddffdd">+            snprintf(init_core->mmap_log_name, PATH_MAX,
+                "/%s/%s_%s_id%d_mmap-log-%d.darshan",
+                mmap_log_dir, cuser, __progname, jobid, my_rank);
</span> 
             /* create the temporary mmapped darshan log */
             mmap_fd = open(init_core->mmap_log_name, O_CREAT|O_RDWR|O_EXCL , 0644);
<span style="color: #aaaaaa">@@ -282,6 +296,9 @@ void darshan_core_initialize(int argc, char **argv)
</span> 
             /* collect information about command line and mounted file systems */
             darshan_get_exe_and_mounts(init_core, argc, argv);
<span style="color: #000000;background-color: #ddffdd">+#else
+    #error "Error: non-mmap code path not ready."
+#endif
</span> 
             /* bootstrap any modules with static initialization routines */
             i = 0;
<span style="color: #aaaaaa">@@ -295,6 +312,10 @@ void darshan_core_initialize(int argc, char **argv)
</span>         }
     }
 
<span style="color: #000000;background-color: #ddffdd">+    /* reduce so all ranks agree on the job start time */
+    DARSHAN_MPI_CALL(PMPI_Allreduce)(MPI_IN_PLACE, &init_core->log_job_p->start_time,
+        1, MPI_INT64_T, MPI_MIN, MPI_COMM_WORLD);
+
</span>     if(internal_timing_flag)
     {
         init_time = DARSHAN_MPI_CALL(PMPI_Wtime)() - init_start;
<span style="color: #aaaaaa">@@ -318,7 +339,6 @@ void darshan_core_shutdown()
</span>     int internal_timing_flag = 0;
     struct tm *start_tm;
     time_t start_time_tmp;
<span style="color: #000000;background-color: #ffdddd">-    int64_t first_start_time;
</span>     int64_t last_end_time;
     double start_log_time;
     double tm_end;
<span style="color: #aaaaaa">@@ -360,8 +380,9 @@ void darshan_core_shutdown()
</span> 
     /* XXX just copy mmap files somewhere else to avoid corruption */
     DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
<span style="color: #000000;background-color: #ffdddd">-    if(my_rank == 0)
-        system("cp /tmp/darshan* ~/Desktop");
</span><span style="color: #000000;background-color: #ddffdd">+    char cp_cmd[500] = {0};
+    sprintf(cp_cmd, "cp %s ~/Desktop", final_core->mmap_log_name);
+    system(cp_cmd);
</span>     DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
 
     memcpy(&out_job, final_core->log_job_p, sizeof(struct darshan_job));
<span style="color: #aaaaaa">@@ -427,16 +448,11 @@ void darshan_core_shutdown()
</span> 
     final_core->log_job_p->end_time = time(NULL);
 
<span style="color: #000000;background-color: #ffdddd">-    /* reduce to report first start time and last end time across all ranks
-     * at rank 0
-     */
-    DARSHAN_MPI_CALL(PMPI_Reduce)(&final_core->log_job_p->start_time, &first_start_time,
-        1, MPI_LONG_LONG, MPI_MIN, 0, MPI_COMM_WORLD);
</span><span style="color: #000000;background-color: #ddffdd">+    /* reduce to report last end time across all ranks at rank 0 */
</span>     DARSHAN_MPI_CALL(PMPI_Reduce)(&final_core->log_job_p->end_time, &last_end_time,
<span style="color: #000000;background-color: #ffdddd">-        1, MPI_LONG_LONG, MPI_MAX, 0, MPI_COMM_WORLD);
</span><span style="color: #000000;background-color: #ddffdd">+        1, MPI_INT64_T, MPI_MAX, 0, MPI_COMM_WORLD);
</span>     if(my_rank == 0)
     {
<span style="color: #000000;background-color: #ffdddd">-        out_job.start_time = first_start_time;
</span>         out_job.end_time = last_end_time;
     }
 
<span style="color: #aaaaaa">@@ -1003,66 +1019,59 @@ static void darshan_get_exe_and_mounts(struct darshan_core_runtime *core,
</span>     return;
 }
 
-static void darshan_add_record_hashref(struct darshan_core_runtime *core,
<span style="color: #000000;background-color: #ffdddd">-    char *name, darshan_record_id id, struct darshan_core_record_ref **ref)
</span><span style="color: #000000;background-color: #ddffdd">+static void darshan_block_size_from_path(const char *path, int *block_size)
</span> {
<span style="color: #000000;background-color: #ffdddd">-    int record_size = sizeof(darshan_record_id) + strlen(name) + 1;
</span>-
<span style="color: #000000;background-color: #ffdddd">-    if((record_size + core->log_hdr_p->rec_map.len) > DARSHAN_RECORD_BUF_SIZE)
-        return;
</span><span style="color: #000000;background-color: #ddffdd">+    int i;
+    *block_size = -1;
</span> 
<span style="color: #000000;background-color: #ffdddd">-    *ref = malloc(sizeof(**ref));
-    if(*ref)
</span><span style="color: #000000;background-color: #ddffdd">+    for(i=0; i<mnt_data_count; i++)
</span>     {
<span style="color: #000000;background-color: #ffdddd">-        memset(*ref, 0, sizeof(**ref));
</span>-
-#if 0
<span style="color: #000000;background-color: #ffdddd">-        if(!mmap)
-        {
-            ref->rec.name = malloc(strlen(name) + 1);
-        }
-        else
</span>-#endif
<span style="color: #000000;background-color: #ddffdd">+        if(!(strncmp(mnt_data_array[i].path, path, strlen(mnt_data_array[i].path))))
</span>         {
<span style="color: #000000;background-color: #ffdddd">-            /* store the rec id and full file path in record hash buffer */
-            void *tmp_p = (char *)core->log_rec_p + core->log_hdr_p->rec_map.len;
-            *(darshan_record_id *)tmp_p = id;
</span>-
<span style="color: #000000;background-color: #ffdddd">-            /* set the name pointer for this record to point to the
-             * appropriate location in the record hash buffer
-             */
-            tmp_p = (char *)tmp_p + sizeof(darshan_record_id);
-            (*ref)->name = (char *)tmp_p;
</span><span style="color: #000000;background-color: #ddffdd">+            *block_size = mnt_data_array[i].block_size;
+            return;
</span>         }
-
<span style="color: #000000;background-color: #ffdddd">-        /* set record ref fields */
-        (*ref)->id = id;
-        if((*ref)->name)
-            strcpy((*ref)->name, name);
</span>-
<span style="color: #000000;background-color: #ffdddd">-        /* TODO: look at HASH_ADD_KEYPTR, use same strategy (big contig pool) for non-mmap darshan */
-        HASH_ADD(hlink, core->rec_hash, id, sizeof(darshan_record_id), (*ref));
-        core->rec_hash_cnt++;
-        core->log_hdr_p->rec_map.len += record_size;
</span>     }
 
     return;
 }
 
-static void darshan_block_size_from_path(const char *path, int *block_size)
<span style="color: #000000;background-color: #ddffdd">+static void darshan_get_user_name(char *cuser)
</span> {
<span style="color: #000000;background-color: #ffdddd">-    int i;
-    *block_size = -1;
</span><span style="color: #000000;background-color: #ddffdd">+    char* logname_string;
</span> 
<span style="color: #000000;background-color: #ffdddd">-    for(i=0; i<mnt_data_count; i++)
</span><span style="color: #000000;background-color: #ddffdd">+    /* get the username for this job.  In order we will try each of the
+     * following until one of them succeeds:
+     *
+     * - cuserid()
+     * - getenv("LOGNAME")
+     * - snprintf(..., geteuid());
+     *
+     * Note that we do not use getpwuid() because it generally will not
+     * work in statically compiled binaries.
+     */
+
+#ifndef __DARSHAN_DISABLE_CUSERID
+    cuserid(cuser);
+#endif
+
+    /* if cuserid() didn't work, then check the environment */
+    if(strcmp(cuser, "") == 0)
</span>     {
<span style="color: #000000;background-color: #ffdddd">-        if(!(strncmp(mnt_data_array[i].path, path, strlen(mnt_data_array[i].path))))
</span><span style="color: #000000;background-color: #ddffdd">+        logname_string = getenv("LOGNAME");
+        if(logname_string)
</span>         {
<span style="color: #000000;background-color: #ffdddd">-            *block_size = mnt_data_array[i].block_size;
-            return;
</span><span style="color: #000000;background-color: #ddffdd">+            strncpy(cuser, logname_string, (L_cuserid-1));
</span>         }
     }
 
<span style="color: #000000;background-color: #ddffdd">+    /* if cuserid() and environment both fail, then fall back to uid */
+    if(strcmp(cuser, "") == 0)
+    {
+        uid_t uid = geteuid();
+        snprintf(cuser, L_cuserid, "%u", uid);
+    }
+
</span>     return;
 }
 
<span style="color: #aaaaaa">@@ -1071,7 +1080,6 @@ static void darshan_get_logfile_name(char* logfile_name, int jobid, struct tm* s
</span> {
     char* user_logfile_name;
     char* logpath;
<span style="color: #000000;background-color: #ffdddd">-    char* logname_string;
</span>     char* logpath_override = NULL;
 #ifdef __DARSHAN_LOG_ENV
     char env_check[256];
<span style="color: #aaaaaa">@@ -1110,37 +1118,7 @@ static void darshan_get_logfile_name(char* logfile_name, int jobid, struct tm* s
</span> #endif
         }
 
<span style="color: #000000;background-color: #ffdddd">-        /* get the username for this job.  In order we will try each of the
-         * following until one of them succeeds:
-         *
-         * - cuserid()
-         * - getenv("LOGNAME")
-         * - snprintf(..., geteuid());
-         *
-         * Note that we do not use getpwuid() because it generally will not
-         * work in statically compiled binaries.
-         */
</span>-
-#ifndef DARSHAN_DISABLE_CUSERID
<span style="color: #000000;background-color: #ffdddd">-        cuserid(cuser);
</span>-#endif
-
<span style="color: #000000;background-color: #ffdddd">-        /* if cuserid() didn't work, then check the environment */
-        if(strcmp(cuser, "") == 0)
-        {
-            logname_string = getenv("LOGNAME");
-            if(logname_string)
-            {
-                strncpy(cuser, logname_string, (L_cuserid-1));
-            }
-        }
</span>-
<span style="color: #000000;background-color: #ffdddd">-        /* if cuserid() and environment both fail, then fall back to uid */
-        if(strcmp(cuser, "") == 0)
-        {
-            uid_t uid = geteuid();
-            snprintf(cuser, sizeof(cuser), "%u", uid);
-        }
</span><span style="color: #000000;background-color: #ddffdd">+        darshan_get_user_name(cuser);
</span> 
         /* generate a random number to help differentiate the log */
         hlevel=DARSHAN_MPI_CALL(PMPI_Wtime)() * 1000000;
<span style="color: #aaaaaa">@@ -1221,6 +1199,52 @@ static void darshan_get_logfile_name(char* logfile_name, int jobid, struct tm* s
</span>     return;
 }
 
<span style="color: #000000;background-color: #ddffdd">+static void darshan_add_record_hashref(struct darshan_core_runtime *core,
+    char *name, darshan_record_id id, struct darshan_core_record_ref **ref)
+{
+    int record_size = sizeof(darshan_record_id) + strlen(name) + 1;
+
+    if((record_size + core->log_hdr_p->rec_map.len) > DARSHAN_RECORD_BUF_SIZE)
+        return;
+
+    *ref = malloc(sizeof(**ref));
+    if(*ref)
+    {
+        memset(*ref, 0, sizeof(**ref));
+
+#if 0
+        if(!mmap)
+        {
+            ref->rec.name = malloc(strlen(name) + 1);
+        }
+        else
+#endif
+        {
+            /* store the rec id and full file path in record hash buffer */
+            void *tmp_p = (char *)core->log_rec_p + core->log_hdr_p->rec_map.len;
+            *(darshan_record_id *)tmp_p = id;
+
+            /* set the name pointer for this record to point to the
+             * appropriate location in the record hash buffer
+             */
+            tmp_p = (char *)tmp_p + sizeof(darshan_record_id);
+            (*ref)->name = (char *)tmp_p;
+        }
+
+        /* set record ref fields */
+        (*ref)->id = id;
+        if((*ref)->name)
+            strcpy((*ref)->name, name);
+
+        /* TODO: look at HASH_ADD_KEYPTR, use same strategy (big contig pool) for non-mmap darshan */
+        HASH_ADD(hlink, core->rec_hash, id, sizeof(darshan_record_id), (*ref));
+        core->rec_hash_cnt++;
+        core->log_hdr_p->rec_map.len += record_size;
+    }
+
+    return;
+}
+
</span> static void darshan_get_shared_records(struct darshan_core_runtime *core,
     darshan_record_id **shared_recs, int *shared_rec_cnt)
 {
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-6'>
<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">@@ -340,15 +340,6 @@ static void posix_shutdown(void);
</span>     (__file)->file_record->counters[POSIX_STATS] += 1; \
 } while(0)
 
-static double psx_wrap_time = 0.0;
-
-#define PSX_PRE_WRAP() \
<span style="color: #000000;background-color: #ffdddd">-    double pre_wrap = darshan_core_wtime();
</span>-
-#define PSX_POST_WRAP() \
<span style="color: #000000;background-color: #ffdddd">-    double post_wrap = darshan_core_wtime(); \
-    psx_wrap_time += (post_wrap-pre_wrap);
</span>-
 
 /**********************************************************
  *      Wrappers for POSIX I/O functions of interest      * 
<span style="color: #aaaaaa">@@ -360,8 +351,6 @@ int DARSHAN_DECL(open)(const char *path, int flags, ...)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(open);
 
     if(flags & O_CREAT) 
<span style="color: #aaaaaa">@@ -387,8 +376,6 @@ int DARSHAN_DECL(open)(const char *path, int flags, ...)
</span>     POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -398,8 +385,6 @@ int DARSHAN_DECL(open64)(const char *path, int flags, ...)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(open64);
 
     if(flags & O_CREAT)
<span style="color: #aaaaaa">@@ -425,8 +410,6 @@ int DARSHAN_DECL(open64)(const char *path, int flags, ...)
</span>     POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -435,8 +418,6 @@ int DARSHAN_DECL(creat)(const char* path, mode_t mode)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(creat);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -448,8 +429,6 @@ int DARSHAN_DECL(creat)(const char* path, mode_t mode)
</span>     POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -458,8 +437,6 @@ int DARSHAN_DECL(creat64)(const char* path, mode_t mode)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(creat64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -471,8 +448,6 @@ int DARSHAN_DECL(creat64)(const char* path, mode_t mode)
</span>     POSIX_RECORD_OPEN(ret, path, mode, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -482,8 +457,6 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
</span>     int fd;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fopen);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -500,8 +473,6 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
</span>     POSIX_RECORD_OPEN(fd, path, 0, 1, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -511,8 +482,6 @@ FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
</span>     int fd;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fopen64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -529,8 +498,6 @@ FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
</span>     POSIX_RECORD_OPEN(fd, path, 0, 1, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -539,8 +506,6 @@ int DARSHAN_DECL(mkstemp)(char* template)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mkstemp);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -552,8 +517,6 @@ int DARSHAN_DECL(mkstemp)(char* template)
</span>     POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -562,8 +525,6 @@ int DARSHAN_DECL(mkostemp)(char* template, int flags)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mkostemp);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -575,8 +536,6 @@ int DARSHAN_DECL(mkostemp)(char* template, int flags)
</span>     POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -585,8 +544,6 @@ int DARSHAN_DECL(mkstemps)(char* template, int suffixlen)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mkstemps);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -598,8 +555,6 @@ int DARSHAN_DECL(mkstemps)(char* template, int suffixlen)
</span>     POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -608,8 +563,6 @@ int DARSHAN_DECL(mkostemps)(char* template, int suffixlen, int flags)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mkostemps);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -621,8 +574,6 @@ int DARSHAN_DECL(mkostemps)(char* template, int suffixlen, int flags)
</span>     POSIX_RECORD_OPEN(ret, template, 0, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -632,8 +583,6 @@ ssize_t DARSHAN_DECL(read)(int fd, void *buf, size_t count)
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(read);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -647,8 +596,6 @@ ssize_t DARSHAN_DECL(read)(int fd, void *buf, size_t count)
</span>     POSIX_RECORD_READ(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -658,8 +605,6 @@ ssize_t DARSHAN_DECL(write)(int fd, const void *buf, size_t count)
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(write);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -673,8 +618,6 @@ ssize_t DARSHAN_DECL(write)(int fd, const void *buf, size_t count)
</span>     POSIX_RECORD_WRITE(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -684,8 +627,6 @@ ssize_t DARSHAN_DECL(pread)(int fd, void *buf, size_t count, off_t offset)
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(pread);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -699,8 +640,6 @@ ssize_t DARSHAN_DECL(pread)(int fd, void *buf, size_t count, off_t offset)
</span>     POSIX_RECORD_READ(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -710,8 +649,6 @@ ssize_t DARSHAN_DECL(pwrite)(int fd, const void *buf, size_t count, off_t offset
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(pwrite);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -725,8 +662,6 @@ ssize_t DARSHAN_DECL(pwrite)(int fd, const void *buf, size_t count, off_t offset
</span>     POSIX_RECORD_WRITE(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -736,8 +671,6 @@ ssize_t DARSHAN_DECL(pread64)(int fd, void *buf, size_t count, off64_t offset)
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(pread64);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -751,8 +684,6 @@ ssize_t DARSHAN_DECL(pread64)(int fd, void *buf, size_t count, off64_t offset)
</span>     POSIX_RECORD_READ(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -762,8 +693,6 @@ ssize_t DARSHAN_DECL(pwrite64)(int fd, const void *buf, size_t count, off64_t of
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(pwrite64);
 
     if((unsigned long)buf % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -777,8 +706,6 @@ ssize_t DARSHAN_DECL(pwrite64)(int fd, const void *buf, size_t count, off64_t of
</span>     POSIX_RECORD_WRITE(ret, fd, 1, offset, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -789,8 +716,6 @@ ssize_t DARSHAN_DECL(readv)(int fd, const struct iovec *iov, int iovcnt)
</span>     int i;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(readv);
 
     for(i=0; i<iovcnt; i++)
<span style="color: #aaaaaa">@@ -808,8 +733,6 @@ ssize_t DARSHAN_DECL(readv)(int fd, const struct iovec *iov, int iovcnt)
</span>     POSIX_RECORD_READ(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -820,8 +743,6 @@ ssize_t DARSHAN_DECL(writev)(int fd, const struct iovec *iov, int iovcnt)
</span>     int i;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(writev);
 
     for(i=0; i<iovcnt; i++)
<span style="color: #aaaaaa">@@ -839,8 +760,6 @@ ssize_t DARSHAN_DECL(writev)(int fd, const struct iovec *iov, int iovcnt)
</span>     POSIX_RECORD_WRITE(ret, fd, 0, 0, aligned_flag, 0, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -850,8 +769,6 @@ size_t DARSHAN_DECL(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fread);
 
     if((unsigned long)ptr % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -874,8 +791,6 @@ size_t DARSHAN_DECL(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -885,8 +800,6 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
</span>     int aligned_flag = 0;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fwrite);
 
     if((unsigned long)ptr % darshan_mem_alignment == 0) aligned_flag = 1;
<span style="color: #aaaaaa">@@ -909,8 +822,6 @@ size_t DARSHAN_DECL(fwrite)(const void *ptr, size_t size, size_t nmemb, FILE *st
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -920,8 +831,6 @@ off_t DARSHAN_DECL(lseek)(int fd, off_t offset, int whence)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(lseek);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -944,8 +853,6 @@ off_t DARSHAN_DECL(lseek)(int fd, off_t offset, int whence)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -955,8 +862,6 @@ off_t DARSHAN_DECL(lseek64)(int fd, off_t offset, int whence)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(lseek64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -979,8 +884,6 @@ off_t DARSHAN_DECL(lseek64)(int fd, off_t offset, int whence)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -990,8 +893,6 @@ int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fseek);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1014,8 +915,6 @@ int DARSHAN_DECL(fseek)(FILE *stream, long offset, int whence)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1024,8 +923,6 @@ int DARSHAN_DECL(__xstat)(int vers, const char *path, struct stat *buf)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__xstat);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1040,8 +937,6 @@ int DARSHAN_DECL(__xstat)(int vers, const char *path, struct stat *buf)
</span>     POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1050,8 +945,6 @@ int DARSHAN_DECL(__xstat64)(int vers, const char *path, struct stat64 *buf)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__xstat64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1066,8 +959,6 @@ int DARSHAN_DECL(__xstat64)(int vers, const char *path, struct stat64 *buf)
</span>     POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1076,8 +967,6 @@ int DARSHAN_DECL(__lxstat)(int vers, const char *path, struct stat *buf)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__lxstat);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1092,8 +981,6 @@ int DARSHAN_DECL(__lxstat)(int vers, const char *path, struct stat *buf)
</span>     POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1102,8 +989,6 @@ int DARSHAN_DECL(__lxstat64)(int vers, const char *path, struct stat64 *buf)
</span>     int ret;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__lxstat64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1118,8 +1003,6 @@ int DARSHAN_DECL(__lxstat64)(int vers, const char *path, struct stat64 *buf)
</span>     POSIX_LOOKUP_RECORD_STAT(path, buf, tm1, tm2);
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1129,8 +1012,6 @@ int DARSHAN_DECL(__fxstat)(int vers, int fd, struct stat *buf)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__fxstat);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1149,8 +1030,6 @@ int DARSHAN_DECL(__fxstat)(int vers, int fd, struct stat *buf)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1160,8 +1039,6 @@ int DARSHAN_DECL(__fxstat64)(int vers, int fd, struct stat64 *buf)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(__fxstat64);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1180,8 +1057,6 @@ int DARSHAN_DECL(__fxstat64)(int vers, int fd, struct stat64 *buf)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1191,8 +1066,6 @@ void* DARSHAN_DECL(mmap)(void *addr, size_t length, int prot, int flags,
</span>     void* ret;
     struct posix_file_runtime* file;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mmap);
 
     ret = __real_mmap(addr, length, prot, flags, fd, offset);
<span style="color: #aaaaaa">@@ -1208,8 +1081,6 @@ void* DARSHAN_DECL(mmap)(void *addr, size_t length, int prot, int flags,
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1219,8 +1090,6 @@ void* DARSHAN_DECL(mmap64)(void *addr, size_t length, int prot, int flags,
</span>     void* ret;
     struct posix_file_runtime* file;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(mmap64);
 
     ret = __real_mmap64(addr, length, prot, flags, fd, offset);
<span style="color: #aaaaaa">@@ -1236,8 +1105,6 @@ void* DARSHAN_DECL(mmap64)(void *addr, size_t length, int prot, int flags,
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1247,8 +1114,6 @@ int DARSHAN_DECL(fsync)(int fd)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fsync);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1270,8 +1135,6 @@ int DARSHAN_DECL(fsync)(int fd)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1281,8 +1144,6 @@ int DARSHAN_DECL(fdatasync)(int fd)
</span>     struct posix_file_runtime* file;
     double tm1, tm2;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fdatasync);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1304,8 +1165,6 @@ int DARSHAN_DECL(fdatasync)(int fd)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1315,8 +1174,6 @@ int DARSHAN_DECL(close)(int fd)
</span>     double tm1, tm2;
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(close);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1339,8 +1196,6 @@ int DARSHAN_DECL(close)(int fd)
</span>     }
     POSIX_UNLOCK();    
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1351,8 +1206,6 @@ int DARSHAN_DECL(fclose)(FILE *fp)
</span>     double tm1, tm2;
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(fclose);
 
     tm1 = darshan_core_wtime();
<span style="color: #aaaaaa">@@ -1375,8 +1228,6 @@ int DARSHAN_DECL(fclose)(FILE *fp)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1384,8 +1235,6 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp)
</span> {
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_read);
 
     ret = __real_aio_read(aiocbp);
<span style="color: #aaaaaa">@@ -1397,8 +1246,6 @@ int DARSHAN_DECL(aio_read)(struct aiocb *aiocbp)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1406,8 +1253,6 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp)
</span> {
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_write);
 
     ret = __real_aio_write(aiocbp);
<span style="color: #aaaaaa">@@ -1419,8 +1264,6 @@ int DARSHAN_DECL(aio_write)(struct aiocb *aiocbp)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1428,8 +1271,6 @@ int DARSHAN_DECL(aio_read64)(struct aiocb64 *aiocbp)
</span> {
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_read64);
 
     ret = __real_aio_read64(aiocbp);
<span style="color: #aaaaaa">@@ -1441,8 +1282,6 @@ int DARSHAN_DECL(aio_read64)(struct aiocb64 *aiocbp)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1450,8 +1289,6 @@ int DARSHAN_DECL(aio_write64)(struct aiocb64 *aiocbp)
</span> {
     int ret;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_write64);
 
     ret = __real_aio_write64(aiocbp);
<span style="color: #aaaaaa">@@ -1463,8 +1300,6 @@ int DARSHAN_DECL(aio_write64)(struct aiocb64 *aiocbp)
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1475,8 +1310,6 @@ ssize_t DARSHAN_DECL(aio_return)(struct aiocb *aiocbp)
</span>     struct posix_aio_tracker *tmp;
     int aligned_flag = 0;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_return);
 
     ret = __real_aio_return(aiocbp);
<span style="color: #aaaaaa">@@ -1505,8 +1338,6 @@ ssize_t DARSHAN_DECL(aio_return)(struct aiocb *aiocbp)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1517,8 +1348,6 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb64 *aiocbp)
</span>     struct posix_aio_tracker *tmp;
     int aligned_flag = 0;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(aio_return64);
 
     ret = __real_aio_return64(aiocbp);
<span style="color: #aaaaaa">@@ -1547,8 +1376,6 @@ ssize_t DARSHAN_DECL(aio_return64)(struct aiocb64 *aiocbp)
</span>     }
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1558,8 +1385,6 @@ int DARSHAN_DECL(lio_listio)(int mode, struct aiocb *const aiocb_list[],
</span>     int ret;
     int i;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(lio_listio);
 
     ret = __real_lio_listio(mode, aiocb_list, nitems, sevp);
<span style="color: #aaaaaa">@@ -1574,8 +1399,6 @@ int DARSHAN_DECL(lio_listio)(int mode, struct aiocb *const aiocb_list[],
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -1585,8 +1408,6 @@ int DARSHAN_DECL(lio_listio64)(int mode, struct aiocb64 *const aiocb_list[],
</span>     int ret;
     int i;
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_PRE_WRAP();
</span>-
     MAP_OR_FAIL(lio_listio64);
 
     ret = __real_lio_listio64(mode, aiocb_list, nitems, sevp);
<span style="color: #aaaaaa">@@ -1601,8 +1422,6 @@ int DARSHAN_DECL(lio_listio64)(int mode, struct aiocb64 *const aiocb_list[],
</span>         POSIX_UNLOCK();
     }
 
<span style="color: #000000;background-color: #ffdddd">-    PSX_POST_WRAP();
</span>-
     return(ret);
 }
 
<span style="color: #aaaaaa">@@ -2199,8 +2018,6 @@ static void posix_begin_shutdown()
</span>     instrumentation_disabled = 1;
     POSIX_UNLOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    fprintf(stderr, "POSIX:wrappers\t%f\n", psx_wrap_time);
</span>-
     return;
 }
 
</code></pre>

<br>
</li>
<li id='diff-7'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-7'>
<strong>
darshan-runtime/share/darshan-mmap-epilog.sh.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- /dev/null
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/share/darshan-mmap-epilog.sh.in
</span><span style="color: #aaaaaa">@@ -0,0 +1,57 @@
</span><span style="color: #000000;background-color: #ddffdd">+#!/bin/bash
+
+#
+# Copyright (C) 2015 University of Chicago.
+# See COPYRIGHT notice in top-level directory.
+#
+
+# grab the prefix of the darshan install directory
+DARSHAN_INSTALL_DIR=@prefix@
+
+# use the log dir specified at configure time
+DARSHAN_LOG_DIR=@__DARSHAN_LOG_PATH@
+
+NODE_NAME=$(uname -n)
+
+# use the default mmap log directory (/tmp), unless the 
+# env variable is set to something
+if [ -z "$DARSHAN_MMAP_LOGPATH" ]; then
+    DARSHAN_MMAP_LOG_DIR=/tmp
+else
+    DARSHAN_MMAP_LOG_DIR=$DARSHAN_MMAP_LOGPATH
+fi
+
+DARSHAN_MMAP_LOG_GLOB=${DARSHAN_MMAP_LOG_DIR}/*id${SLURM_JOB_ID}*.darshan
+
+# if no mmap logs found for this job, we have nothing to do
+DARSHAN_TEST_LOG=$(ls $DARSHAN_MMAP_LOG_GLOB 2>/dev/null | head -n 1)
+if [ -z $DARSHAN_TEST_LOG ]; then
+    exit 0
+fi
+
+# get the job start time from the first log file
+JOB_START_DATE=$(${DARSHAN_INSTALL_DIR}/bin/darshan-parser $DARSHAN_TEST_LOG |
+    grep "# start_time_asci" | cut -d':' -f 2- | cut -d' ' -f 2-)
+OUTLOG_YEAR=$(date --date="$(printf "$JOB_START_DATE")" +"%Y")
+OUTLOG_MON=$(date --date="$(printf "$JOB_START_DATE")" +"%-m")
+OUTLOG_DAY=$(date --date="$(printf "$JOB_START_DATE")" +"%-d")
+OUTLOG_SECS=$((
+    ($(date --date="$(printf "$JOB_START_DATE")" +"%-H") * 60 * 60) +
+    ($(date --date="$(printf "$JOB_START_DATE")" +"%-M") * 60) +
+    ($(date --date="$(printf "$JOB_START_DATE")" +"%-S"))
+))
+
+MMAP_LOG_PRE=$(basename $DARSHAN_TEST_LOG | cut -d'_' -f 1-3)
+
+# construct full output log directory name
+OUTLOG_DIR=${DARSHAN_LOG_DIR}/${OUTLOG_YEAR}/${OUTLOG_MON}/${OUTLOG_DAY}/
+OUTLOG_DIR=$OUTLOG_DIR/${MMAP_LOG_PRE}_${OUTLOG_MON}-${OUTLOG_DAY}-${OUTLOG_SECS}
+
+# create the output directory for this job
+mkdir -p $OUTLOG_DIR
+
+# construct the per-node log files and store in the output directory
+$DARSHAN_INSTALL_DIR/bin/darshan-merge --output ${OUTLOG_DIR}/${MMAP_LOG_PRE}_${NODE_NAME}.darshan \
+    $DARSHAN_MMAP_LOG_GLOB
+
+exit 0
</span></code></pre>

<br>
</li>
<li id='diff-8'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-8'>
<strong>
darshan-util/Makefile.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/Makefile.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/Makefile.in
</span><span style="color: #aaaaaa">@@ -1,4 +1,4 @@
</span>-all: libdarshan-util.a darshan-null-logutils.o darshan-analyzer darshan-convert darshan-diff darshan-parser darshan-stitch-logs jenkins-hash-gen
<span style="color: #000000;background-color: #ddffdd">+all: libdarshan-util.a darshan-null-logutils.o darshan-analyzer darshan-convert darshan-diff darshan-parser darshan-merge jenkins-hash-gen
</span> 
 DESTDIR =
 srcdir = @srcdir@
<span style="color: #aaaaaa">@@ -107,7 +107,7 @@ darshan-diff: darshan-diff.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_
</span> darshan-parser: darshan-parser.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2
        $(CC) $(CFLAGS) $(LDFLAGS) $< libdarshan-util.a -o $@ $(LIBS) 
 
-darshan-stitch-logs: darshan-stitch-logs.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2
<span style="color: #000000;background-color: #ddffdd">+darshan-merge: darshan-merge.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) $(DARSHAN_MOD_LOGUTIL_HEADERS) $(DARSHAN_MOD_LOG_FORMATS) libdarshan-util.a | uthash-1.9.2
</span>   $(CC) $(CFLAGS) $(LDFLAGS) $< libdarshan-util.a -o $@ $(LIBS)
 
 #test/gztest: test/gztest.c mktestdir
<span style="color: #aaaaaa">@@ -125,7 +125,7 @@ install:: all
</span>   install -m 755 darshan-convert $(bindir)
        install -m 755 darshan-diff $(bindir)
        install -m 755 darshan-parser $(bindir)
-       install -m 755 darshan-stitch-logs $(bindir)
<span style="color: #000000;background-color: #ddffdd">+        install -m 755 darshan-merge $(bindir)
</span>   install -m 755 $(srcdir)/darshan-summary-per-file.sh $(bindir)
        install -m 755 libdarshan-util.a $(libdir)
 ifeq ($(DARSHAN_ENABLE_SHARED),1)
<span style="color: #aaaaaa">@@ -159,7 +159,7 @@ endif
</span> 
 
 clean::
-       rm -f *.o *.po *.a *.so darshan-analyzer darshan-convert darshan-parser darshan-stitch-logs jenkins-hash-gen
<span style="color: #000000;background-color: #ddffdd">+        rm -f *.o *.po *.a *.so darshan-analyzer darshan-convert darshan-parser darshan-merge jenkins-hash-gen
</span> 
 distclean:: clean
        rm -f darshan-runtime-config.h aclocal.m4 autom4te.cache/* config.status config.log Makefile util/bin/darshan-job-summary.pl
</code></pre>

<br>
</li>
<li id='diff-9'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-9'>
<strong>
darshan-util/darshan-logutils.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-logutils.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-logutils.c
</span><span style="color: #aaaaaa">@@ -967,10 +967,9 @@ static int darshan_log_putheader(darshan_fd fd)
</span>     header.magic_nr = DARSHAN_MAGIC_NR;
     header.comp_type = fd->comp_type;
     header.partial_flag = fd->partial_flag;
-
<span style="color: #000000;background-color: #ffdddd">-    /* copy the mapping information to the header */
</span>     memcpy(&header.rec_map, &fd->rec_map, sizeof(struct darshan_log_map));
<span style="color: #000000;background-color: #ffdddd">-    memcpy(&header.mod_map, &fd->mod_map, DARSHAN_MAX_MODS * sizeof(struct darshan_log_map));
</span><span style="color: #000000;background-color: #ddffdd">+    memcpy(header.mod_map, fd->mod_map, DARSHAN_MAX_MODS * sizeof(struct darshan_log_map));
+    memcpy(header.mod_ver, fd->mod_ver, DARSHAN_MAX_MODS * sizeof(uint32_t));
</span> 
     /* write header to file */
     ret = darshan_log_write(fd, &header, sizeof(header));
</code></pre>

<br>
</li>
<li id='diff-10'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff#diff-10'>
<strong>
darshan-util/darshan-stitch-logs.c
</strong>

<strong>
darshan-util/darshan-merge.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-stitch-logs.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-merge.c
</span><span style="color: #aaaaaa">@@ -11,11 +11,6 @@
</span> 
 #define DEF_MOD_BUF_SIZE 1024 /* 1 KiB is enough for all current mod records ... */
 
-/* TODO: are there any checks we should do to ensure tmp logs belong to the same job */
-/* we can't specifically check the job id, since the pid is used if no job scheduler */
-
-/* TODO: how do we set the output logfile name to be unique, and have necessary semantic info contained */
-
 /* TODO: set job end timestamp? */
 
 struct darshan_shared_record_ref
<span style="color: #aaaaaa">@@ -28,24 +23,28 @@ struct darshan_shared_record_ref
</span> 
 void usage(char *exename)
 {
<span style="color: #000000;background-color: #ffdddd">-    fprintf(stderr, "Usage: %s [options] <tmp_dir> <job_id>\n", exename);
-    fprintf(stderr, "       TODO: description.\n");
-    fprintf(stderr, "       --shared-redux Reduce globally shared records into a single record.\n");
</span><span style="color: #000000;background-color: #ddffdd">+    fprintf(stderr, "Usage: %s --output <output_path> [options] <input-logs>\n", exename);
+    fprintf(stderr, "This utility merges multiple Darshan log files into a single output log file.\n");
+    fprintf(stderr, "Options:\n");
+    fprintf(stderr, "\t--output\t(REQUIRED) Full path of the output darshan log file.\n");
+    fprintf(stderr, "\t--shared-redux\tReduce globally shared records into a single record.\n");
</span> 
     exit(1);
 }
 
-void parse_args(int argc, char **argv, char **tmplog_dir, int *tmplog_jobid,
<span style="color: #000000;background-color: #ffdddd">-    int *shared_redux)
</span><span style="color: #000000;background-color: #ddffdd">+void parse_args(int argc, char **argv, char ***infile_list, int *n_files,
+    char **outlog_path, int *shared_redux)
</span> {
     int index;
     static struct option long_opts[] =
     {
         {"shared-redux", no_argument, NULL, 's'},
<span style="color: #000000;background-color: #ddffdd">+        {"output", required_argument, NULL, 'o'},
</span>         {0, 0, 0, 0}
     };
 
     *shared_redux = 0;
<span style="color: #000000;background-color: #ddffdd">+    *outlog_path = NULL;
</span> 
     while(1)
     {
<span style="color: #aaaaaa">@@ -58,6 +57,9 @@ void parse_args(int argc, char **argv, char **tmplog_dir, int *tmplog_jobid,
</span>             case 's':
                 *shared_redux = 1;
                 break;
<span style="color: #000000;background-color: #ddffdd">+            case 'o':
+                *outlog_path = optarg;
+                break;
</span>             case '?':
             default:
                 usage(argv[0]);
<span style="color: #aaaaaa">@@ -65,42 +67,20 @@ void parse_args(int argc, char **argv, char **tmplog_dir, int *tmplog_jobid,
</span>         }
     }
 
<span style="color: #000000;background-color: #ffdddd">-    if(optind + 2 == argc)
-    {
-        *tmplog_dir = argv[optind];
-        *tmplog_jobid = atoi(argv[optind+1]);
-    }
-    else
</span><span style="color: #000000;background-color: #ddffdd">+    if(*outlog_path == NULL)
</span>     {
         usage(argv[0]);
     }
 
<span style="color: #000000;background-color: #ffdddd">-    return;
</span>-}
<span style="color: #000000;background-color: #ddffdd">+    *infile_list = &argv[optind];
+    *n_files = argc - optind;
</span> 
-int logfile_path_comp(const void *a, const void *b)
-{
<span style="color: #000000;background-color: #ffdddd">-    char *pathA = *(char **)a;
-    char *pathB = *(char **)b;
-    char *pathA_rank_s, *pathB_rank_s;
-    int pathA_rank, pathB_rank;
</span>-
<span style="color: #000000;background-color: #ffdddd">-    /* extract the process rank number from end of each log file path */
-    pathA_rank_s = strrchr(pathA, '.') + 1;
-    pathA_rank = atoi(pathA_rank_s);
-    pathB_rank_s = strrchr(pathB, '.') + 1;
-    pathB_rank = atoi(pathB_rank_s);
</span>-
<span style="color: #000000;background-color: #ffdddd">-    if(pathA_rank < pathB_rank)
-        return(-1);
-    else if(pathA_rank > pathB_rank)
-        return(1);
-    else
-        return(0);
</span><span style="color: #000000;background-color: #ddffdd">+    return;
</span> }
 
-int build_mod_shared_rec_hash(glob_t *globbuf, darshan_module_id mod_id,
<span style="color: #000000;background-color: #ffdddd">-    int nprocs, char *mod_buf, struct darshan_shared_record_ref **shared_rec_hash)
</span><span style="color: #000000;background-color: #ddffdd">+int build_mod_shared_rec_hash(char **infile_list, int n_infiles,
+    darshan_module_id mod_id, int nprocs, char *mod_buf,
+    struct darshan_shared_record_ref **shared_rec_hash)
</span> {
     darshan_fd in_fd;
     struct darshan_base_record *base_rec;
<span style="color: #aaaaaa">@@ -110,14 +90,14 @@ int build_mod_shared_rec_hash(glob_t *globbuf, darshan_module_id mod_id,
</span>     int i;
 
     /* loop over each input log file */
<span style="color: #000000;background-color: #ffdddd">-    for(i = 0; i < globbuf->gl_pathc; i++)
</span><span style="color: #000000;background-color: #ddffdd">+    for(i = 0; i < n_infiles; i++)
</span>     {
<span style="color: #000000;background-color: #ffdddd">-        in_fd = darshan_log_open(globbuf->gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+        in_fd = darshan_log_open(infile_list[i]);
</span>         if(in_fd == NULL)
         {
             fprintf(stderr,
                 "Error: unable to open input Darshan log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                globbuf->gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile_list[i]);
</span>             return(-1);
         }
 
<span style="color: #aaaaaa">@@ -167,7 +147,7 @@ int build_mod_shared_rec_hash(glob_t *globbuf, darshan_module_id mod_id,
</span>         {
             fprintf(stderr,
                 "Error: unable to read %s module record from input log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                darshan_module_names[mod_id], globbuf->gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                darshan_module_names[mod_id], infile_list[i]);
</span>             darshan_log_close(in_fd);
             return(-1);
         }
<span style="color: #aaaaaa">@@ -190,20 +170,18 @@ int build_mod_shared_rec_hash(glob_t *globbuf, darshan_module_id mod_id,
</span> 
 int main(int argc, char *argv[])
 {
<span style="color: #000000;background-color: #ddffdd">+    char **infile_list;
+    int n_infiles;
</span>     int shared_redux;
<span style="color: #000000;background-color: #ffdddd">-    char *tmplog_dir;
-    int job_id;
-    glob_t globbuf;
-    char glob_pstr[512];
-    char *stitch_logname = "/tmp/test123.darshan"; /* XXX default + configurable? */
-    darshan_fd in_fd, stitch_fd;
-    struct darshan_job in_job, stitch_job;
-    char stitch_exe[DARSHAN_EXE_LEN+1];
-    char **stitch_mnt_pts;
-    char **stitch_fs_types;
-    int stitch_mnt_count = 0;
</span><span style="color: #000000;background-color: #ddffdd">+    char *outlog_path;
+    darshan_fd in_fd, merge_fd;
+    struct darshan_job in_job, merge_job;
+    char merge_exe[DARSHAN_EXE_LEN+1] = {0};
+    char **merge_mnt_pts;
+    char **merge_fs_types;
+    int merge_mnt_count = 0;
</span>     struct darshan_record_ref *in_hash = NULL;
<span style="color: #000000;background-color: #ffdddd">-    struct darshan_record_ref *stitch_hash = NULL;
</span><span style="color: #000000;background-color: #ddffdd">+    struct darshan_record_ref *merge_hash = NULL;
</span>     struct darshan_record_ref *ref, *tmp, *found;
     struct darshan_shared_record_ref *shared_rec_hash = NULL;
     struct darshan_shared_record_ref *sref, *stmp;
<span style="color: #aaaaaa">@@ -213,42 +191,24 @@ int main(int argc, char *argv[])
</span>     int ret;
 
     /* grab command line arguments */
<span style="color: #000000;background-color: #ffdddd">-    parse_args(argc, argv, &tmplog_dir, &job_id, &shared_redux);
</span><span style="color: #000000;background-color: #ddffdd">+    parse_args(argc, argv, &infile_list, &n_infiles, &outlog_path, &shared_redux);
</span> 
<span style="color: #000000;background-color: #ffdddd">-    /* construct the list of input log files to stitch together */
-    snprintf(glob_pstr, 512, "%s/darshan_job%d*", tmplog_dir, job_id);
</span><span style="color: #000000;background-color: #ddffdd">+    memset(&merge_job, 0, sizeof(struct darshan_job));
</span> 
<span style="color: #000000;background-color: #ffdddd">-    ret = glob(glob_pstr, GLOB_NOSORT, NULL, &globbuf);
-    if(ret != 0)
-    {
-        fprintf(stderr,
-            "Error: unable to construct list of input Darshan log files.\n");
-        return(-1);
-    }
</span>-
<span style="color: #000000;background-color: #ffdddd">-    /* sort the file list according to the rank id appended to each logfile name */
-    /* NOTE: we don't rely on glob's default alphabetic sorting, because it won't
-     * sort by ascending ranks if pid's are used for job ids, for instance
-     */
-    qsort(globbuf.gl_pathv, globbuf.gl_pathc, sizeof(char *), logfile_path_comp);
</span>-
<span style="color: #000000;background-color: #ffdddd">-    memset(&stitch_job, 0, sizeof(struct darshan_job));
</span>-
<span style="color: #000000;background-color: #ffdddd">-    /* first pass at stitching together logs:
</span><span style="color: #000000;background-color: #ddffdd">+    /* first pass at merging together logs:
</span>      *      - compose output job-level metadata structure (including exe & mount data)
      *      - compose output record_id->file_name mapping 
      */
<span style="color: #000000;background-color: #ffdddd">-    for(i = 0; i < globbuf.gl_pathc; i++)
</span><span style="color: #000000;background-color: #ddffdd">+    for(i = 0; i < n_infiles; i++)
</span>     {
         memset(&in_job, 0, sizeof(struct darshan_job));
 
<span style="color: #000000;background-color: #ffdddd">-        in_fd = darshan_log_open(globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+        in_fd = darshan_log_open(infile_list[i]);
</span>         if(in_fd == NULL)
         {
             fprintf(stderr,
                 "Error: unable to open input Darshan log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                globbuf.gl_pathv[i]);
-            globfree(&globbuf);
</span><span style="color: #000000;background-color: #ddffdd">+                infile_list[i]);
</span>             return(-1);
         }
 
<span style="color: #aaaaaa">@@ -258,9 +218,8 @@ int main(int argc, char *argv[])
</span>         {
             fprintf(stderr,
                 "Error: unable to read job data from input Darshan log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile_list[i]);
</span>             darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-            globfree(&globbuf);
</span>             return(-1);
         }
 
<span style="color: #aaaaaa">@@ -273,47 +232,44 @@ int main(int argc, char *argv[])
</span>         {
             fprintf(stderr,
                 "Error: potentially corrupt data found in input log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile_list[i]);
</span>             darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-            globfree(&globbuf);
</span>             return(-1);
         }
 
         if(i == 0)
         {
             /* get job data, exe, & mounts directly from the first input log */
<span style="color: #000000;background-color: #ffdddd">-            memcpy(&stitch_job, &in_job, sizeof(struct darshan_job));
</span><span style="color: #000000;background-color: #ddffdd">+            memcpy(&merge_job, &in_job, sizeof(struct darshan_job));
</span> 
<span style="color: #000000;background-color: #ffdddd">-            ret = darshan_log_getexe(in_fd, stitch_exe);
</span><span style="color: #000000;background-color: #ddffdd">+            ret = darshan_log_getexe(in_fd, merge_exe);
</span>             if(ret < 0)
             {
                 fprintf(stderr,
<span style="color: #000000;background-color: #ffdddd">-                    "Error: unable to read exe string from Darshan log file %s.\n",
-                    globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                    "Error: unable to read exe string from input Darshan log file %s.\n",
+                    infile_list[i]);
</span>                 darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-                globfree(&globbuf);
</span>                 return(-1);
             }
 
<span style="color: #000000;background-color: #ffdddd">-            ret = darshan_log_getmounts(in_fd, &stitch_mnt_pts,
-                &stitch_fs_types, &stitch_mnt_count);
</span><span style="color: #000000;background-color: #ddffdd">+            ret = darshan_log_getmounts(in_fd, &merge_mnt_pts,
+                &merge_fs_types, &merge_mnt_count);
</span>             if(ret < 0)
             {
                 fprintf(stderr,
<span style="color: #000000;background-color: #ffdddd">-                    "Error: unable to read mount info from Darshan log file %s.\n",
-                    globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                    "Error: unable to read mount info from input Darshan log file %s.\n",
+                    infile_list[i]);
</span>                 darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-                globfree(&globbuf);
</span>                 return(-1);
             }
         }
         else
         {
             /* potentially update job timestamps using remaining logs */
<span style="color: #000000;background-color: #ffdddd">-            if(in_job.start_time < stitch_job.start_time)
-                stitch_job.start_time = in_job.start_time;
-            if(in_job.end_time > stitch_job.end_time)
-                stitch_job.end_time = in_job.end_time;
</span><span style="color: #000000;background-color: #ddffdd">+            if(in_job.start_time < merge_job.start_time)
+                merge_job.start_time = in_job.start_time;
+            if(in_job.end_time > merge_job.end_time)
+                merge_job.end_time = in_job.end_time;
</span>         }
 
         /* read the hash of ids->names for the input log */
<span style="color: #aaaaaa">@@ -322,9 +278,8 @@ int main(int argc, char *argv[])
</span>         {
             fprintf(stderr,
                 "Error: unable to read job data from input Darshan log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                globbuf.gl_pathv[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                infile_list[i]);
</span>             darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-            globfree(&globbuf);
</span>             return(-1);
         }
 
<span style="color: #aaaaaa">@@ -333,17 +288,16 @@ int main(int argc, char *argv[])
</span>          */
         HASH_ITER(hlink, in_hash, ref, tmp)
         {
<span style="color: #000000;background-color: #ffdddd">-            HASH_FIND(hlink, stitch_hash, &(ref->id), sizeof(darshan_record_id), found);
</span><span style="color: #000000;background-color: #ddffdd">+            HASH_FIND(hlink, merge_hash, &(ref->id), sizeof(darshan_record_id), found);
</span>             if(!found)
             {
<span style="color: #000000;background-color: #ffdddd">-                HASH_ADD(hlink, stitch_hash, id, sizeof(darshan_record_id), ref);
</span><span style="color: #000000;background-color: #ddffdd">+                HASH_ADD(hlink, merge_hash, id, sizeof(darshan_record_id), ref);
</span>             }
             else if(strcmp(ref->name, found->name))
             {
                 fprintf(stderr,
                     "Error: invalid Darshan record table entry.\n");
                 darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-                globfree(&globbuf);
</span>                 return(-1);
             }
         }
<span style="color: #aaaaaa">@@ -351,59 +305,54 @@ int main(int argc, char *argv[])
</span>         darshan_log_close(in_fd);
     }
 
<span style="color: #000000;background-color: #ffdddd">-    /* create the output "stitched together" log */
-    stitch_fd = darshan_log_create(stitch_logname, DARSHAN_ZLIB_COMP, 1);
-    if(stitch_fd == NULL)
</span><span style="color: #000000;background-color: #ddffdd">+    /* create the output "merged" log */
+    merge_fd = darshan_log_create(outlog_path, DARSHAN_ZLIB_COMP, 1);
+    if(merge_fd == NULL)
</span>     {
         fprintf(stderr, "Error: unable to create output darshan log.\n");
<span style="color: #000000;background-color: #ffdddd">-        globfree(&globbuf);
</span>         return(-1);
     }
 
     /* write the darshan job info, exe string, and mount data to output file */
<span style="color: #000000;background-color: #ffdddd">-    ret = darshan_log_putjob(stitch_fd, &stitch_job);
</span><span style="color: #000000;background-color: #ddffdd">+    ret = darshan_log_putjob(merge_fd, &merge_job);
</span>     if(ret < 0)
     {
         fprintf(stderr, "Error: unable to write job data to output darshan log.\n");
<span style="color: #000000;background-color: #ffdddd">-        globfree(&globbuf);
-        darshan_log_close(stitch_fd);
-        unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+        darshan_log_close(merge_fd);
+        unlink(outlog_path);
</span>         return(-1);
     }
 
<span style="color: #000000;background-color: #ffdddd">-    ret = darshan_log_putexe(stitch_fd, stitch_exe);
</span><span style="color: #000000;background-color: #ddffdd">+    ret = darshan_log_putexe(merge_fd, merge_exe);
</span>     if(ret < 0)
     {
         fprintf(stderr, "Error: unable to write exe string to output darshan log.\n");
<span style="color: #000000;background-color: #ffdddd">-        globfree(&globbuf);
-        darshan_log_close(stitch_fd);
-        unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+        darshan_log_close(merge_fd);
+        unlink(outlog_path);
</span>         return(-1);
     }
 
<span style="color: #000000;background-color: #ffdddd">-    ret = darshan_log_putmounts(stitch_fd, stitch_mnt_pts, stitch_fs_types, stitch_mnt_count);
</span><span style="color: #000000;background-color: #ddffdd">+    ret = darshan_log_putmounts(merge_fd, merge_mnt_pts, merge_fs_types, merge_mnt_count);
</span>     if(ret < 0)
     {
         fprintf(stderr, "Error: unable to write mount data to output darshan log.\n");
<span style="color: #000000;background-color: #ffdddd">-        globfree(&globbuf);
-        darshan_log_close(stitch_fd);
-        unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+        darshan_log_close(merge_fd);
+        unlink(outlog_path);
</span>         return(-1);
     }
 
<span style="color: #000000;background-color: #ffdddd">-    /* write the stitched together table of records to output file */
-    ret = darshan_log_puthash(stitch_fd, stitch_hash);
</span><span style="color: #000000;background-color: #ddffdd">+    /* write the merged table of records to output file */
+    ret = darshan_log_puthash(merge_fd, merge_hash);
</span>     if(ret < 0)
     {
         fprintf(stderr, "Error: unable to write record table to output darshan log.\n");
<span style="color: #000000;background-color: #ffdddd">-        globfree(&globbuf);
-        darshan_log_close(stitch_fd);
-        unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+        darshan_log_close(merge_fd);
+        unlink(outlog_path);
</span>         return(-1);
     }
 
     /* iterate over active darshan modules and gather module data to write
<span style="color: #000000;background-color: #ffdddd">-     * to the stitched together output log
</span><span style="color: #000000;background-color: #ddffdd">+     * to the merged output log
</span>      */
     for(i = 0; i < DARSHAN_MAX_MODS; i++)
     {
<span style="color: #aaaaaa">@@ -412,33 +361,30 @@ int main(int argc, char *argv[])
</span>         if(shared_redux)
         {
             /* build the hash of records shared globally by this module */
<span style="color: #000000;background-color: #ffdddd">-            ret = build_mod_shared_rec_hash(&globbuf, i, stitch_job.nprocs,
-                mod_buf, &shared_rec_hash);
</span><span style="color: #000000;background-color: #ddffdd">+            ret = build_mod_shared_rec_hash(infile_list, n_infiles, i,
+                merge_job.nprocs, mod_buf, &shared_rec_hash);
</span>             if(ret < 0)
             {
                 fprintf(stderr,
                     "Error: unable to build list of %s module's shared records.\n",
                     darshan_module_names[i]);
<span style="color: #000000;background-color: #ffdddd">-                globfree(&globbuf);
-                darshan_log_close(stitch_fd);
-                unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+                darshan_log_close(merge_fd);
+                unlink(outlog_path);
</span>                 return(-1);
             }
 
         }
 
<span style="color: #000000;background-color: #ffdddd">-        for(j = 0; j < globbuf.gl_pathc; j++)
</span><span style="color: #000000;background-color: #ddffdd">+        for(j = 0; j < n_infiles; j++)
</span>         {
<span style="color: #000000;background-color: #ffdddd">-            in_fd = darshan_log_open(globbuf.gl_pathv[j]);
</span><span style="color: #000000;background-color: #ddffdd">+            in_fd = darshan_log_open(infile_list[j]);
</span>             if(in_fd == NULL)
             {
                 fprintf(stderr,
                     "Error: unable to open input Darshan log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                    globbuf.gl_pathv[j]);
-                globfree(&globbuf);
-                darshan_log_close(in_fd);
-                darshan_log_close(stitch_fd);
-                unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+                    infile_list[j]);
+                darshan_log_close(merge_fd);
+                unlink(outlog_path);
</span>                 return(-1);
             }
 
<span style="color: #aaaaaa">@@ -447,15 +393,15 @@ int main(int argc, char *argv[])
</span>                 /* write out the shared records first */
                 HASH_ITER(hlink, shared_rec_hash, sref, stmp)
                 {
<span style="color: #000000;background-color: #ffdddd">-                    ret = mod_logutils[i]->log_put_record(stitch_fd, sref->agg_rec, in_fd->mod_ver[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                    ret = mod_logutils[i]->log_put_record(merge_fd, sref->agg_rec, in_fd->mod_ver[i]);
</span>                     if(ret < 0)
                     {
                         fprintf(stderr,
                             "Error: unable to write %s module record to output darshan log.\n",
                             darshan_module_names[i]);
<span style="color: #000000;background-color: #ffdddd">-                        globfree(&globbuf);
-                        darshan_log_close(stitch_fd);
-                        unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+                        darshan_log_close(in_fd);
+                        darshan_log_close(merge_fd);
+                        unlink(outlog_path);
</span>                         return(-1);
                     }
                 }
<span style="color: #aaaaaa">@@ -470,16 +416,15 @@ int main(int argc, char *argv[])
</span>                 if(sref)
                     continue; /* skip shared records */
 
<span style="color: #000000;background-color: #ffdddd">-                ret = mod_logutils[i]->log_put_record(stitch_fd, mod_buf, in_fd->mod_ver[i]);
</span><span style="color: #000000;background-color: #ddffdd">+                ret = mod_logutils[i]->log_put_record(merge_fd, mod_buf, in_fd->mod_ver[i]);
</span>                 if(ret < 0)
                 {
                     fprintf(stderr,
                         "Error: unable to write %s module record to output log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                        darshan_module_names[i], globbuf.gl_pathv[j]);
-                    globfree(&globbuf);
</span><span style="color: #000000;background-color: #ddffdd">+                        darshan_module_names[i], infile_list[j]);
</span>                     darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-                    darshan_log_close(stitch_fd);
-                    unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+                    darshan_log_close(merge_fd);
+                    unlink(outlog_path);
</span>                     return(-1);
                 }
             }
<span style="color: #aaaaaa">@@ -487,11 +432,10 @@ int main(int argc, char *argv[])
</span>             {
                 fprintf(stderr,
                     "Error: unable to read %s module record from input log file %s.\n",
<span style="color: #000000;background-color: #ffdddd">-                    darshan_module_names[i], globbuf.gl_pathv[j]);
-                globfree(&globbuf);
</span><span style="color: #000000;background-color: #ddffdd">+                    darshan_module_names[i], infile_list[j]);
</span>                 darshan_log_close(in_fd);
<span style="color: #000000;background-color: #ffdddd">-                darshan_log_close(stitch_fd);
-                unlink(stitch_logname);
</span><span style="color: #000000;background-color: #ddffdd">+                darshan_log_close(merge_fd);
+                unlink(outlog_path);
</span>                 return(-1);
             }
 
<span style="color: #aaaaaa">@@ -509,8 +453,16 @@ int main(int argc, char *argv[])
</span>         }
     }
 
<span style="color: #000000;background-color: #ffdddd">-    darshan_log_close(stitch_fd);
-    globfree(&globbuf);
</span><span style="color: #000000;background-color: #ddffdd">+    darshan_log_close(merge_fd);
</span> 
     return(0);
 }
<span style="color: #000000;background-color: #ddffdd">+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
</span></code></pre>

<br>
</li>

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

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":["merge_requests","issues","commit"],"url":"https://xgitlab.cels.anl.gov/darshan/darshan/compare/d3ebeb50a7b5adbadd02ef6da5a70bb5360da3ac...5f4e06f67c6195738e7f098fc697461d07bd41ff"}}</script>
</p>
</div>
</body>
</html>