[Darshan-commits] [Git][darshan/darshan][dev-modular] add a partial flag to darshan's header

Shane Snyder gitlab at xgitlab.cels.anl.gov
Fri Sep 25 15:35:39 CDT 2015


Shane Snyder pushed to branch dev-modular at darshan / darshan


Commits:
0459f8ff by Shane Snyder at 2015-09-25T15:34:13Z
add a partial flag to darshan's header

this indicates whether the log file is complete or only partially
written

- - - - -


2 changed files:

- darshan-log-format.h
- darshan-runtime/lib/darshan-core.c


Changes:

=====================================
darshan-log-format.h
=====================================
--- a/darshan-log-format.h
+++ b/darshan-log-format.h
@@ -99,6 +99,7 @@ struct darshan_header
     char version_string[8];
     int64_t magic_nr;
     unsigned char comp_type;
+    unsigned char partial_flag;
     struct darshan_log_map rec_map;
     struct darshan_log_map mod_map[DARSHAN_MAX_MODS];
 };


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
--- a/darshan-runtime/lib/darshan-core.c
+++ b/darshan-runtime/lib/darshan-core.c
@@ -1566,9 +1566,14 @@ void darshan_core_register_record(
     {
         /* record not found -- add it to the hash if we aren't already tracking the
          * maximum number of records
-         */               
+         */
+  
         if(darshan_core->rec_count >= DARSHAN_CORE_MAX_RECORDS)
         {
+            /* if we are already tracking the max records, set a flag to indicate
+             * that this log file has partial results
+             */
+            darshan_core->log_header.partial_flag = 1;
             DARSHAN_CORE_UNLOCK();
             return;
         }



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/0459f8ffc08951d813fc320a581bdd5fe4b4da31
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20150925/fac87fa9/attachment-0001.html>


More information about the Darshan-commits mailing list