<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 lustre-mod
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/b920e005a1a6ff0a1556f2cecf838edea6cfc3c4">b920e005</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-02-25T08:28:23-08:00</i>
</div>
<pre class='commit-message'>makefile bug fix</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/7ba0dfe37c4e01b6dabc04d7d97d0daf63ef5d58">7ba0dfe3</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-02-25T08:53:36-08:00</i>
</div>
<pre class='commit-message'>add dummy counter to test lustre module</pre>
</li>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/fdf5af2d40c80c649998aa0fe2c77f118fd4f751">fdf5af2d</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-02-25T10:16:37-08:00</i>
</div>
<pre class='commit-message'>integrate lustre module into logutils library</pre>
</li>
</ul>
<h4>9 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-log-format.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-lustre-log-format.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/Makefile.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-runtime/lib/darshan-lustre.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
darshan-util/Makefile.in
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
darshan-util/darshan-logutils.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
<span class='new-file'>
+
darshan-util/darshan-lustre-logutils.c
</span>
</a>
</li>
<li class='file-stats'>
<a href='#diff-7'>
<span class='new-file'>
+
darshan-util/darshan-lustre-logutils.h
</span>
</a>
</li>
<li class='file-stats'>
<a href='#diff-8'>
<span class='new-file'>
+
darshan-util/darshan-lustre-logutils.o
</span>
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-0'>
<strong>
darshan-log-format.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-log-format.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-log-format.h
</span><span style="color: #aaaaaa">@@ -122,7 +122,7 @@ struct darshan_record
</span>     X(DARSHAN_HDF5_MOD,     "HDF5",     DARSHAN_HDF5_VER,       &hdf5_logutils) \
     X(DARSHAN_PNETCDF_MOD,  "PNETCDF",  DARSHAN_PNETCDF_VER,    &pnetcdf_logutils) \
     X(DARSHAN_BGQ_MOD,      "BG/Q",     DARSHAN_BGQ_VER,        &bgq_logutils) \
<span style="color: #000000;background-color: #ffdddd">-    X(DARSHAN_LUSTRE_MOD,   "LUSTRE",   DARSHAN_LUSTRE_VER,     NULL)
</span><span style="color: #000000;background-color: #ddffdd">+    X(DARSHAN_LUSTRE_MOD,   "LUSTRE",   DARSHAN_LUSTRE_VER,     &lustre_logutils)
</span> 
 /* unique identifiers to distinguish between available darshan modules */
 /* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-1'>
<strong>
darshan-lustre-log-format.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-lustre-log-format.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-lustre-log-format.h
</span><span style="color: #aaaaaa">@@ -12,6 +12,8 @@
</span> 
 /* TODO: add integer counters here (e.g., counter for stripe width, stripe size, etc etc) */
 #define LUSTRE_COUNTERS \
<span style="color: #000000;background-color: #ddffdd">+    /* dummy counter */\
+    X(LUSTRE_TEST_COUNTER) \
</span>     /* end of counters */\
     X(LUSTRE_NUM_INDICES)
 
<span style="color: #aaaaaa">@@ -37,4 +39,3 @@ struct darshan_lustre_record
</span> };
 
 #endif /* __DARSHAN_LUSTRE_LOG_FORMAT_H */
<span style="color: #000000;background-color: #ffdddd">-
</span></code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-2'>
<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">@@ -113,7 +113,7 @@ lib/darshan-pnetcdf-stubs.o: lib/darshan-pnetcdf-stubs.c darshan.h $(DARSHAN_LOG
</span> lib/darshan-lustre.o: lib/darshan-lustre.c darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | lib
        $(CC) $(CFLAGS) -c $< -o $@
 
<span style="color: #000000;background-color: #ffdddd">-lib/darshan-lustre.po: lib/darshan-hdf5.c darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | lib
</span><span style="color: #000000;background-color: #ddffdd">+lib/darshan-lustre.po: lib/darshan-lustre.c darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | lib
</span>   $(CC) $(CFLAGS_SHARED) -c $< -o $@
 
 lib/lookup3.o: lib/lookup3.c
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-3'>
<strong>
darshan-runtime/lib/darshan-lustre.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-lustre.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-lustre.c
</span><span style="color: #aaaaaa">@@ -105,6 +105,7 @@ void darshan_instrument_lustre_file(char *filepath)
</span> 
         /* TODO: gather lustre data, store in record hash */
         /* counters in lustre_ref->record->counters */
<span style="color: #000000;background-color: #ddffdd">+        lustre_ref->record->counters[LUSTRE_TEST_COUNTER] = 88;
</span> 
         HASH_ADD(hlink, lustre_runtime->record_hash, record->rec_id,
             sizeof(darshan_record_id), lustre_ref);
<span style="color: #aaaaaa">@@ -199,6 +200,9 @@ static void lustre_get_output_data(
</span>      * given file should be the same on each process
      */
 
<span style="color: #000000;background-color: #ddffdd">+    *lustre_buf = (void *)(lustre_runtime->record_array);
+    *lustre_buf_sz = lustre_runtime->record_array_ndx * sizeof(struct darshan_lustre_record);
+
</span>     return;
 }
 
<span style="color: #aaaaaa">@@ -207,7 +211,11 @@ static void lustre_shutdown(void)
</span>     assert(lustre_runtime);
 
     /* TODO: free data structures */
<span style="color: #000000;background-color: #ddffdd">+    HASH_CLEAR(hlink, lustre_runtime->record_hash);
</span> 
<span style="color: #000000;background-color: #ddffdd">+    free(lustre_runtime->ref_array);
+    free(lustre_runtime->record_array);
+    free(lustre_runtime);
</span>     lustre_runtime = NULL;
 
     return;
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-4'>
<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">@@ -13,10 +13,10 @@ libdir = $(DESTDIR)@libdir@
</span> pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
 
 DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
<span style="color: #000000;background-color: #ffdddd">-DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h
-DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h
-DARSHAN_STATIC_MOD_OBJS = darshan-posix-logutils.o darshan-mpiio-logutils.o darshan-hdf5-logutils.o darshan-pnetcdf-logutils.o darshan-bgq-logutils.o
-DARSHAN_DYNAMIC_MOD_OBJS = darshan-posix-logutils.po darshan-mpiio-logutils.po darshan-hdf5-logutils.po darshan-pnetcdf-logutils.po darshan-bgq-logutils.po
</span><span style="color: #000000;background-color: #ddffdd">+DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h $(srcdir)/../darshan-lustre-log-format.h
+DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h darshan-lustre-logutils.h
+DARSHAN_STATIC_MOD_OBJS = darshan-posix-logutils.o darshan-mpiio-logutils.o darshan-hdf5-logutils.o darshan-pnetcdf-logutils.o darshan-bgq-logutils.o darshan-lustre-logutils.o
+DARSHAN_DYNAMIC_MOD_OBJS = darshan-posix-logutils.po darshan-mpiio-logutils.po darshan-hdf5-logutils.po darshan-pnetcdf-logutils.po darshan-bgq-logutils.po darshan-lustre-logutils.po
</span> 
 DARSHAN_ENABLE_SHARED=@DARSHAN_ENABLE_SHARED@
 
<span style="color: #aaaaaa">@@ -81,6 +81,11 @@ darshan-bgq-logutils.o: darshan-bgq-logutils.c darshan-logutils.h darshan-bgq-lo
</span> darshan-bgq-logutils.po: darshan-bgq-logutils.c darshan-logutils.h darshan-bgq-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-bgq-log-format.h | uthash-1.9.2
        $(CC) $(CFLAGS_SHARED) -c  $< -o $@
 
<span style="color: #000000;background-color: #ddffdd">+darshan-lustre-logutils.o: darshan-lustre-logutils.c darshan-logutils.h darshan-lustre-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | uthash-1.9.2
+       $(CC) $(CFLAGS) -c  $< -o $@
+darshan-lustre-logutils.po: darshan-lustre-logutils.c darshan-logutils.h darshan-lustre-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | uthash-1.9.2
+       $(CC) $(CFLAGS_SHARED) -c  $< -o $@
+
</span> libdarshan-util.a: darshan-logutils.o $(DARSHAN_STATIC_MOD_OBJS)
        ar rcs libdarshan-util.a $^
 
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-5'>
<strong>
darshan-util/darshan-logutils.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-logutils.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-logutils.h
</span><span style="color: #aaaaaa">@@ -107,6 +107,7 @@ extern struct darshan_mod_logutil_funcs *mod_logutils[];
</span> #include "darshan-hdf5-logutils.h"
 #include "darshan-pnetcdf-logutils.h"
 #include "darshan-bgq-logutils.h"
<span style="color: #000000;background-color: #ddffdd">+#include "darshan-lustre-logutils.h"
</span> 
 darshan_fd darshan_log_open(const char *name);
 darshan_fd darshan_log_create(const char *name, enum darshan_comp_type comp_type,
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-6'>
<strong>
darshan-util/darshan-lustre-logutils.c
</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-util/darshan-lustre-logutils.c
</span><span style="color: #aaaaaa">@@ -0,0 +1,165 @@
</span><span style="color: #000000;background-color: #ddffdd">+/*
+ * Copyright (C) 2015 University of Chicago.
+ * See COPYRIGHT notice in top-level directory.
+ *
+ */
+
+#define _GNU_SOURCE
+#include "darshan-util-config.h"
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "darshan-logutils.h"
+
+/* counter name strings for the LUSTRE module */
+#define X(a) #a,
+char *lustre_counter_names[] = {
+    LUSTRE_COUNTERS
+};
+#undef X
+
+static int darshan_log_get_lustre_record(darshan_fd fd, void* lustre_buf,
+    darshan_record_id* rec_id);
+static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf, int ver);
+static void darshan_log_print_lustre_record(void *file_rec,
+    char *file_name, char *mnt_pt, char *fs_type, int ver);
+static void darshan_log_print_lustre_description(void);
+static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
+    void *rec2, char *file_name2);
+
+struct darshan_mod_logutil_funcs lustre_logutils =
+{
+    .log_get_record = &darshan_log_get_lustre_record,
+    .log_put_record = &darshan_log_put_lustre_record,
+    .log_print_record = &darshan_log_print_lustre_record,
+    .log_print_description = &darshan_log_print_lustre_description,
+    .log_print_diff = &darshan_log_print_lustre_record_diff
+};
+
+static int darshan_log_get_lustre_record(darshan_fd fd, void* lustre_buf,
+    darshan_record_id* rec_id)
+{
+    struct darshan_lustre_record *rec;
+    int i;
+    int ret;
+
+    ret = darshan_log_getmod(fd, DARSHAN_LUSTRE_MOD, lustre_buf,
+        sizeof(struct darshan_lustre_record));
+    if(ret < 0)
+        return(-1);
+    else if(ret < sizeof(struct darshan_lustre_record))
+        return(0);
+    else
+    {
+        rec = (struct darshan_lustre_record *)lustre_buf;
+        if(fd->swap_flag)
+        {
+            /* swap bytes if necessary */
+            DARSHAN_BSWAP64(&rec->rec_id);
+            DARSHAN_BSWAP64(&rec->rank);
+            for(i=0; i<LUSTRE_NUM_INDICES; i++)
+                DARSHAN_BSWAP64(&rec->counters[i]);
+        }
+
+        *rec_id = rec->rec_id;
+        return(1);
+    }
+}
+
+static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf, int ver)
+{
+    struct darshan_lustre_record *rec = (struct darshan_lustre_record *)lustre_buf;
+    int ret;
+
+    ret = darshan_log_putmod(fd, DARSHAN_LUSTRE_MOD, rec,
+        sizeof(struct darshan_lustre_record), ver);
+    if(ret < 0)
+        return(-1);
+
+    return(0);
+}
+
+static void darshan_log_print_lustre_record(void *rec, char *file_name,
+    char *mnt_pt, char *fs_type, int ver)
+{
+    int i;
+    struct darshan_lustre_record *lustre_rec =
+        (struct darshan_lustre_record *)rec;
+
+    for(i=0; i<LUSTRE_NUM_INDICES; i++)
+    {
+        DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
+            lustre_rec->rank, lustre_rec->rec_id, lustre_counter_names[i],
+            lustre_rec->counters[i], file_name, mnt_pt, fs_type);
+    }
+
+    return;
+}
+
+static void darshan_log_print_lustre_description()
+{
+    /* TODO: add actual counter descriptions here */
+    printf("\n# description of LUSTRE counters:\n");
+    printf("#   LUSTRE_TEST_COUNTER: counter for testing Lustre module.\n");
+
+    DARSHAN_PRINT_HEADER();
+
+    return;
+}
+
+static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
+    void *rec2, char *file_name2)
+{
+    struct darshan_lustre_record *lustre_rec1 = (struct darshan_lustre_record *)rec1;
+    struct darshan_lustre_record *lustre_rec2 = (struct darshan_lustre_record *)rec2;
+    int i;
+
+    /* NOTE: we assume that both input records are the same module format version */
+
+    for(i=0; i<LUSTRE_NUM_INDICES; i++)
+    {
+        if(!lustre_rec2)
+        {
+            printf("- ");
+            DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
+                lustre_rec1->rank, lustre_rec1->rec_id, lustre_counter_names[i],
+                lustre_rec1->counters[i], file_name1, "", "");
+
+        }
+        else if(!lustre_rec1)
+        {
+            printf("+ ");
+            DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
+                lustre_rec2->rank, lustre_rec2->rec_id, lustre_counter_names[i],
+                lustre_rec2->counters[i], file_name2, "", "");
+        }
+        else if(lustre_rec1->counters[i] != lustre_rec2->counters[i])
+        {
+            printf("- ");
+            DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
+                lustre_rec1->rank, lustre_rec1->rec_id, lustre_counter_names[i],
+                lustre_rec1->counters[i], file_name1, "", "");
+            printf("+ ");
+            DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
+                lustre_rec2->rank, lustre_rec2->rec_id, lustre_counter_names[i],
+                lustre_rec2->counters[i], file_name2, "", "");
+        }
+    }
+
+    return;
+}
+
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
</span></code></pre>

<br>
</li>
<li id='diff-7'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-7'>
<strong>
darshan-util/darshan-lustre-logutils.h
</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-util/darshan-lustre-logutils.h
</span><span style="color: #aaaaaa">@@ -0,0 +1,14 @@
</span><span style="color: #000000;background-color: #ddffdd">+/*
+ * Copyright (C) 2015 University of Chicago.
+ * See COPYRIGHT notice in top-level directory.
+ *
+ */
+
+#ifndef __DARSHAN_LUSTRE_LOG_UTILS_H
+#define __DARSHAN_LUSTRE_LOG_UTILS_H
+
+extern char *lustre_counter_names[];
+
+extern struct darshan_mod_logutil_funcs lustre_logutils;
+
+#endif
</span></code></pre>

<br>
</li>
<li id='diff-8'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/compare/657c5b565dd8c7b847c956a39c61f8711ce21833...fdf5af2d40c80c649998aa0fe2c77f118fd4f751#diff-8'>
<strong>
darshan-util/darshan-lustre-logutils.o
</strong>
</a>
<hr>
<pre class="highlight"><code>Binary files /dev/null and b/darshan-util/darshan-lustre-logutils.o differ
</code></pre>

<br>
</li>

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

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

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