[Darshan-commits] [Git][darshan/darshan][dev-stdio] 2 commits: possible bug fix to io start timestamps

Philip Carns xgitlab at cels.anl.gov
Sun May 1 08:56:42 CDT 2016


Philip Carns pushed to branch dev-stdio at darshan / darshan


Commits:
2faf2460 by Phil Carns at 2016-05-01T09:55:22-04:00
possible bug fix to io start timestamps

- read and write start timestamps should record start timestamp of first
  read/write to *begin*, not start timestamp of first read/write to
  complete
- mirrors earlier fix to open timestamps

- - - - -
f3b3ba9a by Phil Carns at 2016-05-01T09:56:34-04:00
Merge remote-tracking branch 'origin/master' into dev-stdio

- - - - -


2 changed files:

- darshan-runtime/lib/darshan-mpiio.c
- darshan-runtime/lib/darshan-posix.c


Changes:

=====================================
darshan-runtime/lib/darshan-mpiio.c
=====================================
--- a/darshan-runtime/lib/darshan-mpiio.c
+++ b/darshan-runtime/lib/darshan-mpiio.c
@@ -173,7 +173,8 @@ static void mpiio_shutdown(void);
     if(file->last_io_type == DARSHAN_IO_WRITE) \
         file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \
     file->last_io_type = DARSHAN_IO_READ; \
-    if(file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] == 0) \
+    if(file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] == 0 || \
+     file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] > __tm1) \
         file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] = __tm1; \
     file->file_record->fcounters[MPIIO_F_READ_END_TIMESTAMP] = __tm2; \
     if(file->file_record->fcounters[MPIIO_F_MAX_READ_TIME] < __elapsed) { \
@@ -198,7 +199,8 @@ static void mpiio_shutdown(void);
     if(file->last_io_type == DARSHAN_IO_READ) \
         file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \
     file->last_io_type = DARSHAN_IO_WRITE; \
-    if(file->file_record->fcounters[MPIIO_F_WRITE_START_TIMESTAMP] == 0) \
+    if(file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] == 0 || \
+     file->file_record->fcounters[MPIIO_F_READ_START_TIMESTAMP] > __tm1) \
         file->file_record->fcounters[MPIIO_F_WRITE_START_TIMESTAMP] = __tm1; \
     file->file_record->fcounters[MPIIO_F_WRITE_END_TIMESTAMP] = __tm2; \
     if(file->file_record->fcounters[MPIIO_F_MAX_WRITE_TIME] < __elapsed) { \


=====================================
darshan-runtime/lib/darshan-posix.c
=====================================
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -270,7 +270,8 @@ static void posix_shutdown(void);
     if(file->last_io_type == DARSHAN_IO_WRITE) \
         file->file_record->counters[POSIX_RW_SWITCHES] += 1; \
     file->last_io_type = DARSHAN_IO_READ; \
-    if(file->file_record->fcounters[POSIX_F_READ_START_TIMESTAMP] == 0) \
+    if(file->file_record->fcounters[POSIX_F_READ_START_TIMESTAMP] == 0 || \
+     file->file_record->fcounters[POSIX_F_READ_START_TIMESTAMP] > __tm1) \
         file->file_record->fcounters[POSIX_F_READ_START_TIMESTAMP] = __tm1; \
     file->file_record->fcounters[POSIX_F_READ_END_TIMESTAMP] = __tm2; \
     if(file->file_record->fcounters[POSIX_F_MAX_READ_TIME] < __elapsed) { \
@@ -321,7 +322,8 @@ static void posix_shutdown(void);
     if(file->last_io_type == DARSHAN_IO_READ) \
         file->file_record->counters[POSIX_RW_SWITCHES] += 1; \
     file->last_io_type = DARSHAN_IO_WRITE; \
-    if(file->file_record->fcounters[POSIX_F_WRITE_START_TIMESTAMP] == 0) \
+    if(file->file_record->fcounters[POSIX_F_WRITE_START_TIMESTAMP] == 0 || \
+     file->file_record->fcounters[POSIX_F_WRITE_START_TIMESTAMP] > __tm1) \
         file->file_record->fcounters[POSIX_F_WRITE_START_TIMESTAMP] = __tm1; \
     file->file_record->fcounters[POSIX_F_WRITE_END_TIMESTAMP] = __tm2; \
     if(file->file_record->fcounters[POSIX_F_MAX_WRITE_TIME] < __elapsed) { \



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/7e1b6e9135f92b73d5fdd0cc8bdad42162f18b32...f3b3ba9ad52fa799f559d8113df3860c6e82b442
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160501/a84f04ea/attachment.html>


More information about the Darshan-commits mailing list