Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sudheer Chunduri
darshan
Commits
d2776592
Commit
d2776592
authored
Jul 14, 2015
by
Shane Snyder
Browse files
more mpiio counters
parent
53fa81e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
darshan-runtime/darshan.h
View file @
d2776592
...
...
@@ -172,6 +172,12 @@ struct darshan_module_funcs
);
};
enum
darshan_io_type
{
DARSHAN_IO_READ
=
1
,
DARSHAN_IO_WRITE
=
2
,
};
/* paths that darshan will not trace */
extern
char
*
darshan_path_exclusions
[];
/* defined in lib/darshan-core.c */
...
...
darshan-runtime/lib/darshan-mpiio.c
View file @
d2776592
...
...
@@ -56,6 +56,7 @@
struct
mpiio_file_runtime
{
struct
darshan_mpiio_file
*
file_record
;
enum
darshan_io_type
last_io_type
;
double
last_meta_end
;
double
last_read_end
;
double
last_write_end
;
...
...
@@ -136,41 +137,52 @@ static void mpiio_shutdown(void);
#define MPIIO_RECORD_READ(__ret, __fh, __count, __datatype, __counter, __tm1, __tm2) do { \
struct mpiio_file_runtime* file; \
int size = 0; \
MPI_Aint extent = 0
; \
double __elapsed = __tm2-__tm1
; \
if(__ret != MPI_SUCCESS) break; \
file = mpiio_file_by_fh(__fh); \
if(!file) break; \
DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size); \
size = size * __count; \
DARSHAN_MPI_CALL(PMPI_Type_extent)(__datatype, &extent); \
DARSHAN_BUCKET_INC(file->file_record, MPIIO_SIZE_READ_AGG_0_100, size); \
DARSHAN_
BUCKET
_INC(file->file_record, MPIIO_
EXTENT_READ_0_100, extent
); \
DARSHAN_
COUNTER
_INC(file->file_record, MPIIO_
BYTES_READ, size
); \
DARSHAN_COUNTER_INC(file->file_record, __counter, 1); \
if(file->last_io_type == DARSHAN_IO_WRITE) \
DARSHAN_COUNTER_INC(file->file_record, MPIIO_RW_SWITCHES, 1); \
file->last_io_type = DARSHAN_IO_READ; \
DARSHAN_COUNTER_F_INC_NO_OVERLAP(file->file_record, __tm1, __tm2, \
file->last_read_end, MPIIO_F_READ_TIME); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, MPIIO_F_READ_START_TIMESTAMP) == 0) \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_READ_START_TIMESTAMP, __tm1); \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_READ_END_TIMESTAMP, __tm2); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, MPIIO_F_MAX_READ_TIME) < __elapsed) { \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_MAX_READ_TIME, __elapsed); \
DARSHAN_COUNTER_SET(file->file_record, MPIIO_MAX_READ_TIME_SIZE, size); } \
} while(0)
#define MPIIO_RECORD_WRITE(__ret, __fh, __count, __datatype, __counter, __tm1, __tm2) do { \
struct mpiio_file_runtime* file; \
int size = 0; \
MPI_Aint extent = 0; \
double __elapsed = __tm2-__tm1; \
if(__ret != MPI_SUCCESS) break; \
if(__ret != MPI_SUCCESS) break; \
file = mpiio_file_by_fh(__fh); \
if(!file) break; \
DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size); \
size = size * __count; \
DARSHAN_MPI_CALL(PMPI_Type_extent)(__datatype, &extent); \
DARSHAN_BUCKET_INC(file->file_record, MPIIO_SIZE_WRITE_AGG_0_100, size); \
DARSHAN_
BUCKET
_INC(file->file_record, MPIIO_
EXTENT_WRITE_0_100, extent
); \
DARSHAN_
COUNTER
_INC(file->file_record, MPIIO_
BYTES_WRITTEN, size
); \
DARSHAN_COUNTER_INC(file->file_record, __counter, 1); \
if(file->last_io_type == DARSHAN_IO_READ) \
DARSHAN_COUNTER_INC(file->file_record, MPIIO_RW_SWITCHES, 1); \
file->last_io_type = DARSHAN_IO_WRITE; \
DARSHAN_COUNTER_F_INC_NO_OVERLAP(file->file_record, __tm1, __tm2, \
file->last_write_end, MPIIO_F_WRITE_TIME); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, MPIIO_F_WRITE_START_TIMESTAMP) == 0) \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_WRITE_START_TIMESTAMP, __tm1); \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_WRITE_END_TIMESTAMP, __tm2); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, MPIIO_F_MAX_WRITE_TIME) < __elapsed) { \
DARSHAN_COUNTER_F_SET(file->file_record, MPIIO_F_MAX_WRITE_TIME, __elapsed); \
DARSHAN_COUNTER_SET(file->file_record, MPIIO_MAX_WRITE_TIME_SIZE, size); } \
} while(0)
/**********************************************************
...
...
darshan-runtime/lib/darshan-posix.c
View file @
d2776592
...
...
@@ -96,12 +96,6 @@ DARSHAN_FORWARD_DECL(lio_listio64, int, (int mode, struct aiocb64 *const aiocb_l
*/
#define POSIX_MAX_ACCESS_COUNT_RUNTIME 32
enum
posix_io_type
{
POSIX_READ
=
1
,
POSIX_WRITE
=
2
,
};
enum
posix_counter_type
{
POSIX_COUNTER_ACCESS
,
...
...
@@ -151,7 +145,7 @@ struct posix_file_runtime
int64_t
offset
;
int64_t
last_byte_read
;
int64_t
last_byte_written
;
enum
posix
_io_type
last_io_type
;
enum
darshan
_io_type
last_io_type
;
double
last_meta_end
;
double
last_read_end
;
double
last_write_end
;
...
...
@@ -336,9 +330,9 @@ static void posix_shutdown(void);
file_alignment = DARSHAN_COUNTER_VALUE(file->file_record, POSIX_FILE_ALIGNMENT); \
if(file_alignment > 0 && (this_offset % file_alignment) != 0) \
DARSHAN_COUNTER_INC(file->file_record, POSIX_FILE_NOT_ALIGNED, 1); \
if(file->last_io_type ==
POSIX
_WRITE) \
if(file->last_io_type ==
DARSHAN_IO
_WRITE) \
DARSHAN_COUNTER_INC(file->file_record, POSIX_RW_SWITCHES, 1); \
file->last_io_type =
POSIX
_READ; \
file->last_io_type =
DARSHAN_IO
_READ; \
DARSHAN_COUNTER_F_INC_NO_OVERLAP(file->file_record, __tm1, __tm2, file->last_read_end, POSIX_F_READ_TIME); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, POSIX_F_READ_START_TIMESTAMP) == 0) \
DARSHAN_COUNTER_F_SET(file->file_record, POSIX_F_READ_START_TIMESTAMP, __tm1); \
...
...
@@ -386,9 +380,9 @@ static void posix_shutdown(void);
file_alignment = DARSHAN_COUNTER_VALUE(file->file_record, POSIX_FILE_ALIGNMENT); \
if(file_alignment > 0 && (this_offset % file_alignment) != 0) \
DARSHAN_COUNTER_INC(file->file_record, POSIX_FILE_NOT_ALIGNED, 1); \
if(file->last_io_type ==
POSIX
_READ) \
if(file->last_io_type ==
DARSHAN_IO
_READ) \
DARSHAN_COUNTER_INC(file->file_record, POSIX_RW_SWITCHES, 1); \
file->last_io_type =
POSIX
_WRITE; \
file->last_io_type =
DARSHAN_IO
_WRITE; \
DARSHAN_COUNTER_F_INC_NO_OVERLAP(file->file_record, __tm1, __tm2, file->last_write_end, POSIX_F_WRITE_TIME); \
if(DARSHAN_COUNTER_F_VALUE(file->file_record, POSIX_F_WRITE_START_TIMESTAMP) == 0) \
DARSHAN_COUNTER_F_SET(file->file_record, POSIX_F_WRITE_START_TIMESTAMP, __tm1); \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment