[Darshan-commits] [Git][darshan/darshan][master] 4 commits: cleanup darshan main header comments

Shane Snyder xgitlab at cels.anl.gov
Fri Sep 23 16:08:43 CDT 2016


Shane Snyder pushed to branch master at darshan / darshan


Commits:
52a56762 by Shane Snyder at 2016-09-23T15:35:50-05:00
cleanup darshan main header comments

- - - - -
f4dcade3 by Shane Snyder at 2016-09-23T15:36:02-05:00
small fixes to darshan-runtime documentation

- - - - -
a3c693c6 by Shane Snyder at 2016-09-23T15:58:24-05:00
remove unneeded parameter to log_put_record

- - - - -
1419f48e by Shane Snyder at 2016-09-23T16:05:12-05:00
remove unneeded parameter to log_print_record

- - - - -


14 changed files:

- darshan-runtime/darshan.h
- darshan-runtime/doc/darshan-runtime.txt
- darshan-util/darshan-bgq-logutils.c
- darshan-util/darshan-convert.c
- darshan-util/darshan-hdf5-logutils.c
- darshan-util/darshan-logutils.h
- darshan-util/darshan-lustre-logutils.c
- darshan-util/darshan-merge.c
- darshan-util/darshan-mpiio-logutils.c
- darshan-util/darshan-null-logutils.c
- darshan-util/darshan-parser.c
- darshan-util/darshan-pnetcdf-logutils.c
- darshan-util/darshan-posix-logutils.c
- darshan-util/darshan-stdio-logutils.c


Changes:

=====================================
darshan-runtime/darshan.h
=====================================
--- a/darshan-runtime/darshan.h
+++ b/darshan-runtime/darshan.h
@@ -128,8 +128,8 @@ darshan_record_id darshan_core_gen_record_id(
  * properly tracked and (potentially) correlated with records from other
  * modules. 'rec_id' is the Darshan record id as given by the
  * `darshan_core_gen_record_id` function. 'name' is the the name of the
- * Darshan record (e.g., the full file path), which for now is just a
- * string. 'mod_id' is the identifier of the calling module. 'rec_len'
+ * Darshan record (e.g., the full file path), which is ignored if NULL is
+ * passed. 'mod_id' is the identifier of the calling module. 'rec_len'
  * is the size of the record being registered with Darshan. If given,
  * 'fs_info' is a pointer to a structure containing information on
  * the underlying FS this record is associated with (determined by
@@ -144,7 +144,15 @@ void *darshan_core_register_record(
     int rec_len,
     struct darshan_fs_info *fs_info);
 
-/* TODO */
+/* darshan_instrument_fs_data()
+ *
+ * Allow file system-specific modules to instrument data for the file
+ * stored at 'path'. 'fs_type' is checked to determine the underlying
+ * filesystem and calls into the corresponding file system instrumentation
+ * module, if defined -- currently we only have a Lustre module. 'fd' is
+ * the file descriptor corresponding to the file, which may be needed by
+ * the file system to retrieve specific parameters.
+ */
 void darshan_instrument_fs_data(
     int fs_type,
     const char *path,


=====================================
darshan-runtime/doc/darshan-runtime.txt
=====================================
--- a/darshan-runtime/doc/darshan-runtime.txt
+++ b/darshan-runtime/doc/darshan-runtime.txt
@@ -20,6 +20,10 @@ information about HDF5 and PnetCDF access. Darshan also exposes an API that
 can be used to develop and add new instrumentation modules (for other I/O library
 interfaces or to gather system-specific data, for instance), as detailed in
 http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-modularization.html[this document].
+Newly contributed modules include a module for gathering system-specific parameters
+for jobs running on BG/Q systems, a module for gathering Lustre striping data for
+files on Lustre file systems, and a module for instrumenting stdio (i.e., stream I/O
+functions like `fopen()`, `fread()`, etc).
 
 This document provides generic installation instructions, but "recipes" for
 several common HPC systems are provided at the end of the document as well.
@@ -531,7 +535,7 @@ behavior at runtime:
 * DARSHAN_LOGPATH: specifies the path to write Darshan log files to. Note that this directory needs to be formatted using the darshan-mk-log-dirs script.
 * DARSHAN_LOGFILE: specifies the path (directory + Darshan log file name) to write the output Darshan log to. This overrides the default Darshan behavior of automatically generating a log file name and adding it to a log file directory formatted using darshan-mk-log-dirs script.
 * DARSHAN_MODMEM: specifies the maximum amount of memory (in MiB) Darshan instrumentation modules can collectively consume at runtime (if not specified, Darshan uses a default quota of 2 MiB).
-* DARSHAN_MMAP_LOGPATH: if Darshan's mmap log file mechanism is enabled, this variable specifies what path the mmap log files should be stored in (if not specified, log files will be stored in `/tmp`.
+* DARSHAN_MMAP_LOGPATH: if Darshan's mmap log file mechanism is enabled, this variable specifies what path the mmap log files should be stored in (if not specified, log files will be stored in `/tmp`).
 
 == Debugging
 


=====================================
darshan-util/darshan-bgq-logutils.c
=====================================
--- a/darshan-util/darshan-bgq-logutils.c
+++ b/darshan-util/darshan-bgq-logutils.c
@@ -35,9 +35,9 @@ char *bgq_f_counter_names[] = {
 #define DARSHAN_BGQ_FILE_SIZE_1 (112 + 8)
 
 static int darshan_log_get_bgq_rec(darshan_fd fd, void** bgq_buf_p);
-static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf, int ver);
+static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf);
 static void darshan_log_print_bgq_rec(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_bgq_description(int ver);
 static void darshan_log_print_bgq_rec_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -136,7 +136,7 @@ static int darshan_log_get_bgq_rec(darshan_fd fd, void** bgq_buf_p)
     }
 }
 
-static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf, int ver)
+static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf)
 {
     struct darshan_bgq_record *rec = (struct darshan_bgq_record *)bgq_buf;
     int ret;
@@ -150,7 +150,7 @@ static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf, int ver)
 }
 
 static void darshan_log_print_bgq_rec(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_bgq_record *bgq_file_rec =


=====================================
darshan-util/darshan-convert.c
=====================================
--- a/darshan-util/darshan-convert.c
+++ b/darshan-util/darshan-convert.c
@@ -407,7 +407,7 @@ int main(int argc, char **argv)
 
             if(!hash || hash == base_rec->id)
             {
-                ret = mod_logutils[i]->log_put_record(outfile, mod_buf, infile->mod_ver[i]);
+                ret = mod_logutils[i]->log_put_record(outfile, mod_buf);
                 if(ret < 0)
                 {
                     darshan_log_close(infile);


=====================================
darshan-util/darshan-hdf5-logutils.c
=====================================
--- a/darshan-util/darshan-hdf5-logutils.c
+++ b/darshan-util/darshan-hdf5-logutils.c
@@ -31,9 +31,9 @@ char *hdf5_f_counter_names[] = {
 #undef X
 
 static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p);
-static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf, int ver);
+static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf);
 static void darshan_log_print_hdf5_file(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_hdf5_description(int ver);
 static void darshan_log_print_hdf5_file_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -97,7 +97,7 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p)
     }
 }
 
-static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf, int ver)
+static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf)
 {
     struct darshan_hdf5_file *file = (struct darshan_hdf5_file *)hdf5_buf;
     int ret;
@@ -111,7 +111,7 @@ static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf, int ver)
 }
 
 static void darshan_log_print_hdf5_file(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_hdf5_file *hdf5_file_rec =


=====================================
darshan-util/darshan-logutils.h
=====================================
--- a/darshan-util/darshan-logutils.h
+++ b/darshan-util/darshan-logutils.h
@@ -30,7 +30,8 @@ struct darshan_fd_s
     /* log file version */
     char version[8];
     /* flag indicating whether byte swapping needs to be
-     * performed on log file data */
+     * performed on log file data
+     */
     int swap_flag;
     /* flag indicating whether a log file contains partial data */
     int partial_flag;
@@ -80,33 +81,29 @@ struct darshan_mod_logutil_funcs
      * return 0 on success, -1 on error
      *      - 'fd' is the file descriptor to put record into
      *      - 'buf' is the buffer containing the record data
-     *      - 'ver' is the version of the record
      */
     int (*log_put_record)(
         darshan_fd fd,
-        void *buf,
-        int ver
+        void *buf
     );
     /* print the counters for a given log record
      *      - 'file_rec' is the record's data buffer
      *      - 'file_name' is the file path string for the record
      *      - 'mnt-pt' is the file path mount point string
      *      - 'fs_type' is the file system type string
-     *      - 'ver' is the version of the record
      */
     void (*log_print_record)(
         void *file_rec,
         char *file_name,
         char *mnt_pt,
-        char *fs_type,
-        int ver
+        char *fs_type
     );
     /* print module-specific description of I/O characterization data
      *      - 'ver' is the version of the record
      */
     void (*log_print_description)(
         int ver);
-    /* print a text diff of 2 module I/O records */
+    /* print a text diff of 2 module records */
     void (*log_print_diff)(
         void *rec1,
         char *name1,


=====================================
darshan-util/darshan-lustre-logutils.c
=====================================
--- a/darshan-util/darshan-lustre-logutils.c
+++ b/darshan-util/darshan-lustre-logutils.c
@@ -25,9 +25,9 @@ char *lustre_counter_names[] = {
 #undef X
 
 static int darshan_log_get_lustre_record(darshan_fd fd, void** lustre_buf_p);
-static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf, int ver);
+static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf);
 static void darshan_log_print_lustre_record(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_lustre_description(int ver);
 static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
     void *rec2, char *file_name2);
@@ -114,7 +114,7 @@ static int darshan_log_get_lustre_record(darshan_fd fd, void** lustre_buf_p)
     return(ret);
 }
 
-static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf, int ver)
+static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf)
 {
     struct darshan_lustre_record *rec = (struct darshan_lustre_record *)lustre_buf;
     int ret;
@@ -128,7 +128,7 @@ static int darshan_log_put_lustre_record(darshan_fd fd, void* lustre_buf, int ve
 }
 
 static void darshan_log_print_lustre_record(void *rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_lustre_record *lustre_rec =


=====================================
darshan-util/darshan-merge.c
=====================================
--- a/darshan-util/darshan-merge.c
+++ b/darshan-util/darshan-merge.c
@@ -419,7 +419,7 @@ int main(int argc, char *argv[])
                 /* write out the shared records first */
                 HASH_ITER(hlink, shared_rec_hash, sref, stmp)
                 {
-                    ret = mod_logutils[i]->log_put_record(merge_fd, sref->agg_rec, in_fd->mod_ver[i]);
+                    ret = mod_logutils[i]->log_put_record(merge_fd, sref->agg_rec);
                     if(ret < 0)
                     {
                         fprintf(stderr,
@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
                 if(sref)
                     continue; /* skip shared records */
 
-                ret = mod_logutils[i]->log_put_record(merge_fd, mod_buf, in_fd->mod_ver[i]);
+                ret = mod_logutils[i]->log_put_record(merge_fd, mod_buf);
                 if(ret < 0)
                 {
                     fprintf(stderr,


=====================================
darshan-util/darshan-mpiio-logutils.c
=====================================
--- a/darshan-util/darshan-mpiio-logutils.c
+++ b/darshan-util/darshan-mpiio-logutils.c
@@ -31,9 +31,9 @@ char *mpiio_f_counter_names[] = {
 #undef X
 
 static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p);
-static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf, int ver);
+static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf);
 static void darshan_log_print_mpiio_file(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_mpiio_description(int ver);
 static void darshan_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -97,7 +97,7 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p)
     }
 }
 
-static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf, int ver)
+static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf)
 {
     struct darshan_mpiio_file *file = (struct darshan_mpiio_file *)mpiio_buf;
     int ret;
@@ -111,7 +111,7 @@ static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf, int ver)
 }
 
 static void darshan_log_print_mpiio_file(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_mpiio_file *mpiio_file_rec =


=====================================
darshan-util/darshan-null-logutils.c
=====================================
--- a/darshan-util/darshan-null-logutils.c
+++ b/darshan-util/darshan-null-logutils.c
@@ -33,9 +33,9 @@ char *null_f_counter_names[] = {
 
 /* prototypes for each of the NULL module's logutil functions */
 static int darshan_log_get_null_record(darshan_fd fd, void** null_buf_p);
-static int darshan_log_put_null_record(darshan_fd fd, void* null_buf, int ver);
+static int darshan_log_put_null_record(darshan_fd fd, void* null_buf);
 static void darshan_log_print_null_record(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_null_description(int ver);
 static void darshan_log_print_null_record_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -108,10 +108,10 @@ static int darshan_log_get_null_record(darshan_fd fd, void** null_buf_p)
     }
 }
 
-/* write the NULL record stored in 'null_buf' (with version number 'ver')
- * to log file descriptor 'fd'. Return 0 on success, -1 on failure
+/* write the NULL record stored in 'null_buf' to log file descriptor 'fd'.
+ * Return 0 on success, -1 on failure
  */
-static int darshan_log_put_null_record(darshan_fd fd, void* null_buf, int ver)
+static int darshan_log_put_null_record(darshan_fd fd, void* null_buf)
 {
     struct darshan_null_record *rec = (struct darshan_null_record *)null_buf;
     int ret;
@@ -127,7 +127,7 @@ static int darshan_log_put_null_record(darshan_fd fd, void* null_buf, int ver)
 
 /* print all I/O data record statistics for the given NULL record */
 static void darshan_log_print_null_record(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_null_record *null_rec =


=====================================
darshan-util/darshan-parser.c
=====================================
--- a/darshan-util/darshan-parser.c
+++ b/darshan-util/darshan-parser.c
@@ -477,7 +477,7 @@ int main(int argc, char **argv)
             {
                 /* print the corresponding module data for this record */
                 mod_logutils[i]->log_print_record(mod_buf, rec_name,
-                    mnt_pt, fs_type, fd->mod_ver[i]);
+                    mnt_pt, fs_type);
             }
 
             /* we calculate more detailed stats for POSIX, MPI-IO, and STDIO modules, 


=====================================
darshan-util/darshan-pnetcdf-logutils.c
=====================================
--- a/darshan-util/darshan-pnetcdf-logutils.c
+++ b/darshan-util/darshan-pnetcdf-logutils.c
@@ -31,9 +31,9 @@ char *pnetcdf_f_counter_names[] = {
 #undef X
 
 static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p);
-static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf, int ver);
+static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf);
 static void darshan_log_print_pnetcdf_file(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_pnetcdf_description(int ver);
 static void darshan_log_print_pnetcdf_file_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -97,7 +97,7 @@ static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p)
     }
 }
 
-static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf, int ver)
+static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf)
 {
     struct darshan_pnetcdf_file *file = (struct darshan_pnetcdf_file *)pnetcdf_buf;
     int ret;
@@ -111,7 +111,7 @@ static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf, int ve
 }
 
 static void darshan_log_print_pnetcdf_file(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_pnetcdf_file *pnetcdf_file_rec =


=====================================
darshan-util/darshan-posix-logutils.c
=====================================
--- a/darshan-util/darshan-posix-logutils.c
+++ b/darshan-util/darshan-posix-logutils.c
@@ -34,9 +34,9 @@ char *posix_f_counter_names[] = {
 #define DARSHAN_POSIX_FILE_SIZE_2 648
 
 static int darshan_log_get_posix_file(darshan_fd fd, void** posix_buf_p);
-static int darshan_log_put_posix_file(darshan_fd fd, void* posix_buf, int ver);
+static int darshan_log_put_posix_file(darshan_fd fd, void* posix_buf);
 static void darshan_log_print_posix_file(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_posix_description(int ver);
 static void darshan_log_print_posix_file_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -160,7 +160,7 @@ exit:
     }
 }
 
-static int darshan_log_put_posix_file(darshan_fd fd, void* posix_buf, int ver)
+static int darshan_log_put_posix_file(darshan_fd fd, void* posix_buf)
 {
     struct darshan_posix_file *file = (struct darshan_posix_file *)posix_buf;
     int ret;
@@ -174,7 +174,7 @@ static int darshan_log_put_posix_file(darshan_fd fd, void* posix_buf, int ver)
 }
 
 static void darshan_log_print_posix_file(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_posix_file *posix_file_rec =


=====================================
darshan-util/darshan-stdio-logutils.c
=====================================
--- a/darshan-util/darshan-stdio-logutils.c
+++ b/darshan-util/darshan-stdio-logutils.c
@@ -33,9 +33,9 @@ char *stdio_f_counter_names[] = {
 
 /* prototypes for each of the STDIO module's logutil functions */
 static int darshan_log_get_stdio_record(darshan_fd fd, void** stdio_buf_p);
-static int darshan_log_put_stdio_record(darshan_fd fd, void* stdio_buf, int ver);
+static int darshan_log_put_stdio_record(darshan_fd fd, void* stdio_buf);
 static void darshan_log_print_stdio_record(void *file_rec,
-    char *file_name, char *mnt_pt, char *fs_type, int ver);
+    char *file_name, char *mnt_pt, char *fs_type);
 static void darshan_log_print_stdio_description(int ver);
 static void darshan_log_print_stdio_record_diff(void *file_rec1, char *file_name1,
     void *file_rec2, char *file_name2);
@@ -111,7 +111,7 @@ static int darshan_log_get_stdio_record(darshan_fd fd, void** stdio_buf_p)
 /* write the STDIO record stored in 'stdio_buf' to log file descriptor 'fd'.
  * Return 0 on success, -1 on failure
  */
-static int darshan_log_put_stdio_record(darshan_fd fd, void* stdio_buf, int ver)
+static int darshan_log_put_stdio_record(darshan_fd fd, void* stdio_buf)
 {
     struct darshan_stdio_file *rec = (struct darshan_stdio_file *)stdio_buf;
     int ret;
@@ -127,7 +127,7 @@ static int darshan_log_put_stdio_record(darshan_fd fd, void* stdio_buf, int ver)
 
 /* print all I/O data record statistics for the given STDIO record */
 static void darshan_log_print_stdio_record(void *file_rec, char *file_name,
-    char *mnt_pt, char *fs_type, int ver)
+    char *mnt_pt, char *fs_type)
 {
     int i;
     struct darshan_stdio_file *stdio_rec =



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/84b8bb1cc54ec5bf5e8785244a0929a144dc4e7a...1419f48eb621fbb30a8dcd50cab48de4de8aaffa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160923/fbb5e0d8/attachment-0001.html>


More information about the Darshan-commits mailing list