[Darshan-commits] [Darshan] branch, dev-modular, updated. 721e5e5ca6ca0e14a530cef57d9bca47dbc94bc4
Service Account
git at mcs.anl.gov
Mon Feb 9 14:50:17 CST 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 721e5e5ca6ca0e14a530cef57d9bca47dbc94bc4 (commit)
from 7fdf26f08dfc4528bcf7397f3786ad96a2d6cbd2 (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 721e5e5ca6ca0e14a530cef57d9bca47dbc94bc4
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date: Mon Feb 9 14:49:37 2015 -0600
some code/header reorg + minor edits
-----------------------------------------------------------------------
Summary of changes:
darshan-log-format.h | 126 +-------------------
darshan-log-format.h => darshan-posix-log-format.h | 69 +----------
darshan-runtime/lib/darshan-posix.c | 1 +
darshan-util/darshan-logutils.h | 3 +-
darshan-util/darshan-posix-parser.c | 37 ++++---
doc/darshan-dev-status.txt | 37 ++++++
.../darshan-modularization-design-notes.txt | 6 +-
.../darshan-modularization-whiteboard.pdf | Bin 2232046 -> 2232046 bytes
8 files changed, 71 insertions(+), 208 deletions(-)
copy darshan-log-format.h => darshan-posix-log-format.h (75%)
create mode 100644 doc/darshan-dev-status.txt
rename darshan-modularization-design-notes.txt => doc/darshan-modularization-design-notes.txt (95%)
rename darshan-modularization-whiteboard.pdf => doc/darshan-modularization-whiteboard.pdf (100%)
Diff of changes:
diff --git a/darshan-log-format.h b/darshan-log-format.h
index d377fb5..3014c46 100644
--- a/darshan-log-format.h
+++ b/darshan-log-format.h
@@ -42,8 +42,8 @@ struct darshan_header
{
char version_string[8];
int64_t magic_nr;
- uint8_t comp_type;
- uint8_t mod_count;
+ uint8_t comp_type; /* TODO */
+ uint8_t mod_count; /* TODO: */
};
struct darshan_record
@@ -64,126 +64,4 @@ struct darshan_job
char metadata[DARSHAN_JOB_METADATA_LEN]; /* TODO: what is this? */
};
-/*** POSIX MODULE DATA STRUCTURES START */
-
-/* TODO: where do these file record structs go? */
-/* TODO: DARSHAN_* OR CP_* */
-enum darshan_posix_indices
-{
- CP_POSIX_READS, /* count of posix reads */
- CP_POSIX_WRITES, /* count of posix writes */
- CP_POSIX_OPENS, /* count of posix opens */
- CP_POSIX_SEEKS, /* count of posix seeks */
- CP_POSIX_STATS, /* count of posix stat/lstat/fstats */
- CP_POSIX_MMAPS, /* count of posix mmaps */
- CP_POSIX_FREADS,
- CP_POSIX_FWRITES,
- CP_POSIX_FOPENS,
- CP_POSIX_FSEEKS,
- CP_POSIX_FSYNCS,
- CP_POSIX_FDSYNCS,
- CP_MODE, /* mode of file */
- CP_BYTES_READ, /* total bytes read */
- CP_BYTES_WRITTEN, /* total bytes written */
- CP_MAX_BYTE_READ, /* highest offset byte read */
- CP_MAX_BYTE_WRITTEN, /* highest offset byte written */
- CP_CONSEC_READS, /* count of consecutive reads */
- CP_CONSEC_WRITES, /* count of consecutive writes */
- CP_SEQ_READS, /* count of sequential reads */
- CP_SEQ_WRITES, /* count of sequential writes */
- CP_RW_SWITCHES, /* number of times switched between read and write */
- CP_MEM_NOT_ALIGNED, /* count of accesses not mem aligned */
- CP_MEM_ALIGNMENT, /* mem alignment in bytes */
- CP_FILE_NOT_ALIGNED, /* count of accesses not file aligned */
- CP_FILE_ALIGNMENT, /* file alignment in bytes */
- CP_MAX_READ_TIME_SIZE,
- CP_MAX_WRITE_TIME_SIZE,
- /* buckets */
- CP_SIZE_READ_0_100, /* count of posix read size ranges */
- CP_SIZE_READ_100_1K,
- CP_SIZE_READ_1K_10K,
- CP_SIZE_READ_10K_100K,
- CP_SIZE_READ_100K_1M,
- CP_SIZE_READ_1M_4M,
- CP_SIZE_READ_4M_10M,
- CP_SIZE_READ_10M_100M,
- CP_SIZE_READ_100M_1G,
- CP_SIZE_READ_1G_PLUS,
- /* buckets */
- CP_SIZE_WRITE_0_100, /* count of posix write size ranges */
- CP_SIZE_WRITE_100_1K,
- CP_SIZE_WRITE_1K_10K,
- CP_SIZE_WRITE_10K_100K,
- CP_SIZE_WRITE_100K_1M,
- CP_SIZE_WRITE_1M_4M,
- CP_SIZE_WRITE_4M_10M,
- CP_SIZE_WRITE_10M_100M,
- CP_SIZE_WRITE_100M_1G,
- CP_SIZE_WRITE_1G_PLUS,
- /* counters */
- CP_STRIDE1_STRIDE, /* the four most frequently appearing strides */
- CP_STRIDE2_STRIDE,
- CP_STRIDE3_STRIDE,
- CP_STRIDE4_STRIDE,
- CP_STRIDE1_COUNT, /* count of each of the most frequent strides */
- CP_STRIDE2_COUNT,
- CP_STRIDE3_COUNT,
- CP_STRIDE4_COUNT,
- CP_ACCESS1_ACCESS, /* the four most frequently appearing access sizes */
- CP_ACCESS2_ACCESS,
- CP_ACCESS3_ACCESS,
- CP_ACCESS4_ACCESS,
- CP_ACCESS1_COUNT, /* count of each of the most frequent access sizes */
- CP_ACCESS2_COUNT,
- CP_ACCESS3_COUNT,
- CP_ACCESS4_COUNT,
- CP_DEVICE, /* device id reported by stat */
- CP_SIZE_AT_OPEN,
- CP_FASTEST_RANK,
- CP_FASTEST_RANK_BYTES,
- CP_SLOWEST_RANK,
- CP_SLOWEST_RANK_BYTES,
-
- CP_NUM_INDICES,
-};
-
-/* floating point statistics */
-enum darshan_f_posix_indices
-{
- /* NOTE: adjust cp_normalize_timestamps() function if any TIMESTAMPS are
- * added or modified in this list
- */
- CP_F_OPEN_TIMESTAMP = 0, /* timestamp of first open */
- CP_F_READ_START_TIMESTAMP, /* timestamp of first read */
- CP_F_WRITE_START_TIMESTAMP, /* timestamp of first write */
- CP_F_CLOSE_TIMESTAMP, /* timestamp of last close */
- CP_F_READ_END_TIMESTAMP, /* timestamp of last read */
- CP_F_WRITE_END_TIMESTAMP, /* timestamp of last write */
- CP_F_POSIX_READ_TIME, /* cumulative posix read time */
- CP_F_POSIX_WRITE_TIME, /* cumulative posix write time */
- CP_F_POSIX_META_TIME, /* cumulative posix meta time */
- CP_F_MAX_READ_TIME,
- CP_F_MAX_WRITE_TIME,
- /* Total I/O and meta time consumed by fastest and slowest ranks,
- * reported in either MPI or POSIX time depending on how the file
- * was accessed.
- */
- CP_F_FASTEST_RANK_TIME,
- CP_F_SLOWEST_RANK_TIME,
- CP_F_VARIANCE_RANK_TIME,
- CP_F_VARIANCE_RANK_BYTES,
-
- CP_F_NUM_INDICES,
-};
-
-struct darshan_posix_file
-{
- darshan_record_id f_id;
- int64_t rank;
- int64_t counters[CP_NUM_INDICES];
- double fcounters[CP_F_NUM_INDICES];
-};
-
-/*** POSIX MODULE DATA STRUCTURES END */
-
#endif /* __DARSHAN_LOG_FORMAT_H */
diff --git a/darshan-log-format.h b/darshan-posix-log-format.h
similarity index 75%
copy from darshan-log-format.h
copy to darshan-posix-log-format.h
index d377fb5..cc0d46d 100644
--- a/darshan-log-format.h
+++ b/darshan-posix-log-format.h
@@ -3,70 +3,11 @@
* See COPYRIGHT in top-level directory.
*/
-#ifndef __DARSHAN_LOG_FORMAT_H
-#define __DARSHAN_LOG_FORMAT_H
+#ifndef __DARSHAN_POSIX_LOG_FORMAT_H
+#define __DARSHAN_POSIX_LOG_FORMAT_H
-#include <unistd.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
+#include "darshan-log-format.h"
-#if !defined PRId64
-#error failed to detect PRId64
-#endif
-#if !defined PRIu64
-#error failed to detect PRIu64
-#endif
-
-/* update this on file format changes */
-#define CP_VERSION "3.00"
-
-/* magic number for validating output files and checking byte order */
-#define CP_MAGIC_NR 6567223
-
-/* size (in bytes) of job record */
-#define CP_JOB_RECORD_SIZE 4096
-
-/* max length of exe string within job record (not counting '\0') */
-#define CP_EXE_LEN (CP_JOB_RECORD_SIZE - sizeof(struct darshan_job) - 1)
-
-typedef uint64_t darshan_record_id;
-
-enum darshan_comp_type
-{
- DARSHAN_GZ_COMP,
- DARSHAN_BZ2_COMP,
-};
-
-struct darshan_header
-{
- char version_string[8];
- int64_t magic_nr;
- uint8_t comp_type;
- uint8_t mod_count;
-};
-
-struct darshan_record
-{
- char* name;
- darshan_record_id id;
-};
-
-/* statistics for the job as a whole */
-#define DARSHAN_JOB_METADATA_LEN 1024 /* including null terminator! */
-struct darshan_job
-{
- int64_t uid;
- int64_t start_time;
- int64_t end_time;
- int64_t nprocs;
- int64_t jobid;
- char metadata[DARSHAN_JOB_METADATA_LEN]; /* TODO: what is this? */
-};
-
-/*** POSIX MODULE DATA STRUCTURES START */
-
-/* TODO: where do these file record structs go? */
/* TODO: DARSHAN_* OR CP_* */
enum darshan_posix_indices
{
@@ -184,6 +125,4 @@ struct darshan_posix_file
double fcounters[CP_F_NUM_INDICES];
};
-/*** POSIX MODULE DATA STRUCTURES END */
-
-#endif /* __DARSHAN_LOG_FORMAT_H */
+#endif /* __DARSHAN_POSIX_LOG_FORMAT_H */
diff --git a/darshan-runtime/lib/darshan-posix.c b/darshan-runtime/lib/darshan-posix.c
index 9136d37..269b8ab 100644
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -27,6 +27,7 @@
#include "uthash.h"
#include "darshan.h"
+#include "darshan-posix-log-format.h"
#ifndef HAVE_OFF64_T
typedef int64_t off64_t;
diff --git a/darshan-util/darshan-logutils.h b/darshan-util/darshan-logutils.h
index 82043d8..07c92a5 100644
--- a/darshan-util/darshan-logutils.h
+++ b/darshan-util/darshan-logutils.h
@@ -6,7 +6,8 @@
#ifndef __DARSHAN_LOG_UTILS_H
#define __DARSHAN_LOG_UTILS_H
-#include <darshan-log-format.h>
+#include "darshan-log-format.h"
+#include "darshan-posix-log-format.h"
#include "uthash-1.9.2/src/uthash.h"
typedef struct darshan_fd_s* darshan_fd;
diff --git a/darshan-util/darshan-posix-parser.c b/darshan-util/darshan-posix-parser.c
index 9240f04..a5def34 100644
--- a/darshan-util/darshan-posix-parser.c
+++ b/darshan-util/darshan-posix-parser.c
@@ -22,12 +22,14 @@ int main(int argc, char **argv)
{
int ret;
char *filename;
+ char tmp_string[4096];
darshan_fd file;
struct darshan_header header;
struct darshan_job job;
struct darshan_record_ref *rec_map = NULL;
struct darshan_record_ref *ref, *tmp;
struct darshan_posix_file next_rec;
+ time_t tmp_time = 0;
assert(argc == 2);
filename = argv[1];
@@ -35,11 +37,6 @@ int main(int argc, char **argv)
struct stat sbuf;
stat(filename, &sbuf);
- printf("\nDarshan log file size: %"PRId64"\n", sbuf.st_size);
- printf("size of header: %"PRId64"\n", sizeof(struct darshan_header));
- printf("size of index map: %"PRId64"\n", 2*sizeof(int64_t));
- printf("size of job data: %"PRId64"\n", sizeof(struct darshan_job));
-
file = darshan_log_open(filename, "r");
if(!file)
{
@@ -47,7 +44,7 @@ int main(int argc, char **argv)
return(-1);
}
- /* read the log header */
+ /* read darshan log header */
ret = darshan_log_getheader(file, &header);
if(ret < 0)
{
@@ -56,11 +53,7 @@ int main(int argc, char **argv)
return(-1);
}
- printf("\n*** HEADER DATA ***\n");
- printf("\tver=%s\n\tmagic_nr=%"PRId64"\n\tcomp_type=%d\n\tmod_count=%d\n",
- header.version_string, header.magic_nr, header.comp_type, header.mod_count);
-
- /* read job info */
+ /* read darshan job info */
ret = darshan_log_getjob(file, &job);
if(ret < 0)
{
@@ -69,10 +62,22 @@ int main(int argc, char **argv)
return(-1);
}
- printf("\n*** JOB DATA ***\n");
- printf(
- "\tuid=%"PRId64"\n\tstart_time=%"PRId64"\n\tend_time=%"PRId64"\n\tnprocs=%"PRId64"\n\tjobid=%"PRId64"\n",
- job.uid, job.start_time, job.end_time, job.nprocs, job.jobid);
+ /* print job summary */
+ printf("# darshan log version: %s\n", header.version_string);
+ printf("# size of POSIX file statistics: %zu bytes\n", sizeof(next_rec));
+ printf("# size of job statistics: %zu bytes\n", sizeof(job));
+ printf("# exe: %s\n", tmp_string);
+ printf("# uid: %" PRId64 "\n", job.uid);
+ printf("# jobid: %" PRId64 "\n", job.jobid);
+ printf("# start_time: %" PRId64 "\n", job.start_time);
+ tmp_time += job.start_time;
+ printf("# start_time_asci: %s", ctime(&tmp_time));
+ printf("# end_time: %" PRId64 "\n", job.end_time);
+ tmp_time = 0;
+ tmp_time += job.end_time;
+ printf("# end_time_asci: %s", ctime(&tmp_time));
+ printf("# nprocs: %" PRId64 "\n", job.nprocs);
+ printf("# run time: %" PRId64 "\n", job.end_time - job.start_time + 1);
/* read record map */
ret = darshan_log_getmap(file, &rec_map);
@@ -111,6 +116,8 @@ int main(int argc, char **argv)
printf("\tRecord %d: id=%"PRIu64" (path=%s, rank=%"PRId64")\n",
i, next_rec.f_id, ref->rec.name, next_rec.rank);
+ printf("\t\tPOSIX_OPENS:\t%"PRIu64"\n\t\tF_OPEN_TIMESTAMP:\t%lf\n",
+ next_rec.counters[CP_POSIX_OPENS], next_rec.fcounters[CP_F_OPEN_TIMESTAMP]);
i++;
} while((ret = darshan_log_getfile(file, &next_rec)) == 1);
diff --git a/doc/darshan-dev-status.txt b/doc/darshan-dev-status.txt
new file mode 100644
index 0000000..b0c9b52
--- /dev/null
+++ b/doc/darshan-dev-status.txt
@@ -0,0 +1,37 @@
+Darshan-modular branch development notes
+========================================
+
+== Introduction
+
+Darshan-modular is the new implementation of Darshan (version >= 3.0.0), a lightweight
+toolkit for characterizing the I/O performance of instrumented HPC applications.
+
+Previously, Darshan had been designed to gather I/O data from a static set of sources.
+Adding instrumentation for additional sources of I/O data was only possible through
+manual modification of the Darshan log file format, which consequentially breaks
+other utilities reliant on that format.
+
+Darshan-modular is differentiated from previous versions in that it modularizes the Darshan
+runtime environment and log file format such that new "instrumentation modules" can be
+added without breaking existing tools. Essentially, developers are given a framework to
+implement arbitrary modules, which are responsible for gathering I/O data from a specific
+system component (which could be from an I/O library, platform-specific data, etc.). Darshan
+can then manage these modules and create a valid Darshan log regardless of how many or what
+types of modules are used.
+
+== Status
+
+=== Runtime status
+
+Text.
+
+=== Util status
+
+Text.
+
+=== Counters status
+
+Text.
+
+== Adding new modules
+
diff --git a/darshan-modularization-design-notes.txt b/doc/darshan-modularization-design-notes.txt
similarity index 95%
rename from darshan-modularization-design-notes.txt
rename to doc/darshan-modularization-design-notes.txt
index ef3f74e..4a6ace8 100644
--- a/darshan-modularization-design-notes.txt
+++ b/doc/darshan-modularization-design-notes.txt
@@ -115,11 +115,11 @@ TODO NOTES:
- why are darshan mutexes recursive?
- how do we allow modules to specify there necessary linker/wrapper flags
- configurable amount of max runtime memory
- - how do we associate handles with file/object records?
- - easily doable within module, but can we refactor and make this common code?
- fs mount information -- should we export this info from darshan-core?
- would the posix module be the only one to leverage this info?
- it is used to correlate filenames with mount points, but not sure what is needed where
- test fortran and c apps to make sure command line args are handled properly (see email with Phil 11/4)
- - how do we abstract shared file reduction so each module doesn't completely reimplement?
- when is DARSHAN_MPI_CALL macro needed? All MPI functions, or just those intercepted by darshan?
+ - darshan link order causes issues when compiling mpi-io-test -- had to add extra -lmpi to resolve
+ - is there more coordination between core and modules for shared file reductions?
+ - do we change darshan file extension (.dz? .darshan?)
hooks/post-receive
--
More information about the Darshan-commits
mailing list