<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/c276e4c255f8bb1435914f3474d0968d65a334ec">c276e4c2</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-29T13:00:26-06:00</i>
</div>
<pre class='commit-message'>first cut at unifying mmap feature with darshan</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/darshan-core.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/darshan.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/lib/darshan-core.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-runtime/share/darshan-mmap-epilog.sh.in
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec#diff-0'>
<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">@@ -43,7 +43,8 @@
</span> /* default path for storing mmap log files is '/tmp' */
 #define DARSHAN_DEF_MMAP_LOG_PATH "/tmp"
 
<span style="color: #000000;background-color: #ffdddd">-#define DARSHAN_RECORD_BUF_SIZE (1024 * 100) /* store 1024 records, each of at most 100 bytes */
</span><span style="color: #000000;background-color: #ddffdd">+/* default record buf can store 2048 records of size 100 bytes */
+#define DARSHAN_RECORD_BUF_SIZE (2048 * 100)
</span> 
 /* Default runtime compression buffer size */
 #define DARSHAN_COMP_BUF_SIZE DARSHAN_MOD_MEM_MAX
<span style="color: #aaaaaa">@@ -51,19 +52,23 @@
</span> /* in memory structure to keep up with job level data */
 struct darshan_core_runtime
 {
<span style="color: #000000;background-color: #ddffdd">+    /* pointers to each log file component */
</span>     struct darshan_header *log_hdr_p;
     struct darshan_job *log_job_p;
     char *log_exemnt_p;
     void *log_rec_p;
     void *log_mod_p;
 
<span style="color: #000000;background-color: #ffdddd">-    char mmap_log_name[PATH_MAX];
</span><span style="color: #000000;background-color: #ddffdd">+    /* darshan-core internal data structures */
</span>     struct darshan_core_record_ref *rec_hash;
     int rec_hash_cnt;
     struct darshan_core_module* mod_array[DARSHAN_MAX_MODS];
     int mod_mem_used;
     char *comp_buf;
     double wtime_offset;
<span style="color: #000000;background-color: #ddffdd">+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
+    char mmap_log_name[PATH_MAX];
+#endif
</span> };
 
 struct darshan_core_module
<span style="color: #aaaaaa">@@ -74,8 +79,7 @@ struct darshan_core_module
</span> 
 struct darshan_core_record_ref
 {
<span style="color: #000000;background-color: #ffdddd">-    char *name;
-    darshan_record_id id;
</span><span style="color: #000000;background-color: #ddffdd">+    void *rec_p; /* id & name buffer */
</span>     uint64_t mod_flags;
     uint64_t global_mod_flags;
     UT_hash_handle hlink;
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec#diff-1'>
<strong>
darshan-runtime/darshan.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/darshan.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/darshan.h
</span><span style="color: #aaaaaa">@@ -93,7 +93,7 @@ struct darshan_module_funcs
</span>  * environment, allowing the module to store I/O characterization data.
  * 'funcs' is a pointer to a structure containing each of the function
  * pointers required by darshan-core to shut down the module. The function
<span style="color: #000000;background-color: #ffdddd">- * returns the following integers passed in as pointers: 'my_rank' is the
</span><span style="color: #000000;background-color: #ddffdd">+ * returns the following integers passed in as pointers: 'rank' is the
</span>  * MPI rank of the calling process, 'mod_mem_limit' is the maximum amount
  * of memory the module may use, and 'sys_mem_alignment' is the configured
  * memory alignment value Darshan was configured with.
<span style="color: #aaaaaa">@@ -103,7 +103,7 @@ void darshan_core_register_module(
</span>     struct darshan_module_funcs *funcs,
     int *inout_mod_size,
     void **mod_buf,
<span style="color: #000000;background-color: #ffdddd">-    int *my_rank,
</span><span style="color: #000000;background-color: #ddffdd">+    int *rank,
</span>     int *sys_mem_alignment);
 
 /* darshan_core_unregister_module()
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec#diff-2'>
<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">@@ -96,8 +96,8 @@ static void darshan_get_exe_and_mounts(
</span> static void darshan_add_record_hashref(
     struct darshan_core_runtime *core, char *name,
     darshan_record_id id, struct darshan_core_record_ref **ref);
<span style="color: #000000;background-color: #ffdddd">-static void darshan_block_size_from_path(
-    const char *path, int *block_size);
</span><span style="color: #000000;background-color: #ddffdd">+static int darshan_block_size_from_path(
+    const char *path);
</span> static void darshan_get_user_name(
     char *user);
 static void darshan_get_logfile_name(
<span style="color: #aaaaaa">@@ -126,16 +126,19 @@ void darshan_core_initialize(int argc, char **argv)
</span>     struct darshan_core_runtime *init_core = NULL;
     int internal_timing_flag = 0;
     double init_start, init_time, init_max;
<span style="color: #000000;background-color: #ffdddd">-    int mmap_fd;
-    int mmap_size;
-    int sys_page_size;
-    char cuser[L_cuserid] = {0};
</span>     char *envstr;
     char *jobid_str;
     int jobid;
     int ret;
     int tmpval;
     int i;
<span style="color: #000000;background-color: #ddffdd">+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
+    int mmap_fd;
+    int mmap_size;
+    int sys_page_size;
+    char cuser[L_cuserid] = {0};
+    char *mmap_log_dir;
+#endif
</span> 
     DARSHAN_MPI_CALL(PMPI_Comm_size)(MPI_COMM_WORLD, &nprocs);
     DARSHAN_MPI_CALL(PMPI_Comm_rank)(MPI_COMM_WORLD, &my_rank);
<span style="color: #aaaaaa">@@ -200,7 +203,32 @@ 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: #ffdddd">-#ifdef __DARSHAN_ENABLE_MMAP_LOGS
</span><span style="color: #000000;background-color: #ddffdd">+#ifndef __DARSHAN_ENABLE_MMAP_LOGS
+            /* just allocate memory for each log file region */
+            init_core->log_hdr_p = malloc(sizeof(struct darshan_header));
+            init_core->log_job_p = malloc(sizeof(struct darshan_job));
+            init_core->log_exemnt_p = malloc(DARSHAN_EXE_LEN+1);
+            init_core->log_rec_p = malloc(DARSHAN_RECORD_BUF_SIZE);
+            init_core->log_mod_p = malloc(DARSHAN_MOD_MEM_MAX);
+
+            if(!(init_core->log_hdr_p) || !(init_core->log_job_p) ||
+               !(init_core->log_exemnt_p) || !(init_core->log_rec_p) ||
+               !(init_core->log_mod_p))
+            {
+                free(init_core);
+                return;
+            }
+            /* if allocation succeeds, zero fill memory regions */
+            memset(init_core->log_hdr_p, 0, sizeof(struct darshan_header));
+            memset(init_core->log_job_p, 0, sizeof(struct darshan_job));
+            memset(init_core->log_exemnt_p, 0, DARSHAN_EXE_LEN+1);
+            memset(init_core->log_rec_p, 0, DARSHAN_RECORD_BUF_SIZE);
+            memset(init_core->log_mod_p, 0, DARSHAN_MOD_MEM_MAX);
+#else
+            /* if mmap logs are enabled, we need to initialize the mmap region
+             * before setting the corresponding log file region pointers
+             */
+
</span>             sys_page_size = sysconf(_SC_PAGESIZE);
             assert(sys_page_size > 0);
 
<span style="color: #aaaaaa">@@ -209,7 +237,6 @@ 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: #ffdddd">-            char *mmap_log_dir;
</span>             envstr = getenv(DARSHAN_MMAP_LOG_PATH_OVERRIDE);
             if(envstr)
                 mmap_log_dir = envstr;
<span style="color: #aaaaaa">@@ -276,12 +303,15 @@ void darshan_core_initialize(int argc, char **argv)
</span>             init_core->log_mod_p = (void *)
                 ((char *)init_core->log_rec_p + DARSHAN_RECORD_BUF_SIZE);
 
<span style="color: #000000;background-color: #ffdddd">-            /* set known header fields for the log file */
-            strcpy(init_core->log_hdr_p->version_string, DARSHAN_LOG_VERSION);
-            init_core->log_hdr_p->magic_nr = DARSHAN_MAGIC_NR;
</span><span style="color: #000000;background-color: #ddffdd">+            /* set header fields needed for the mmap log mechanism */
</span>             init_core->log_hdr_p->comp_type = DARSHAN_NO_COMP;
             init_core->log_hdr_p->rec_map.off =
                 sizeof(struct darshan_header) + DARSHAN_JOB_RECORD_SIZE;
<span style="color: #000000;background-color: #ddffdd">+#endif
+
+            /* set known header fields for the log file */
+            strcpy(init_core->log_hdr_p->version_string, DARSHAN_LOG_VERSION);
+            init_core->log_hdr_p->magic_nr = DARSHAN_MAGIC_NR;
</span> 
             /* set known job-level metadata fields for the log file */
             init_core->log_job_p->uid = getuid();
<span style="color: #aaaaaa">@@ -296,9 +326,6 @@ 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: #ffdddd">-#else
-    #error "Error: non-mmap code path not ready."
-#endif
</span> 
             /* bootstrap any modules with static initialization routines */
             i = 0;
<span style="color: #aaaaaa">@@ -378,6 +405,10 @@ void darshan_core_shutdown()
</span>     darshan_core = NULL;
     DARSHAN_CORE_UNLOCK();
 
<span style="color: #000000;background-color: #ddffdd">+    memcpy(&out_job, final_core->log_job_p, sizeof(struct darshan_job));
+
+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
+    /* TODO: can we get rid of out_ header and job?? */
</span>     /* XXX just copy mmap files somewhere else to avoid corruption */
     DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
     char cp_cmd[500] = {0};
<span style="color: #aaaaaa">@@ -385,8 +416,6 @@ void darshan_core_shutdown()
</span>     system(cp_cmd);
     DARSHAN_MPI_CALL(PMPI_Barrier)(MPI_COMM_WORLD);
 
<span style="color: #000000;background-color: #ffdddd">-    memcpy(&out_job, final_core->log_job_p, sizeof(struct darshan_job));
-
</span>     /* indicate in the metadata field of the temporary darshan log file that
      * the darshan shutdown process was invoked on the data in the log. since
      * we have no way of knowing how far the shutdown process got, the data
<span style="color: #aaaaaa">@@ -395,7 +424,9 @@ void darshan_core_shutdown()
</span>      */
     char *m = final_core->log_job_p->metadata + strlen(final_core->log_job_p->metadata);
     int meta_remain = DARSHAN_JOB_METADATA_LEN - strlen(final_core->log_job_p->metadata) - 1;
<span style="color: #000000;background-color: #ddffdd">+    /* TODO: do we ever check for darshan_shutdown? */
</span>     snprintf(m, meta_remain, "darshan_shutdown=yes\n");
<span style="color: #000000;background-color: #ddffdd">+#endif
</span> 
     /* we also need to set which modules were registered on this process and
      * call into those modules and give them a chance to perform any necessary
<span style="color: #aaaaaa">@@ -531,17 +562,6 @@ void darshan_core_shutdown()
</span>     if(internal_timing_flag)
         job2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
 
<span style="color: #000000;background-color: #ffdddd">-    /* error out if unable to write job information */
-    DARSHAN_MPI_CALL(PMPI_Bcast)(&all_ret, 1, MPI_INT, 0, MPI_COMM_WORLD);
-    if(all_ret != 0)
-    {
-        free(logfile_name);
-        darshan_core_cleanup(final_core);
-        return;
-    }
-    if(internal_timing_flag)
-        job2 = DARSHAN_MPI_CALL(PMPI_Wtime)();
-
</span>     if(internal_timing_flag)
         rec1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
     /* write the record name->id hash to the log file */
<span style="color: #aaaaaa">@@ -706,13 +726,14 @@ void darshan_core_shutdown()
</span>      */
     if(my_rank == 0)
     {
<span style="color: #000000;background-color: #ffdddd">-        if(getenv("DARSHAN_LOGFILE"))
-        {
</span><span style="color: #000000;background-color: #ddffdd">+        mode_t chmod_mode = S_IRUSR;
</span> #ifdef __DARSHAN_GROUP_READABLE_LOGS
<span style="color: #000000;background-color: #ffdddd">-            chmod(logfile_name, (S_IRUSR|S_IRGRP));
-#else
-            chmod(logfile_name, (S_IRUSR));
</span><span style="color: #000000;background-color: #ddffdd">+        chmod_mode |= S_IRGRP;
</span> #endif
<span style="color: #000000;background-color: #ddffdd">+
+        if(getenv("DARSHAN_LOGFILE"))
+        {
+            chmod(logfile_name, chmod_mode);
</span>         }
         else
         {
<span style="color: #aaaaaa">@@ -730,20 +751,20 @@ void darshan_core_shutdown()
</span>                 sprintf(tmp_index, "_%d.darshan", (int)(end_log_time-start_log_time+1));
                 rename(logfile_name, new_logfile_name);
                 /* set permissions on log file */
<span style="color: #000000;background-color: #ffdddd">-#ifdef __DARSHAN_GROUP_READABLE_LOGS
-                chmod(new_logfile_name, (S_IRUSR|S_IRGRP));
-#else
-                chmod(new_logfile_name, (S_IRUSR));
-#endif
</span><span style="color: #000000;background-color: #ddffdd">+                chmod(new_logfile_name, chmod_mode);
</span>                 free(new_logfile_name);
             }
         }
     }
 
<span style="color: #000000;background-color: #ddffdd">+#ifdef __DARSHAN_ENABLE_MMAP_LOGS
</span>     /* remove the temporary mmap log files */
     unlink(final_core->mmap_log_name);
<span style="color: #000000;background-color: #ddffdd">+#endif
</span> 
     free(logfile_name);
<span style="color: #000000;background-color: #ddffdd">+    free(shared_recs);
+    free(mod_shared_recs);
</span>     darshan_core_cleanup(final_core);
 
     if(internal_timing_flag)
<span style="color: #aaaaaa">@@ -1019,21 +1040,21 @@ static void darshan_get_exe_and_mounts(struct darshan_core_runtime *core,
</span>     return;
 }
 
<span style="color: #000000;background-color: #ffdddd">-static void darshan_block_size_from_path(const char *path, int *block_size)
</span><span style="color: #000000;background-color: #ddffdd">+static int darshan_block_size_from_path(const char *path)
</span> {
     int i;
<span style="color: #000000;background-color: #ffdddd">-    *block_size = -1;
</span><span style="color: #000000;background-color: #ddffdd">+    int block_size = -1;
</span> 
     for(i=0; i<mnt_data_count; i++)
     {
         if(!(strncmp(mnt_data_array[i].path, path, strlen(mnt_data_array[i].path))))
         {
<span style="color: #000000;background-color: #ffdddd">-            *block_size = mnt_data_array[i].block_size;
-            return;
</span><span style="color: #000000;background-color: #ddffdd">+            block_size = mnt_data_array[i].block_size;
+            break;;
</span>         }
     }
 
<span style="color: #000000;background-color: #ffdddd">-    return;
</span><span style="color: #000000;background-color: #ddffdd">+    return block_size;
</span> }
 
 static void darshan_get_user_name(char *cuser)
<span style="color: #aaaaaa">@@ -1203,6 +1224,8 @@ static void darshan_add_record_hashref(struct darshan_core_runtime *core,
</span>     char *name, darshan_record_id id, struct darshan_core_record_ref **ref)
 {
     int record_size = sizeof(darshan_record_id) + strlen(name) + 1;
<span style="color: #000000;background-color: #ddffdd">+    darshan_record_id *id_p;
+    char *name_p;
</span> 
     if((record_size + core->log_hdr_p->rec_map.len) > DARSHAN_RECORD_BUF_SIZE)
         return;
<span style="color: #aaaaaa">@@ -1212,32 +1235,18 @@ static void darshan_add_record_hashref(struct darshan_core_runtime *core,
</span>     {
         memset(*ref, 0, sizeof(**ref));
 
<span style="color: #000000;background-color: #ffdddd">-#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;
-        }
</span><span style="color: #000000;background-color: #ddffdd">+        /* serialize the record id and name into the record map buffer */
+        id_p = (darshan_record_id *)
+            ((char *)core->log_rec_p + core->log_hdr_p->rec_map.len);
+        *id_p = id;
+        name_p = (char *)id_p + sizeof(darshan_record_id);
+        strcpy(name_p, name);
</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: #ddffdd">+        /* save pointer to this record mapping buffer */
+        (*ref)->rec_p = id_p;
</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));
</span><span style="color: #000000;background-color: #ddffdd">+        /* add the record to the hash table */
+        HASH_ADD_KEYPTR(hlink, core->rec_hash, id_p, sizeof(darshan_record_id), (*ref));
</span>         core->rec_hash_cnt++;
         core->log_hdr_p->rec_map.len += record_size;
     }
<span style="color: #aaaaaa">@@ -1275,7 +1284,8 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
</span>         i = 0;
         HASH_ITER(hlink, core->rec_hash, ref, tmp)
         {
<span style="color: #000000;background-color: #ffdddd">-            id_array[i++] = ref->id;           
</span><span style="color: #000000;background-color: #ddffdd">+            /* dereference the record pointer to get corresponding id */
+            id_array[i++] = *(darshan_record_id *)ref->rec_p;
</span>         }
     }
 
<span style="color: #aaaaaa">@@ -1318,6 +1328,9 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
</span>     }
     *shared_rec_cnt = j;
 
<span style="color: #000000;background-color: #ddffdd">+    free(id_array);
+    free(mod_flags);
+    free(global_mod_flags);
</span>     return;
 }
 
<span style="color: #aaaaaa">@@ -1521,7 +1534,7 @@ static int darshan_log_append_all(MPI_File log_fh, struct darshan_core_runtime *
</span> 
     DARSHAN_MPI_CALL(PMPI_Scan)(&send_off, &my_off, 1, MPI_OFFSET,
         MPI_SUM, MPI_COMM_WORLD);
<span style="color: #000000;background-color: #ffdddd">-    /* scan in inclusive; subtract local size back out */
</span><span style="color: #000000;background-color: #ddffdd">+    /* scan is inclusive; subtract local size back out */
</span>     my_off -= comp_buf_sz;
 
     if(ret == 0)
<span style="color: #aaaaaa">@@ -1587,6 +1600,14 @@ static void darshan_core_cleanup(struct darshan_core_runtime* core)
</span>         }
     }
 
<span style="color: #000000;background-color: #ddffdd">+#ifndef __DARSHAN_ENABLE_MMAP_LOGS
+    free(core->log_hdr_p);
+    free(core->log_job_p);
+    free(core->log_exemnt_p);
+    free(core->log_rec_p);
+    free(core->log_mod_p);
+#endif
+
</span>     if(core->comp_buf)
         free(core->comp_buf);
     free(core);
<span style="color: #aaaaaa">@@ -1596,12 +1617,13 @@ static void darshan_core_cleanup(struct darshan_core_runtime* core)
</span> 
 /* ********************************************************* */
 
<span style="color: #000000;background-color: #ddffdd">+/* TODO: do we alloc new space as we go or just do everything up front? */
</span> void darshan_core_register_module(
     darshan_module_id mod_id,
     struct darshan_module_funcs *funcs,
     int *inout_mod_size,
     void **mod_buf,
<span style="color: #000000;background-color: #ffdddd">-    int *my_rank,
</span><span style="color: #000000;background-color: #ddffdd">+    int *rank,
</span>     int *sys_mem_alignment)
 {
     struct darshan_core_module* mod;
<span style="color: #aaaaaa">@@ -1644,23 +1666,24 @@ void darshan_core_register_module(
</span>     mod->mod_funcs = *funcs;
     mod->mem_avail = *inout_mod_size;
     darshan_core->mod_array[mod_id] = mod;
<span style="color: #000000;background-color: #ddffdd">+    darshan_core->mod_mem_used += *inout_mod_size;
</span> 
<span style="color: #000000;background-color: #ffdddd">-    /* update darshan header and internal structures */
</span><span style="color: #000000;background-color: #ddffdd">+    /* update darshan header */
</span>     darshan_core->log_hdr_p->mod_ver[mod_id] = darshan_module_versions[mod_id];
     darshan_core->log_hdr_p->mod_map[mod_id].off =
         ((char *)*mod_buf - (char *)darshan_core->log_hdr_p);
<span style="color: #000000;background-color: #ffdddd">-    darshan_core->mod_mem_used += *inout_mod_size;
</span>     DARSHAN_CORE_UNLOCK();
 
     /* set the memory alignment and calling process's rank, if desired */
     if(sys_mem_alignment)
         *sys_mem_alignment = darshan_mem_alignment;
<span style="color: #000000;background-color: #ffdddd">-    if(my_rank)
-        DARSHAN_MPI_CALL(PMPI_Comm_rank)(MPI_COMM_WORLD, my_rank);
</span><span style="color: #000000;background-color: #ddffdd">+    if(rank)
+        *rank = my_rank;
</span> 
     return;
 }
 
<span style="color: #000000;background-color: #ddffdd">+/* TODO: */
</span> void darshan_core_unregister_module(
     darshan_module_id mod_id)
 {
<span style="color: #aaaaaa">@@ -1747,9 +1770,7 @@ int darshan_core_register_record(
</span>          * id->name mappings. just back out and indicate the record was 
          * not registered
          */
<span style="color: #000000;background-color: #ffdddd">-        if(mod_oom)
-            DARSHAN_MOD_FLAG_SET(darshan_core->log_hdr_p->partial_flag, mod_id);
-
</span><span style="color: #000000;background-color: #ddffdd">+        DARSHAN_MOD_FLAG_SET(darshan_core->log_hdr_p->partial_flag, mod_id);
</span>         DARSHAN_CORE_UNLOCK();
         return 0;
     }
<span style="color: #aaaaaa">@@ -1757,18 +1778,18 @@ int darshan_core_register_record(
</span>     if(!DARSHAN_MOD_FLAG_ISSET(ref->mod_flags, mod_id))
     {
         DARSHAN_MOD_FLAG_SET(ref->mod_flags, mod_id);
<span style="color: #000000;background-color: #ffdddd">-        darshan_core->log_hdr_p->mod_map[mod_id].len += rec_size;
</span>         darshan_core->mod_array[mod_id]->mem_avail -= rec_size;
<span style="color: #000000;background-color: #ddffdd">+        darshan_core->log_hdr_p->mod_map[mod_id].len += rec_size;
</span>     }
     DARSHAN_CORE_UNLOCK();
 
     if(file_alignment)
<span style="color: #000000;background-color: #ffdddd">-        darshan_block_size_from_path(name, file_alignment);
</span><span style="color: #000000;background-color: #ddffdd">+        *file_alignment = darshan_block_size_from_path(name);
</span> 
     return 1;
 }
 
<span style="color: #000000;background-color: #ffdddd">-/* TODO: test */
</span><span style="color: #000000;background-color: #ddffdd">+/* TODO: */
</span> void darshan_core_unregister_record(
     darshan_record_id rec_id,
     darshan_module_id mod_id)
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec#diff-3'>
<strong>
darshan-runtime/share/darshan-mmap-epilog.sh.in
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/share/darshan-mmap-epilog.sh.in
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/share/darshan-mmap-epilog.sh.in
</span><span style="color: #aaaaaa">@@ -45,7 +45,9 @@ MMAP_LOG_PRE=$(basename $DARSHAN_TEST_LOG | cut -d'_' -f 1-3)
</span> 
 # construct full output log directory name
 OUTLOG_DIR=${DARSHAN_LOG_DIR}/${OUTLOG_YEAR}/${OUTLOG_MON}/${OUTLOG_DAY}/
<span style="color: #000000;background-color: #ffdddd">-OUTLOG_DIR=$OUTLOG_DIR/${MMAP_LOG_PRE}_${OUTLOG_MON}-${OUTLOG_DAY}-${OUTLOG_SECS}
</span><span style="color: #000000;background-color: #ddffdd">+OUTLOG_DIR=${OUTLOG_DIR}/${MMAP_LOG_PRE}_${OUTLOG_MON}-${OUTLOG_DAY}-${OUTLOG_SECS}
+
+# TODO: do shared reduction and skip mkdir if just one compute node?
</span> 
 # create the output directory for this job
 mkdir -p $OUTLOG_DIR
</code></pre>

<br>
</li>

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

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec">View it on GitLab</a>.
<br>
You're receiving this email because of your account on xgitlab.cels.anl.gov.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://xgitlab.cels.anl.gov/darshan/darshan/commit/c276e4c255f8bb1435914f3474d0968d65a334ec"}}</script>
</p>
</div>
</body>
</html>