<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 dev-modular
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/f0278cc11ae5ba716f2c464f1cbe525b60520e97">f0278cc1</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-28T13:06:42-06:00</i>
</div>
<pre class='commit-message'>bug fix to unregister modules when shutting down</pre>
</li>
</ul>
<h4>7 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/lib/darshan-bgq.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/lib/darshan-core.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/lib/darshan-hdf5.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-runtime/lib/darshan-mpiio.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
darshan-runtime/lib/darshan-null.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
darshan-runtime/lib/darshan-pnetcdf.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
darshan-runtime/lib/darshan-posix.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-0'>
<strong>
darshan-runtime/lib/darshan-bgq.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-bgq.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-bgq.c
</span><span style="color: #aaaaaa">@@ -276,6 +276,8 @@ static void bgq_get_output_data(
</span> /* Shutdown the BGQ module by freeing up all data structures. */
 static void bgq_shutdown()
 {
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_BGQ_MOD);
+
</span>     if (bgq_runtime)
     {
         free(bgq_runtime);
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-1'>
<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">@@ -1656,7 +1656,6 @@ void darshan_core_register_module(
</span>     return;
 }
 
<span style="color: #000000;background-color: #ffdddd">-/* TODO: test */
</span> void darshan_core_unregister_module(
     darshan_module_id mod_id)
 {
<span style="color: #aaaaaa">@@ -1667,15 +1666,17 @@ void darshan_core_unregister_module(
</span> 
     DARSHAN_CORE_LOCK();
 
<span style="color: #000000;background-color: #ffdddd">-    /* iterate all records and disassociate this module from them */
-    HASH_ITER(hlink, darshan_core->rec_hash, ref, tmp)
</span><span style="color: #000000;background-color: #ddffdd">+    if(darshan_core->mod_array[mod_id])
</span>     {
<span style="color: #000000;background-color: #ffdddd">-        darshan_core_unregister_record(ref->rec.id, mod_id);
-    }
-
-    free(darshan_core->mod_array[mod_id]);
-    darshan_core->mod_array[mod_id] = NULL;
</span><span style="color: #000000;background-color: #ddffdd">+        /* iterate all records and disassociate this module from them */
+        HASH_ITER(hlink, darshan_core->rec_hash, ref, tmp)
+        {
+            darshan_core_unregister_record(ref->rec.id, mod_id);
+        }
</span> 
<span style="color: #000000;background-color: #ddffdd">+        free(darshan_core->mod_array[mod_id]);
+        darshan_core->mod_array[mod_id] = NULL;
+    }
</span>     DARSHAN_CORE_UNLOCK();
 
     return;
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-2'>
<strong>
darshan-runtime/lib/darshan-hdf5.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-hdf5.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-hdf5.c
</span><span style="color: #aaaaaa">@@ -564,6 +564,8 @@ static void hdf5_shutdown()
</span> 
     assert(hdf5_runtime);
 
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_HDF5_MOD);
+
</span>     HASH_ITER(hlink, hdf5_runtime->hid_hash, ref, tmp)
     {
         HASH_DELETE(hlink, hdf5_runtime->hid_hash, ref);
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-3'>
<strong>
darshan-runtime/lib/darshan-mpiio.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-mpiio.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-mpiio.c
</span><span style="color: #aaaaaa">@@ -1514,6 +1514,8 @@ static void mpiio_shutdown()
</span> 
     assert(mpiio_runtime);
 
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_MPIIO_MOD);
+
</span>     HASH_ITER(hlink, mpiio_runtime->fh_hash, ref, tmp)
     {
         HASH_DELETE(hlink, mpiio_runtime->fh_hash, ref);
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-4'>
<strong>
darshan-runtime/lib/darshan-null.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-null.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-null.c
</span><span style="color: #aaaaaa">@@ -374,6 +374,8 @@ static void null_shutdown()
</span> {
     assert(null_runtime);
 
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_NULL_MOD);
+
</span>     HASH_CLEAR(hlink, null_runtime->record_hash); /* these hash entries are freed all at once below */
 
     free(null_runtime->runtime_record_array);
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#diff-5'>
<strong>
darshan-runtime/lib/darshan-pnetcdf.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-pnetcdf.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-pnetcdf.c
</span><span style="color: #aaaaaa">@@ -576,6 +576,8 @@ static void pnetcdf_shutdown()
</span> 
     assert(pnetcdf_runtime);
 
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_PNETCDF_MOD);
+
</span>     HASH_ITER(hlink, pnetcdf_runtime->ncid_hash, ref, tmp)
     {
         HASH_DELETE(hlink, pnetcdf_runtime->ncid_hash, ref);
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97#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">@@ -2249,6 +2249,8 @@ static void posix_shutdown()
</span> 
     assert(posix_runtime);
 
<span style="color: #000000;background-color: #ddffdd">+    darshan_core_unregister_module(DARSHAN_POSIX_MOD);
+
</span>     HASH_ITER(hlink, posix_runtime->fd_hash, ref, tmp)
     {
         HASH_DELETE(hlink, posix_runtime->fd_hash, ref);
</code></pre>

<br>
</li>

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

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/f0278cc11ae5ba716f2c464f1cbe525b60520e97">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/f0278cc11ae5ba716f2c464f1cbe525b60520e97"}}</script>
</p>
</div>
</body>
</html>