[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-96-g3fae940

Service Account git at mcs.anl.gov
Mon Apr 6 16:34:56 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".

The branch, dev-modular has been updated
       via  3fae94044d78b6954d1a4e574eb6ff02d533fd1a (commit)
      from  db7b2f7b684d83d3f24cbca82f2dbeff9feb9b9d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3fae94044d78b6954d1a4e574eb6ff02d533fd1a
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date:   Mon Apr 6 16:31:53 2015 -0500

    darshan-base-parser added

-----------------------------------------------------------------------

Summary of changes:
 darshan-util/Makefile.in                           |    9 ++-
 ...arshan-mpiio-parser.c => darshan-base-parser.c} |   74 +++++--------------
 2 files changed, 26 insertions(+), 57 deletions(-)
 copy darshan-util/{darshan-mpiio-parser.c => darshan-base-parser.c} (67%)


Diff of changes:
diff --git a/darshan-util/Makefile.in b/darshan-util/Makefile.in
index 1f87ea9..d3c9f6a 100644
--- a/darshan-util/Makefile.in
+++ b/darshan-util/Makefile.in
@@ -1,4 +1,4 @@
-all: libdarshan-util.a darshan-posix-parser  darshan-mpiio-parser
+all: libdarshan-util.a darshan-base-parser darshan-posix-parser darshan-mpiio-parser
 
 DESTDIR =
 srcdir = @srcdir@
@@ -65,13 +65,15 @@ libdarshan-util.a: darshan-logutils.o darshan-posix-logutils.o darshan-mpiio-log
 jenkins: util/bin/jenkins.o lookup3.o
 	$(CC) $(CFLAGS)  $(LDFLAGS) $< -o $@ lookup3.o $(LIBS)
 
+darshan-base-parser: darshan-base-parser.c darshan-logutils.h $(DARSHAN_LOG_FORMAT) libdarshan-util.a | uthash-1.9.2
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) 
+
 darshan-posix-parser: darshan-posix-parser.c darshan-logutils.h darshan-posix-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-posix-log-format.h libdarshan-util.a | uthash-1.9.2
 	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) 
 
 darshan-mpiio-parser: darshan-mpiio-parser.c darshan-logutils.h darshan-mpiio-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-mpiio-log-format.h libdarshan-util.a | uthash-1.9.2
 	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) 
 
-
 #darshan-parser: darshan-parser.c $(DARSHAN_LOG_FORMAT) darshan-logutils.h darshan-logutils.o | uthash-1.9.2
 #	$(CC) $(CFLAGS) $(LDFLAGS) $< darshan-logutils.o -o $@ $(LIBS) 
 
@@ -104,6 +106,7 @@ install:: all
 	install -d $(includedir)
 	install -d $(pkgconfigdir)
 #	install -m 755 darshan-parser $(bindir)
+	install -m 755 darshan-base-parser $(bindir)
 	install -m 755 darshan-posix-parser $(bindir)
 	install -m 755 darshan-mpiio-parser $(bindir)
 #	install -m 755 darshan-convert $(bindir)
@@ -128,7 +131,7 @@ endif
 
 
 clean::
-	rm -f *.o *.a darshan-posix-parser darshan-mpiio-parser
+	rm -f *.o *.a darshan-base-parser darshan-posix-parser darshan-mpiio-parser
 
 distclean:: clean
 	rm -f darshan-runtime-config.h aclocal.m4 autom4te.cache/* config.status config.log Makefile util/bin/darshan-job-summary.pl
diff --git a/darshan-util/darshan-mpiio-parser.c b/darshan-util/darshan-base-parser.c
similarity index 67%
copy from darshan-util/darshan-mpiio-parser.c
copy to darshan-util/darshan-base-parser.c
index 683194f..0f86f49 100644
--- a/darshan-util/darshan-mpiio-parser.c
+++ b/darshan-util/darshan-base-parser.c
@@ -17,7 +17,7 @@
 #include <assert.h>
 
 #include "darshan-logutils.h"
-#include "darshan-mpiio-logutils.h"
+#include "darshan-posix-logutils.h"
 #include "uthash-1.9.2/src/uthash.h"
 
 int main(int argc, char **argv)
@@ -30,7 +30,7 @@ int main(int argc, char **argv)
     struct darshan_header header;
     struct darshan_job job;
     struct darshan_record_ref *rec_hash = NULL;
-    struct darshan_record_ref *ref;
+    struct darshan_record_ref *ref, *tmp;
     int mount_count;
     char** mnt_pts;
     char** fs_types;
@@ -38,7 +38,6 @@ int main(int argc, char **argv)
     char *token;
     char *save;
     char buffer[DARSHAN_JOB_METADATA_LEN];
-    struct darshan_mpiio_file next_file;
 
     assert(argc == 2);
     filename = argv[1];
@@ -53,11 +52,6 @@ int main(int argc, char **argv)
         return(-1);
     }
 
-    /**************************************************************/
-    /* TODO: some of this code should be shared or in a separate executable
-     * instead of repeated in each module parser
-     */
-
     /* read darshan log header */
     ret = darshan_log_getheader(fd, &header);
     if(ret < 0)
@@ -87,7 +81,7 @@ int main(int argc, char **argv)
 
     /* print job summary */
     printf("# darshan log version: %s\n", header.version_string);
-    printf("# size of MPIIO file statistics: %zu bytes\n", sizeof(struct darshan_mpiio_file));
+    printf("# size of POSIX file statistics: %zu bytes\n", sizeof(struct darshan_posix_file));
     printf("# size of job statistics: %zu bytes\n", sizeof(struct darshan_job));
     printf("# exe: %s\n", tmp_string);
     printf("# uid: %" PRId64 "\n", job.uid);
@@ -122,6 +116,18 @@ int main(int argc, char **argv)
         printf("# metadata: %s = %s\n", key, value);
     }
 
+    /* print out each module found in the log */
+    printf("\n# instrumenation modules registered with darshan\n");
+    printf("# -------------------------------------------------------\n");
+    for(i=0;i < DARSHAN_MAX_MODS; i++)
+    {
+        if(header.mod_map[i].len > 0)
+        {
+            printf("# %s:\tsize=%"PRIu64"\n", darshan_module_names[i], header.mod_map[i].len);
+        }
+        
+    }
+
     /* get the mount information for this log */
     ret = darshan_log_getmounts(fd, &mnt_pts, &fs_types, &mount_count);
     if(ret < 0)
@@ -148,53 +154,13 @@ int main(int argc, char **argv)
         return(-1);
     }
 
-    /* end TODO */
-    /*******************************************/
-
-    printf("\n*** FILE RECORD DATA ***\n");
- 
-    ret = darshan_log_get_mpiio_file(fd, &next_file);
-    if(ret < 0)
-    {
-        fprintf(stderr, "darshan_log_get_mpiio_file() failed to read next record.\n");
-        darshan_log_close(fd);
-        return(-1);
-    }
-    if(ret == 0)
+    /* print info for each record stored in the log */
+    printf("\n# records registered with Darshan\n");
+    printf("# -------------------------------------------------------\n");
+    HASH_ITER(hlink, rec_hash, ref, tmp)
     {
-        printf("# no files opened.\n");
-        darshan_log_close(fd);
-        return(0);
+        printf("# ID: %"PRIu64"\tName: %s\n", ref->rec.id, ref->rec.name);
     }
-   
-    /* loop over each stored MPIIO file record and print counters */
-    i = 1;
-    do
-    {
-        /* get the pathname for this record */
-        HASH_FIND(hlink, rec_hash, &next_file.f_id, sizeof(darshan_record_id), ref);
-        assert(ref);
-
-        printf("\tRecord %d: id=%"PRIu64" (path=%s, rank=%"PRId64")\n",
-            i, next_file.f_id, ref->rec.name, next_file.rank);
-        /* TODO: does it make sense to put these in a header or something?
-         * Down side of listing them here is ordering dependency between enum
-         * in header and names here.
-         */
-        printf(
-            "\t\tMPIIO_INDEP_OPENS:\t%"PRIu64"\n"
-            "\t\tMPIIO_COLL_OPENS:\t%"PRIu64"\n"
-            "\t\tMPIIO_HINTS:\t%"PRIu64"\n"
-            "\t\tMPIIO_F_META_TIME:\t%lf\n"
-            "\t\tMPIIO_F_OPEN_TIMESTAMP:\t%lf\n",
-            next_file.counters[DARSHAN_MPIIO_INDEP_OPENS],
-            next_file.counters[DARSHAN_MPIIO_COLL_OPENS],
-            next_file.counters[DARSHAN_MPIIO_HINTS],
-            next_file.fcounters[DARSHAN_MPIIO_F_META_TIME],
-            next_file.fcounters[DARSHAN_MPIIO_F_OPEN_TIMESTAMP]);
-
-        i++;
-    } while((ret = darshan_log_get_mpiio_file(fd, &next_file)) == 1);
 
     /* free mount info */
     for(i=0; i<mount_count; i++)


hooks/post-receive
--



More information about the Darshan-commits mailing list