Commit 2faf2460 authored by Philip Carns's avatar Philip Carns

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
parent f88ebef6
...@@ -173,7 +173,8 @@ static void mpiio_shutdown(void); ...@@ -173,7 +173,8 @@ static void mpiio_shutdown(void);
if(file->last_io_type == DARSHAN_IO_WRITE) \ if(file->last_io_type == DARSHAN_IO_WRITE) \
file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \ file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \
file->last_io_type = DARSHAN_IO_READ; \ 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_START_TIMESTAMP] = __tm1; \
file->file_record->fcounters[MPIIO_F_READ_END_TIMESTAMP] = __tm2; \ file->file_record->fcounters[MPIIO_F_READ_END_TIMESTAMP] = __tm2; \
if(file->file_record->fcounters[MPIIO_F_MAX_READ_TIME] < __elapsed) { \ if(file->file_record->fcounters[MPIIO_F_MAX_READ_TIME] < __elapsed) { \
...@@ -198,7 +199,8 @@ static void mpiio_shutdown(void); ...@@ -198,7 +199,8 @@ static void mpiio_shutdown(void);
if(file->last_io_type == DARSHAN_IO_READ) \ if(file->last_io_type == DARSHAN_IO_READ) \
file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \ file->file_record->counters[MPIIO_RW_SWITCHES] += 1; \
file->last_io_type = DARSHAN_IO_WRITE; \ 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_START_TIMESTAMP] = __tm1; \
file->file_record->fcounters[MPIIO_F_WRITE_END_TIMESTAMP] = __tm2; \ file->file_record->fcounters[MPIIO_F_WRITE_END_TIMESTAMP] = __tm2; \
if(file->file_record->fcounters[MPIIO_F_MAX_WRITE_TIME] < __elapsed) { \ if(file->file_record->fcounters[MPIIO_F_MAX_WRITE_TIME] < __elapsed) { \
......
...@@ -274,7 +274,8 @@ static void posix_shutdown(void); ...@@ -274,7 +274,8 @@ static void posix_shutdown(void);
if(file->last_io_type == DARSHAN_IO_WRITE) \ if(file->last_io_type == DARSHAN_IO_WRITE) \
file->file_record->counters[POSIX_RW_SWITCHES] += 1; \ file->file_record->counters[POSIX_RW_SWITCHES] += 1; \
file->last_io_type = DARSHAN_IO_READ; \ 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_START_TIMESTAMP] = __tm1; \
file->file_record->fcounters[POSIX_F_READ_END_TIMESTAMP] = __tm2; \ file->file_record->fcounters[POSIX_F_READ_END_TIMESTAMP] = __tm2; \
if(file->file_record->fcounters[POSIX_F_MAX_READ_TIME] < __elapsed) { \ if(file->file_record->fcounters[POSIX_F_MAX_READ_TIME] < __elapsed) { \
...@@ -325,7 +326,8 @@ static void posix_shutdown(void); ...@@ -325,7 +326,8 @@ static void posix_shutdown(void);
if(file->last_io_type == DARSHAN_IO_READ) \ if(file->last_io_type == DARSHAN_IO_READ) \
file->file_record->counters[POSIX_RW_SWITCHES] += 1; \ file->file_record->counters[POSIX_RW_SWITCHES] += 1; \
file->last_io_type = DARSHAN_IO_WRITE; \ 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_START_TIMESTAMP] = __tm1; \
file->file_record->fcounters[POSIX_F_WRITE_END_TIMESTAMP] = __tm2; \ file->file_record->fcounters[POSIX_F_WRITE_END_TIMESTAMP] = __tm2; \
if(file->file_record->fcounters[POSIX_F_MAX_WRITE_TIME] < __elapsed) { \ if(file->file_record->fcounters[POSIX_F_MAX_WRITE_TIME] < __elapsed) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment