[Darshan-commits] [Git][darshan/darshan][master] 2 commits: modify bg/q module record to belong to rank -1

Shane Snyder xgitlab at cels.anl.gov
Wed Sep 21 18:08:39 CDT 2016


Shane Snyder pushed to branch master at darshan / darshan


Commits:
6a6f306a by Shane Snyder at 2016-09-21T17:26:13-05:00
modify bg/q module record to belong to rank -1

- - - - -
8438ee10 by Shane Snyder at 2016-09-21T18:01:40-05:00
add first try at BG/Q logutil aggregation function

We don't currently have a system to try this out on, but just
wanted to make sure something was there as a failsafe. The current
implementation should be able to correctly aggregate all counters
in BGQ records, except for BGQ_INODES.

- - - - -


2 changed files:

- darshan-runtime/lib/darshan-bgq.c
- darshan-util/darshan-bgq-logutils.c


Changes:

=====================================
darshan-runtime/lib/darshan-bgq.c
=====================================
--- a/darshan-runtime/lib/darshan-bgq.c
+++ b/darshan-runtime/lib/darshan-bgq.c
@@ -194,9 +194,13 @@ static void bgq_shutdown(
 
     if (my_rank == 0)
     {
+        bgq_runtime->record->base_rec.rank = -1;
+
         DARSHAN_MPI_CALL(PMPI_Comm_size)(mod_comm, &nprocs);
         ion_ids = malloc(sizeof(*ion_ids)*nprocs);
-        result = (ion_ids != NULL); 
+        result = (ion_ids != NULL);
+        if(!result)
+            bgq_runtime->record->counters[BGQ_INODES] = -1;
     }
     DARSHAN_MPI_CALL(PMPI_Bcast)(&result, 1, MPI_INT, 0, mod_comm);
 


=====================================
darshan-util/darshan-bgq-logutils.c
=====================================
--- a/darshan-util/darshan-bgq-logutils.c
+++ b/darshan-util/darshan-bgq-logutils.c
@@ -267,7 +267,43 @@ static void darshan_log_print_bgq_rec_diff(void *file_rec1, char *file_name1,
 
 static void darshan_log_agg_bgq_recs(void *rec, void *agg_rec, int init_flag)
 {
-    /* TODO: how would aggregation work for the BG/Q module ? */
+    struct darshan_bgq_record *bgq_rec = (struct darshan_bgq_record *)rec;
+    struct darshan_bgq_record *agg_bgq_rec = (struct darshan_bgq_record *)agg_rec;
+    int i;
+
+    if(init_flag)
+    {
+        /* when initializing, just copy over the first record */
+        memcpy(agg_bgq_rec, bgq_rec, sizeof(struct darshan_bgq_record));
+
+        /* TODO: each record stores the ID of the corresponding rank's BG/Q
+         * inode. Currently, this log aggregation interface assumes we can
+         * aggregate logs one at a time, without having to know the value of
+         * a counter on all processes. What we need here is a way to determine
+         * the inode IDs used for every process, filter out duplicates, then
+         * count the total number to set this counter. Will have to think
+         * more about how we can calculate this value using this interface
+         */
+        agg_bgq_rec->counters[BGQ_INODES] = -1;
+    }
+    else
+    {
+        /* for remaining records, just sanity check the records are identical */
+        for(i = 0; i < BGQ_NUM_INDICES; i++)
+        {
+            /* TODO: ignore BGQ_INODES counter since it might be different in
+             * each record (more details in note above)
+             */
+            if(i == BGQ_INODES)
+                continue;
+            assert(bgq_rec->counters[i] == agg_bgq_rec->counters[i]);
+        }
+
+        /* NOTE: ignore BGQ_F_TIMESTAMP counter -- just use the value from the
+         * record that we initialized with
+         */
+    }
+
     return;
 }
 



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/5bf35a7ab8c91037acb29f1b22e1adcdfd2ba03f...8438ee10a1bcdcd87b0078d64cd41634c6a72bfa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160921/8f4c5496/attachment-0001.html>


More information about the Darshan-commits mailing list