diff --git a/darshan-runtime/lib/darshan-hdf5.c b/darshan-runtime/lib/darshan-hdf5.c index e27f07387e0d3928947b616e4a0976c4a1dda152..50a77bd5488343644e9224dc131d0672b0f2cafe 100644 --- a/darshan-runtime/lib/darshan-hdf5.c +++ b/darshan-runtime/lib/darshan-hdf5.c @@ -115,7 +115,8 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, file = hdf5_file_by_name_sethid(filename, ret); if(file) { - if(file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] == 0) + if(file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] == 0 || + file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] > tm1) file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] = tm1; file->file_record->counters[HDF5_OPENS] += 1; } @@ -154,7 +155,8 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, file = hdf5_file_by_name_sethid(filename, ret); if(file) { - if(file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] == 0) + if(file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] == 0 || + file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] > tm1) file->file_record->fcounters[HDF5_F_OPEN_TIMESTAMP] = tm1; file->file_record->counters[HDF5_OPENS] += 1; } diff --git a/darshan-runtime/lib/darshan-mpiio.c b/darshan-runtime/lib/darshan-mpiio.c index 5d60e2bb457f6d05a4834189ebd9075f6c95e5ab..e946415c1c099acb231c871c46b82812a6c1cfd3 100644 --- a/darshan-runtime/lib/darshan-mpiio.c +++ b/darshan-runtime/lib/darshan-mpiio.c @@ -151,7 +151,8 @@ static void mpiio_shutdown(void); file->file_record->counters[MPIIO_COLL_OPENS] += 1; \ if(__info != MPI_INFO_NULL) \ file->file_record->counters[MPIIO_HINTS] += 1; \ - if(file->file_record->fcounters[MPIIO_F_OPEN_TIMESTAMP] == 0) \ + if(file->file_record->fcounters[MPIIO_F_OPEN_TIMESTAMP] == 0 || \ + file->file_record->fcounters[MPIIO_F_OPEN_TIMESTAMP] > __tm1) \ file->file_record->fcounters[MPIIO_F_OPEN_TIMESTAMP] = __tm1; \ DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[MPIIO_F_META_TIME], __tm1, __tm2, file->last_meta_end); \ } while(0) diff --git a/darshan-runtime/lib/darshan-pnetcdf.c b/darshan-runtime/lib/darshan-pnetcdf.c index a0a6344220b3916effda1a0f32e5ddbb57a1a6f1..4b52ec461253778feb12aa308fe10f09fd7fac00 100644 --- a/darshan-runtime/lib/darshan-pnetcdf.c +++ b/darshan-runtime/lib/darshan-pnetcdf.c @@ -112,7 +112,8 @@ int DARSHAN_DECL(ncmpi_create)(MPI_Comm comm, const char *path, file = pnetcdf_file_by_name_setncid(path, (*ncidp)); if(file) { - if(file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] == 0) + if(file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] == 0 || + file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] > tm1) file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] = tm1; DARSHAN_MPI_CALL(PMPI_Comm_size)(comm, &comm_size); if(comm_size == 1) @@ -160,7 +161,8 @@ int DARSHAN_DECL(ncmpi_open)(MPI_Comm comm, const char *path, file = pnetcdf_file_by_name_setncid(path, (*ncidp)); if(file) { - if(file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] == 0) + if(file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] == 0 || + file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] > tm1) file->file_record->fcounters[PNETCDF_F_OPEN_TIMESTAMP] = tm1; DARSHAN_MPI_CALL(PMPI_Comm_size)(comm, &comm_size); if(comm_size == 1) diff --git a/darshan-runtime/lib/darshan-posix.c b/darshan-runtime/lib/darshan-posix.c index dd637c4140ed10c15d0b6e7afd87e0bb8a5c9ea2..b83957a1167689b80f2391f7b844d4af95c3e153 100644 --- a/darshan-runtime/lib/darshan-posix.c +++ b/darshan-runtime/lib/darshan-posix.c @@ -226,7 +226,8 @@ static void posix_shutdown(void); file->file_record->counters[POSIX_FOPENS] += 1; \ else \ file->file_record->counters[POSIX_OPENS] += 1; \ - if(file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] == 0) \ + if(file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] == 0 || \ + file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] > __tm1) \ file->file_record->fcounters[POSIX_F_OPEN_TIMESTAMP] = __tm1; \ DARSHAN_TIMER_INC_NO_OVERLAP(file->file_record->fcounters[POSIX_F_META_TIME], __tm1, __tm2, file->last_meta_end); \ } while(0)