[Darshan-commits] [Git][darshan/darshan][mmap-dev] 4 commits: change runtime darshan record_ref struct

Shane Snyder xgitlab at cels.anl.gov
Tue Dec 8 16:22:44 CST 2015


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


Commits:
cb1c7ace by Shane Snyder at 2015-12-08T15:04:41Z
change runtime darshan record_ref struct

- - - - -
9d7f638b by Shane Snyder at 2015-12-08T15:16:19Z
change util record ref structure def

- - - - -
05acb6d4 by Shane Snyder at 2015-12-08T16:07:43Z
introduce base record concept in posix mod

- - - - -
ed103a2a by Shane Snyder at 2015-12-08T16:22:23Z
add base record concept to utilities

- - - - -


12 changed files:

- darshan-log-format.h
- darshan-posix-log-format.h
- darshan-runtime/darshan-core.h
- darshan-runtime/lib/darshan-core.c
- darshan-runtime/lib/darshan-posix.c
- darshan-util/darshan-analyzer.c
- darshan-util/darshan-convert.c
- darshan-util/darshan-logutils.c
- darshan-util/darshan-logutils.h
- darshan-util/darshan-parser.c
- darshan-util/darshan-posix-logutils.c
- darshan-util/darshan-stitch-logs.c


Changes:

=====================================
darshan-log-format.h
=====================================
--- a/darshan-log-format.h
+++ b/darshan-log-format.h
@@ -120,11 +120,10 @@ struct darshan_job
     char metadata[DARSHAN_JOB_METADATA_LEN];
 };
 
-/* minimal record stored for each file/object accessed by Darshan */
-struct darshan_record
+struct darshan_base_record
 {
-    char* name;
     darshan_record_id id;
+    int64_t rank;
 };
 
 #endif /* __DARSHAN_LOG_FORMAT_H */


=====================================
darshan-posix-log-format.h
=====================================
--- a/darshan-posix-log-format.h
+++ b/darshan-posix-log-format.h
@@ -170,8 +170,7 @@ enum darshan_posix_f_indices
  */
 struct darshan_posix_file
 {
-    darshan_record_id f_id;
-    int64_t rank;
+    struct darshan_base_record base_rec;
     int64_t counters[POSIX_NUM_INDICES];
     double fcounters[POSIX_F_NUM_INDICES];
 };


=====================================
darshan-runtime/darshan-core.h
=====================================
--- a/darshan-runtime/darshan-core.h
+++ b/darshan-runtime/darshan-core.h
@@ -66,7 +66,8 @@ struct darshan_core_module
 
 struct darshan_core_record_ref
 {
-    struct darshan_record rec;
+    char *name;
+    darshan_record_id id;
     uint64_t mod_flags;
     uint64_t global_mod_flags;
     UT_hash_handle hlink;


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
--- a/darshan-runtime/lib/darshan-core.c
+++ b/darshan-runtime/lib/darshan-core.c
@@ -616,16 +616,16 @@ static void darshan_add_record_hashref(struct darshan_core_runtime *core,
              * appropriate location in the record hash buffer
              */
             tmp_p = (char *)tmp_p + sizeof(darshan_record_id);
-            (*ref)->rec.name = (char *)tmp_p;
+            (*ref)->name = (char *)tmp_p;
         }
 
         /* set record ref fields */
-        (*ref)->rec.id = id;
-        if((*ref)->rec.name)
-            strcpy((*ref)->rec.name, name);
+        (*ref)->id = id;
+        if((*ref)->name)
+            strcpy((*ref)->name, name);
 
         /* TODO: look at HASH_ADD_KEYPTR, use same strategy (big contig pool) for non-mmap darshan */
-        HASH_ADD(hlink, core->rec_hash, rec.id, sizeof(darshan_record_id), (*ref));
+        HASH_ADD(hlink, core->rec_hash, id, sizeof(darshan_record_id), (*ref));
         core->rec_hash_cnt++;
         core->rec_hash_sz += record_size;
         core->log_hdr_p->rec_map.len += record_size;
@@ -836,7 +836,7 @@ static void darshan_get_shared_records(struct darshan_core_runtime *core,
         i = 0;
         HASH_ITER(hlink, core->rec_hash, ref, tmp)
         {
-            id_array[i++] = ref->rec.id;           
+            id_array[i++] = ref->id;           
         }
     }
 
@@ -1060,7 +1060,7 @@ static int darshan_log_write_record_hash(MPI_File log_fh, struct darshan_core_ru
         if(my_rank > 0 && ref->global_mod_flags)
             continue;
 
-        name_len = strlen(ref->rec.name);
+        name_len = strlen(ref->name);
         record_sz = sizeof(darshan_record_id) + sizeof(uint32_t) + name_len;
         /* make sure there is room in the buffer for this record */
         if((hash_buf_off + record_sz) > (hash_buf + hash_buf_sz))
@@ -1088,11 +1088,11 @@ static int darshan_log_write_record_hash(MPI_File log_fh, struct darshan_core_ru
          * NOTE: darshan record hash serialization method: 
          *          ... darshan_record_id | (uint32_t) path_len | path ...
          */
-        *((darshan_record_id *)hash_buf_off) = ref->rec.id;
+        *((darshan_record_id *)hash_buf_off) = ref->id;
         hash_buf_off += sizeof(darshan_record_id);
         *((uint32_t *)hash_buf_off) = name_len;
         hash_buf_off += sizeof(uint32_t);
-        memcpy(hash_buf_off, ref->rec.name, name_len);
+        memcpy(hash_buf_off, ref->name, name_len);
         hash_buf_off += name_len;
     }
     hash_buf_sz = hash_buf_off - hash_buf;
@@ -1281,7 +1281,7 @@ void darshan_core_unregister_module(
     /* 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);
+        darshan_core_unregister_record(ref->id, mod_id);
     }
 
     free(darshan_core->mod_array[mod_id]);


=====================================
darshan-runtime/lib/darshan-posix.c
=====================================
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -1717,13 +1717,14 @@ static struct posix_file_runtime* posix_file_by_name(const char *name)
     /* no existing record, assign a new file record from the global array */
     file = &(posix_runtime->file_runtime_array[posix_runtime->file_array_ndx]);
     file->file_record = &(posix_runtime->file_record_array[posix_runtime->file_array_ndx]);
-    file->file_record->f_id = file_id;
-    file->file_record->rank = my_rank;
+    file->file_record->base_rec.id = file_id;
+    file->file_record->base_rec.rank = my_rank;
     file->file_record->counters[POSIX_MEM_ALIGNMENT] = darshan_mem_alignment;
     file->file_record->counters[POSIX_FILE_ALIGNMENT] = file_alignment;
 
     /* add new record to file hash table */
-    HASH_ADD(hlink, posix_runtime->file_hash, file_record->f_id, sizeof(darshan_record_id), file);
+    HASH_ADD(hlink, posix_runtime->file_hash, file_record->base_rec.id,
+        sizeof(darshan_record_id), file);
     posix_runtime->file_array_ndx++;
 
     if(newname != name)
@@ -1816,9 +1817,9 @@ static int posix_record_compare(const void* a_p, const void* b_p)
     const struct darshan_posix_file* a = a_p;
     const struct darshan_posix_file* b = b_p;
 
-    if(a->rank < b->rank)
+    if(a->base_rec.rank < b->base_rec.rank)
         return 1;
-    if(a->rank > b->rank)
+    if(a->base_rec.rank > b->base_rec.rank)
         return -1;
 
     return 0;
@@ -1883,8 +1884,8 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
     for(i=0; i<*len; i++)
     {
         memset(&tmp_file, 0, sizeof(struct darshan_posix_file));
-        tmp_file.f_id = infile->f_id;
-        tmp_file.rank = -1;
+        tmp_file.base_rec.id = infile->base_rec.id;
+        tmp_file.base_rec.rank = -1;
 
         /* sum */
         for(j=POSIX_OPENS; j<=POSIX_FDSYNCS; j++)
@@ -2265,7 +2266,7 @@ static void posix_get_output_data(
 
             /* initialize fastest/slowest info prior to the reduction */
             file->file_record->counters[POSIX_FASTEST_RANK] =
-                file->file_record->rank;
+                file->file_record->base_rec.rank;
             file->file_record->counters[POSIX_FASTEST_RANK_BYTES] =
                 file->file_record->counters[POSIX_BYTES_READ] +
                 file->file_record->counters[POSIX_BYTES_WRITTEN];
@@ -2283,7 +2284,7 @@ static void posix_get_output_data(
             file->file_record->fcounters[POSIX_F_SLOWEST_RANK_TIME] =
                 file->file_record->fcounters[POSIX_F_FASTEST_RANK_TIME];
 
-            file->file_record->rank = -1;
+            file->file_record->base_rec.rank = -1;
         }
 
         /* sort the array of files descending by rank so that we get all of the 


=====================================
darshan-util/darshan-analyzer.c
=====================================
--- a/darshan-util/darshan-analyzer.c
+++ b/darshan-util/darshan-analyzer.c
@@ -68,7 +68,7 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p
     {
         f_count   += 1;
 
-        if (psx_rec.rank == -1)
+        if (psx_rec.base_rec.rank == -1)
             *used_shared = 1;
         else
             *used_fpp = 1;


=====================================
darshan-util/darshan-convert.c
=====================================
--- a/darshan-util/darshan-convert.c
+++ b/darshan-util/darshan-convert.c
@@ -148,13 +148,13 @@ void obfuscate_filenames(int key, struct darshan_record_ref *rec_hash)
 
     HASH_ITER(hlink, rec_hash, ref, tmp)
     {
-        hashed = darshan_hashlittle(ref->rec.name, strlen(ref->rec.name), key);
+        hashed = darshan_hashlittle(ref->name, strlen(ref->name), key);
         sprintf(tmp_string, "%u", hashed);
-        free(ref->rec.name);
-        ref->rec.name = malloc(strlen(tmp_string) + 1);
-        assert(ref->rec.name);
-        memcpy(ref->rec.name, tmp_string, strlen(tmp_string));
-        ref->rec.name[strlen(tmp_string)] = '\0';
+        free(ref->name);
+        ref->name = malloc(strlen(tmp_string) + 1);
+        assert(ref->name);
+        memcpy(ref->name, tmp_string, strlen(tmp_string));
+        ref->name[strlen(tmp_string)] = '\0';
     }
 
     return;
@@ -208,10 +208,10 @@ static void remove_hash_recs(struct darshan_record_ref **rec_hash, darshan_recor
 
     HASH_ITER(hlink, *rec_hash, ref, tmp)
     {
-        if(ref->rec.id != hash)
+        if(ref->id != hash)
         {
             HASH_DELETE(hlink, *rec_hash, ref);
-            free(ref->rec.name);
+            free(ref->name);
             free(ref);
         }
     }
@@ -403,7 +403,7 @@ int main(int argc, char **argv)
     HASH_ITER(hlink, rec_hash, ref, tmp)
     {
         HASH_DELETE(hlink, rec_hash, ref);
-        free(ref->rec.name);
+        free(ref->name);
         free(ref);
     }
 


=====================================
darshan-util/darshan-logutils.c
=====================================
--- a/darshan-util/darshan-logutils.c
+++ b/darshan-util/darshan-logutils.c
@@ -589,8 +589,8 @@ int darshan_log_gethash(darshan_fd fd, struct darshan_record_ref **hash)
                     free(hash_buf);
                     return(-1);
                 }
-                ref->rec.name = malloc(strlen(path_ptr) + 1);
-                if(!ref->rec.name)
+                ref->name = malloc(strlen(path_ptr) + 1);
+                if(!ref->name)
                 {
                     free(ref);
                     free(hash_buf);
@@ -598,11 +598,11 @@ int darshan_log_gethash(darshan_fd fd, struct darshan_record_ref **hash)
                 }
 
                 /* set the fields for this record */
-                ref->rec.id = *rec_id_ptr;
-                strcpy(ref->rec.name, path_ptr);
+                ref->id = *rec_id_ptr;
+                strcpy(ref->name, path_ptr);
 
                 /* add this record to the hash */
-                HASH_ADD(hlink, *hash, rec.id, sizeof(darshan_record_id), ref);
+                HASH_ADD(hlink, *hash, id, sizeof(darshan_record_id), ref);
             }
 
             buf_ptr += strlen(path_ptr) + 1;
@@ -658,10 +658,10 @@ int darshan_log_puthash(darshan_fd fd, struct darshan_record_ref *hash)
          * NOTE: darshan record hash serialization method: 
          *          ... darshan_record_id | path '\0' ...
          */
-        *((darshan_record_id *)buf_ptr) = ref->rec.id;
+        *((darshan_record_id *)buf_ptr) = ref->id;
         buf_ptr += sizeof(darshan_record_id);
-        strcpy(buf_ptr, ref->rec.name);
-        buf_ptr += strlen(ref->rec.name) + 1;
+        strcpy(buf_ptr, ref->name);
+        buf_ptr += strlen(ref->name) + 1;
 
         /* write this hash entry to log file */
         wrote = darshan_log_dzwrite(fd, DARSHAN_REC_MAP_REGION_ID,
@@ -1146,10 +1146,8 @@ static void darshan_log_dzdestroy(darshan_fd fd)
             break;
 #endif
         case DARSHAN_NO_COMP:
-        {
             /* do nothing */
             break;
-        }
         default:
             fprintf(stderr, "Error: invalid compression type.\n");
     }
@@ -1192,10 +1190,8 @@ static int darshan_log_dzread(darshan_fd fd, int region_id, void *buf, int len)
             break;
 #endif
         case DARSHAN_NO_COMP:
-        {
             ret = darshan_log_noz_read(fd, map, buf, len, reset_strm_flag);
             break;
-        }
         default:
             fprintf(stderr, "Error: invalid compression type.\n");
             return(-1);


=====================================
darshan-util/darshan-logutils.h
=====================================
--- a/darshan-util/darshan-logutils.h
+++ b/darshan-util/darshan-logutils.h
@@ -43,7 +43,8 @@ typedef struct darshan_fd_s* darshan_fd;
 
 struct darshan_record_ref
 {
-    struct darshan_record rec;
+    char *name;
+    darshan_record_id id;
     UT_hash_handle hlink;
 };
 


=====================================
darshan-util/darshan-parser.c
=====================================
--- a/darshan-util/darshan-parser.c
+++ b/darshan-util/darshan-parser.c
@@ -412,7 +412,7 @@ int main(int argc, char **argv)
             /* get mount point and fs type associated with this record */
             for(j=0; j<mount_count; j++)
             {
-                if(strncmp(mnt_pts[j], ref->rec.name, strlen(mnt_pts[j])) == 0)
+                if(strncmp(mnt_pts[j], ref->name, strlen(mnt_pts[j])) == 0)
                 {
                     mnt_pt = mnt_pts[j];
                     fs_type = fs_types[j];
@@ -427,7 +427,7 @@ int main(int argc, char **argv)
             if(mask & OPTION_BASE)
             {
                 /* print the corresponding module data for this record */
-                mod_logutils[i]->log_print_record(mod_buf, ref->rec.name,
+                mod_logutils[i]->log_print_record(mod_buf, ref->name,
                     mnt_pt, fs_type);
             }
 
@@ -623,7 +623,7 @@ cleanup:
     HASH_ITER(hlink, rec_hash, ref, tmp_ref)
     {
         HASH_DELETE(hlink, rec_hash, ref);
-        free(ref->rec.name);
+        free(ref->name);
         free(ref);
     }
 
@@ -654,7 +654,7 @@ void posix_accum_file(struct darshan_posix_file *pfile,
 
     hfile->procs += 1;
 
-    if(pfile->rank == -1)
+    if(pfile->base_rec.rank == -1)
     {
         hfile->slowest_time = pfile->fcounters[POSIX_F_SLOWEST_RANK_TIME];
     }
@@ -666,7 +666,7 @@ void posix_accum_file(struct darshan_posix_file *pfile,
             pfile->fcounters[POSIX_F_WRITE_TIME]));
     }
 
-    if(pfile->rank == -1)
+    if(pfile->base_rec.rank == -1)
     {
         hfile->procs = nprocs;
         hfile->type |= FILETYPE_SHARED;
@@ -1029,7 +1029,7 @@ void posix_accum_perf(struct darshan_posix_file *pfile,
      *     by_slowest: use slowest rank time from log data
      *                 (most accurate but requires newer log version)
      */
-    if(pfile->rank == -1)
+    if(pfile->base_rec.rank == -1)
     {
         /* by_open */
         if(pfile->fcounters[POSIX_F_CLOSE_TIMESTAMP] >
@@ -1080,11 +1080,12 @@ void posix_accum_perf(struct darshan_posix_file *pfile,
      */
     else
     {
-        pdata->rank_cumul_io_time[pfile->rank] +=
+        pdata->rank_cumul_io_time[pfile->base_rec.rank] +=
             (pfile->fcounters[POSIX_F_META_TIME] +
             pfile->fcounters[POSIX_F_READ_TIME] +
             pfile->fcounters[POSIX_F_WRITE_TIME]);
-        pdata->rank_cumul_md_time[pfile->rank] += pfile->fcounters[POSIX_F_META_TIME];
+        pdata->rank_cumul_md_time[pfile->base_rec.rank] +=
+            pfile->fcounters[POSIX_F_META_TIME];
     }
 
     return;
@@ -1461,7 +1462,7 @@ void posix_file_list(hash_entry_t *file_hash,
 
         printf("%" PRIu64 "\t%s\t%" PRId64 "\t%f\t%f",
             curr->rec_id,
-            ref->rec.name,
+            ref->name,
             curr->procs,
             curr->slowest_time,
             curr->cumul_time/(double)curr->procs);
@@ -1555,7 +1556,7 @@ void mpiio_file_list(hash_entry_t *file_hash,
 
         printf("%" PRIu64 "\t%s\t%" PRId64 "\t%f\t%f",
             curr->rec_id,
-            ref->rec.name,
+            ref->name,
             curr->procs,
             curr->slowest_time,
             curr->cumul_time/(double)curr->procs);


=====================================
darshan-util/darshan-posix-logutils.c
=====================================
--- a/darshan-util/darshan-posix-logutils.c
+++ b/darshan-util/darshan-posix-logutils.c
@@ -62,15 +62,15 @@ static int darshan_log_get_posix_file(darshan_fd fd, void* posix_buf,
         if(fd->swap_flag)
         {
             /* swap bytes if necessary */
-            DARSHAN_BSWAP64(&file->f_id);
-            DARSHAN_BSWAP64(&file->rank);
+            DARSHAN_BSWAP64(&file->base_rec.id);
+            DARSHAN_BSWAP64(&file->base_rec.rank);
             for(i=0; i<POSIX_NUM_INDICES; i++)
                 DARSHAN_BSWAP64(&file->counters[i]);
             for(i=0; i<POSIX_F_NUM_INDICES; i++)
                 DARSHAN_BSWAP64(&file->fcounters[i]);
         }
 
-        *rec_id = file->f_id;
+        *rec_id = file->base_rec.id;
         return(1);
     }
 }
@@ -98,15 +98,17 @@ static void darshan_log_print_posix_file(void *file_rec, char *file_name,
     for(i=0; i<POSIX_NUM_INDICES; i++)
     {
         DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
-            posix_file_rec->rank, posix_file_rec->f_id, posix_counter_names[i],
-            posix_file_rec->counters[i], file_name, mnt_pt, fs_type);
+            posix_file_rec->base_rec.rank, posix_file_rec->base_rec.id,
+            posix_counter_names[i], posix_file_rec->counters[i],
+            file_name, mnt_pt, fs_type);
     }
 
     for(i=0; i<POSIX_F_NUM_INDICES; i++)
     {
         DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
-            posix_file_rec->rank, posix_file_rec->f_id, posix_f_counter_names[i],
-            posix_file_rec->fcounters[i], file_name, mnt_pt, fs_type);
+            posix_file_rec->base_rec.rank, posix_file_rec->base_rec.id,
+            posix_f_counter_names[i], posix_file_rec->fcounters[i],
+            file_name, mnt_pt, fs_type);
     }
 
     return;


=====================================
darshan-util/darshan-stitch-logs.c
=====================================
--- a/darshan-util/darshan-stitch-logs.c
+++ b/darshan-util/darshan-stitch-logs.c
@@ -1,13 +1,71 @@
-    #include <stdio.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
-#include <glob.h>
 #include <string.h>
+#include <getopt.h>
+#include <glob.h>
 
 #include "darshan-logutils.h"
 
 #define DEF_MOD_BUF_SIZE 1024 /* 1 KiB is enough for all current mod records ... */
 
+/* TODO: are there any checks we should do to ensure tmp logs belong to the same job */
+/* we can't specifically check the job id, since the pid is used if no job scheduler */
+
+/* TODO: how do we set the output logfile name to be unique, and have necessary semantic info contained */
+
+void usage(char *exename)
+{
+    fprintf(stderr, "Usage: %s [options] <tmp_dir> <job_id>\n", exename);
+    fprintf(stderr, "       TODO: description.\n");
+    fprintf(stderr, "       --shared-redux Reduce globally shared records into a single record.\n");
+
+    exit(1);
+}
+
+void parse_args(int argc, char **argv, char **tmplog_dir, int *tmplog_jobid,
+    int *shared_redux)
+{
+    int index;
+    static struct option long_opts[] =
+    {
+        {"shared-redux", no_argument, NULL, 's'},
+        {0, 0, 0, 0}
+    };
+
+    *shared_redux = 0;
+
+    while(1)
+    {
+        int c = getopt_long(argc, argv, "", long_opts, &index);
+
+        if(c == -1) break;
+
+        switch(c)
+        {
+            case 's':
+                *shared_redux = 1;
+                break;
+            case '?':
+            default:
+                usage(argv[0]);
+                break;
+        }
+    }
+
+    if(optind + 2 == argc)
+    {
+        *tmplog_dir = argv[optind];
+        *tmplog_jobid = atoi(argv[optind+1]);
+    }
+    else
+    {
+        usage(argv[0]);
+    }
+
+    return;
+}
+
 int logfile_path_comp(const void *a, const void *b)
 {
     char *pathA = *(char **)a;
@@ -31,6 +89,7 @@ int logfile_path_comp(const void *a, const void *b)
 
 int main(int argc, char *argv[])
 {
+    int shared_redux;
     char *tmplog_dir;
     int job_id;
     glob_t globbuf;
@@ -50,22 +109,8 @@ int main(int argc, char *argv[])
     int i, j;
     int ret;
 
-    /* TODO: are there any checks we should do to ensure tmp logs belong to the same job */
-    /* we can't specifically check the job id, since the pid is used if no job scheduler */
-
-    /* TODO: how do we set the output logfile name to be unique, and have necessary semantic info contained */
-
-    if(argc != 3)
-    {
-        fprintf(stderr, "Usage: ./darshan-stitch-tmplogs <tmp_dir> <job_id>\n"
-            "\t<tmp_dir> is the directory containing the temporary Darshan logs\n"
-            "\t<job_id> is the job id of the logs we are trying to stitch\n");
-        return(0);
-    }
-
     /* grab command line arguments */
-    tmplog_dir = argv[1];
-    job_id = atoi(argv[2]);
+    parse_args(argc, argv, &tmplog_dir, &job_id, &shared_redux);
 
     /* construct the list of input log files to stitch together */
     snprintf(glob_pstr, 512, "%s/darshan_job%d*", tmplog_dir, job_id);
@@ -169,14 +214,12 @@ int main(int argc, char *argv[])
          */
         HASH_ITER(hlink, in_hash, ref, tmp)
         {
-            HASH_FIND(hlink, stitch_hash, &(ref->rec.id),
-                sizeof(darshan_record_id), found);
+            HASH_FIND(hlink, stitch_hash, &(ref->id), sizeof(darshan_record_id), found);
             if(!found)
             {
-                HASH_ADD(hlink, stitch_hash, rec.id,
-                    sizeof(darshan_record_id), ref);
+                HASH_ADD(hlink, stitch_hash, id, sizeof(darshan_record_id), ref);
             }
-            else if(strcmp(ref->rec.name, found->rec.name))
+            else if(strcmp(ref->name, found->name))
             {
                 fprintf(stderr,
                     "Error: invalid Darshan record table entry.\n");
@@ -250,25 +293,30 @@ int main(int argc, char *argv[])
     }
     memset(mod_buf, 0, DEF_MOD_BUF_SIZE);
 
+    /* iterate over active darshan modules and gather module data to write
+     * to the stitched together output log
+     */
     for(i = 0; i < DARSHAN_MPIIO_MOD; i++)
     {
         if(!mod_logutils[i]) continue;
 
-#if 0
-        /* XXX first build shared record list? */
-        for(j = 0; j < globbuf.gl_pathc; j++)
+        if(shared_redux)
         {
+            /* copy all root's file records into an array */
 
-        }
+            /* compare and updated shared records? */
+            for(j = 1; j < globbuf.gl_pathc; j++)
+            {
+            }
 
-        /* XXX second aggregate shared records ? */
-        for(j = 0; j < globbuf.gl_pathc; j++)
-        {
+            /* XXX aggregate shared records? */
+            for(j = 0; j < globbuf.gl_pathc; j++)
+            {
 
+            }
         }
-#endif
 
-        /* XXX third write each rank's blobs, with rank 0 writing the shared ones ? */
+        /* XXX third write each rank's blobs, with rank 0 writing the shared ones? */
         for(j = 0; j < globbuf.gl_pathc; j++)
         {
             in_fd = darshan_log_open(globbuf.gl_pathv[j]);



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/66a83b0382dade07f600a43bf50707be39e63ef2...ed103a2ae7a9c396eb0a21642de5c3c9db5de18a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20151208/b1e11288/attachment-0001.html>


More information about the Darshan-commits mailing list