darshan-mpiio-log-format.h 5.13 KB
Newer Older
1
/*
2 3 4
 * Copyright (C) 2015 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
5 6 7 8 9
 */

#ifndef __DARSHAN_MPIIO_LOG_FORMAT_H
#define __DARSHAN_MPIIO_LOG_FORMAT_H

10
/* current MPI-IO log format version */
11
#define DARSHAN_MPIIO_VER 3
12

13
/* TODO: maybe use a counter to track cases in which a derived datatype is used? */
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

#define MPIIO_COUNTERS \
    /* count of MPI independent opens */\
    X(MPIIO_INDEP_OPENS) \
    /* count of MPI collective opens */\
    X(MPIIO_COLL_OPENS) \
    /* count of MPI independent reads */\
    X(MPIIO_INDEP_READS) \
    /* count of MPI independent writes */\
    X(MPIIO_INDEP_WRITES) \
    /* count of MPI collective reads */\
    X(MPIIO_COLL_READS) \
    /* count of MPI collective writes */\
    X(MPIIO_COLL_WRITES) \
    /* count of MPI split collective reads */\
    X(MPIIO_SPLIT_READS) \
    /* count of MPI split collective writes */\
    X(MPIIO_SPLIT_WRITES) \
    /* count of MPI nonblocking reads */\
    X(MPIIO_NB_READS) \
    /* count of MPI nonblocking writes */\
    X(MPIIO_NB_WRITES) \
    /* count of MPI file syncs */\
    X(MPIIO_SYNCS) \
    /* count of MPI hints used */\
    X(MPIIO_HINTS) \
    /* count of MPI set view calls */\
    X(MPIIO_VIEWS) \
42 43
    /* MPI-IO access mode of the file */\
    X(MPIIO_MODE) \
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
    /* total bytes read at MPI-IO layer */\
    X(MPIIO_BYTES_READ) \
    /* total bytes written at MPI-IO layer */\
    X(MPIIO_BYTES_WRITTEN) \
    /* number of times switching between MPI read and write */\
    X(MPIIO_RW_SWITCHES) \
    /* sizes of the maximum read/write operations */\
    X(MPIIO_MAX_READ_TIME_SIZE) \
    X(MPIIO_MAX_WRITE_TIME_SIZE) \
    /* buckets for MPI read size ranges */\
    X(MPIIO_SIZE_READ_AGG_0_100) \
    X(MPIIO_SIZE_READ_AGG_100_1K) \
    X(MPIIO_SIZE_READ_AGG_1K_10K) \
    X(MPIIO_SIZE_READ_AGG_10K_100K) \
    X(MPIIO_SIZE_READ_AGG_100K_1M) \
    X(MPIIO_SIZE_READ_AGG_1M_4M) \
    X(MPIIO_SIZE_READ_AGG_4M_10M) \
    X(MPIIO_SIZE_READ_AGG_10M_100M) \
    X(MPIIO_SIZE_READ_AGG_100M_1G) \
    X(MPIIO_SIZE_READ_AGG_1G_PLUS) \
    /* buckets for MPI write size ranges */\
    X(MPIIO_SIZE_WRITE_AGG_0_100) \
    X(MPIIO_SIZE_WRITE_AGG_100_1K) \
    X(MPIIO_SIZE_WRITE_AGG_1K_10K) \
    X(MPIIO_SIZE_WRITE_AGG_10K_100K) \
    X(MPIIO_SIZE_WRITE_AGG_100K_1M) \
    X(MPIIO_SIZE_WRITE_AGG_1M_4M) \
    X(MPIIO_SIZE_WRITE_AGG_4M_10M) \
    X(MPIIO_SIZE_WRITE_AGG_10M_100M) \
    X(MPIIO_SIZE_WRITE_AGG_100M_1G) \
    X(MPIIO_SIZE_WRITE_AGG_1G_PLUS) \
75 76 77 78 79 80 81 82 83 84
    /* the four most frequently appearing MPI access sizes */\
    X(MPIIO_ACCESS1_ACCESS) \
    X(MPIIO_ACCESS2_ACCESS) \
    X(MPIIO_ACCESS3_ACCESS) \
    X(MPIIO_ACCESS4_ACCESS) \
    /* count of each of the most frequent MPI access sizes */\
    X(MPIIO_ACCESS1_COUNT) \
    X(MPIIO_ACCESS2_COUNT) \
    X(MPIIO_ACCESS3_COUNT) \
    X(MPIIO_ACCESS4_COUNT) \
85 86 87 88 89 90 91 92 93 94
    /* rank and number of bytes moved for fastest/slowest ranks */\
    X(MPIIO_FASTEST_RANK) \
    X(MPIIO_FASTEST_RANK_BYTES) \
    X(MPIIO_SLOWEST_RANK) \
    X(MPIIO_SLOWEST_RANK_BYTES) \
    /* end of counters */\
    X(MPIIO_NUM_INDICES)

#define MPIIO_F_COUNTERS \
    /* timestamp of first open */\
95
    X(MPIIO_F_OPEN_START_TIMESTAMP) \
96 97 98 99
    /* timestamp of first read */\
    X(MPIIO_F_READ_START_TIMESTAMP) \
    /* timestamp of first write */\
    X(MPIIO_F_WRITE_START_TIMESTAMP) \
100 101 102 103
    /* timestamp of first close */\
    X(MPIIO_F_CLOSE_START_TIMESTAMP) \
    /* timestamp of last open */\
    X(MPIIO_F_OPEN_END_TIMESTAMP) \
104 105 106 107 108
    /* timestamp of last read */\
    X(MPIIO_F_READ_END_TIMESTAMP) \
    /* timestamp of last write */\
    X(MPIIO_F_WRITE_END_TIMESTAMP) \
    /* timestamp of last close */\
109
    X(MPIIO_F_CLOSE_END_TIMESTAMP) \
110 111 112 113 114 115 116 117 118 119 120 121 122
    /* cumulative MPI-IO read time */\
    X(MPIIO_F_READ_TIME) \
    /* cumulative MPI-IO write time */\
    X(MPIIO_F_WRITE_TIME) \
    /* cumulative MPI-IO meta time */\
    X(MPIIO_F_META_TIME) \
    /* maximum MPI-IO read duration */\
    X(MPIIO_F_MAX_READ_TIME) \
    /* maximum MPI-IO write duration */\
    X(MPIIO_F_MAX_WRITE_TIME) \
    /* total i/o and meta time for fastest/slowest ranks */\
    X(MPIIO_F_FASTEST_RANK_TIME) \
    X(MPIIO_F_SLOWEST_RANK_TIME) \
123 124 125 126
    /* variance of total i/o time and bytes moved across all ranks */\
    /* NOTE: for shared records only */\
    X(MPIIO_F_VARIANCE_RANK_TIME) \
    X(MPIIO_F_VARIANCE_RANK_BYTES) \
127 128 129 130 131
    /* end of counters*/\
    X(MPIIO_F_NUM_INDICES)

#define X(a) a,
/* integer statistics for MPI-IO file records */
132 133
enum darshan_mpiio_indices
{
134
    MPIIO_COUNTERS
135 136
};

137
/* floating point statistics for MPI-IO file records */
138 139
enum darshan_mpiio_f_indices
{
140
    MPIIO_F_COUNTERS
141
};
142
#undef X
143

144 145 146
/* file record structure for MPI-IO files. a record is created and stored for
 * every MPI-IO file opened by the original application. For the MPI-IO module,
 * the record includes:
147
 *      - a darshan_base_record structure, which contains the record id & rank
148 149 150
 *      - integer file I/O statistics (open, read/write counts, etc)
 *      - floating point I/O statistics (timestamps, cumulative timers, etc.)
 */
151 152
struct darshan_mpiio_file
{
153
    struct darshan_base_record base_rec;
154 155
    int64_t counters[MPIIO_NUM_INDICES];
    double fcounters[MPIIO_F_NUM_INDICES];
156 157 158
};

#endif /* __DARSHAN_MPIIO_LOG_FORMAT_H */