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

change open timestamp behavior


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@898 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 74f98569
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
Darshan Release Change Log Darshan Release Change Log
-------------------------- --------------------------
darshan-2.3.1-pre1
=============
* Change OPEN_TIMESTAMP field to report timestamp right before open() is
invoked rather than after timestamp after open is completed
darshan-2.3.0 darshan-2.3.0
============= =============
* Fix incorrect version numbering in darshan-runtime component of Darshan * Fix incorrect version numbering in darshan-runtime component of Darshan
......
...@@ -60,9 +60,11 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, ...@@ -60,9 +60,11 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
int ret; int ret;
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
double tm1;
MAP_OR_FAIL(H5Fcreate); MAP_OR_FAIL(H5Fcreate);
tm1 = darshan_wtime();
ret = __real_H5Fcreate(filename, flags, create_plist, access_plist); ret = __real_H5Fcreate(filename, flags, create_plist, access_plist);
if(ret >= 0) if(ret >= 0)
{ {
...@@ -82,7 +84,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, ...@@ -82,7 +84,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
{ {
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); tm1);
CP_INC(file, CP_HDF5_OPENS, 1); CP_INC(file, CP_HDF5_OPENS, 1);
} }
CP_UNLOCK(); CP_UNLOCK();
...@@ -97,9 +99,11 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -97,9 +99,11 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
int ret; int ret;
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
double tm1;
MAP_OR_FAIL(H5Fopen); MAP_OR_FAIL(H5Fopen);
tm1 = darshan_wtime();
ret = __real_H5Fopen(filename, flags, access_plist); ret = __real_H5Fopen(filename, flags, access_plist);
if(ret >= 0) if(ret >= 0)
{ {
...@@ -119,7 +123,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -119,7 +123,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
{ {
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); tm1);
CP_INC(file, CP_HDF5_OPENS, 1); CP_INC(file, CP_HDF5_OPENS, 1);
} }
......
...@@ -711,7 +711,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F ...@@ -711,7 +711,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F
CP_F_INC_NO_OVERLAP(file, tm1, tm2, file->last_mpi_meta_end, CP_F_MPI_META_TIME); CP_F_INC_NO_OVERLAP(file, tm1, tm2, file->last_mpi_meta_end, CP_F_MPI_META_TIME);
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
DARSHAN_MPI_CALL(PMPI_Wtime)()); tm1);
DARSHAN_MPI_CALL(PMPI_Comm_size)(comm, &comm_size); DARSHAN_MPI_CALL(PMPI_Comm_size)(comm, &comm_size);
if(comm_size == 1) if(comm_size == 1)
{ {
......
...@@ -56,9 +56,11 @@ int DARSHAN_DECL(ncmpi_create)(MPI_Comm comm, const char *path, ...@@ -56,9 +56,11 @@ int DARSHAN_DECL(ncmpi_create)(MPI_Comm comm, const char *path,
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
int comm_size; int comm_size;
double tm1;
MAP_OR_FAIL(ncmpi_create); MAP_OR_FAIL(ncmpi_create);
tm1 = darshan_wtime();
ret = __real_ncmpi_create(comm, path, cmode, info, ncidp); ret = __real_ncmpi_create(comm, path, cmode, info, ncidp);
if(ret == 0) if(ret == 0)
{ {
...@@ -78,7 +80,7 @@ int DARSHAN_DECL(ncmpi_create)(MPI_Comm comm, const char *path, ...@@ -78,7 +80,7 @@ int DARSHAN_DECL(ncmpi_create)(MPI_Comm comm, const char *path,
{ {
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); tm1);
PMPI_Comm_size(comm, &comm_size); PMPI_Comm_size(comm, &comm_size);
if(comm_size == 1) if(comm_size == 1)
{ {
...@@ -102,9 +104,11 @@ int DARSHAN_DECL(ncmpi_open)(MPI_Comm comm, const char *path, ...@@ -102,9 +104,11 @@ int DARSHAN_DECL(ncmpi_open)(MPI_Comm comm, const char *path,
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
int comm_size; int comm_size;
double tm1;
MAP_OR_FAIL(ncmpi_open); MAP_OR_FAIL(ncmpi_open);
tm1 = darshan_wtime();
ret = __real_ncmpi_open(comm, path, omode, info, ncidp); ret = __real_ncmpi_open(comm, path, omode, info, ncidp);
if(ret == 0) if(ret == 0)
{ {
...@@ -124,7 +128,7 @@ int DARSHAN_DECL(ncmpi_open)(MPI_Comm comm, const char *path, ...@@ -124,7 +128,7 @@ int DARSHAN_DECL(ncmpi_open)(MPI_Comm comm, const char *path,
{ {
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); tm1);
PMPI_Comm_size(comm, &comm_size); PMPI_Comm_size(comm, &comm_size);
if(comm_size == 1) if(comm_size == 1)
{ {
......
...@@ -325,7 +325,7 @@ static struct darshan_aio_tracker* darshan_aio_tracker_del(int fd, void *aiocbp) ...@@ -325,7 +325,7 @@ static struct darshan_aio_tracker* darshan_aio_tracker_del(int fd, void *aiocbp)
else \ else \
CP_INC(file, CP_POSIX_OPENS, 1); \ CP_INC(file, CP_POSIX_OPENS, 1); \
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) \ if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) \
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, posix_wtime()); \ CP_F_SET(file, CP_F_OPEN_TIMESTAMP, __tm1); \
CP_F_INC_NO_OVERLAP(file, __tm1, __tm2, file->last_posix_meta_end, CP_F_POSIX_META_TIME); \ CP_F_INC_NO_OVERLAP(file, __tm1, __tm2, file->last_posix_meta_end, CP_F_POSIX_META_TIME); \
} while (0) } while (0)
......
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