darshan-mpiio-log-format.h 4.98 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 2
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
    /* 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 */\
    X(MPIIO_F_OPEN_TIMESTAMP) \
    /* timestamp of first read */\
    X(MPIIO_F_READ_START_TIMESTAMP) \
    /* timestamp of first write */\
    X(MPIIO_F_WRITE_START_TIMESTAMP) \
    /* timestamp of last read */\
    X(MPIIO_F_READ_END_TIMESTAMP) \
    /* timestamp of last write */\
    X(MPIIO_F_WRITE_END_TIMESTAMP) \
    /* timestamp of last close */\
    X(MPIIO_F_CLOSE_TIMESTAMP) \
    /* 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) \
119 120 121 122
    /* 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) \
123 124 125 126 127
    /* end of counters*/\
    X(MPIIO_F_NUM_INDICES)

#define X(a) a,
/* integer statistics for MPI-IO file records */
128 129
enum darshan_mpiio_indices
{
130
    MPIIO_COUNTERS
131 132
};

133
/* floating point statistics for MPI-IO file records */
134 135
enum darshan_mpiio_f_indices
{
136
    MPIIO_F_COUNTERS
137
};
138
#undef X
139

140 141 142
/* 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:
143
 *      - a darshan_base_record structure, which contains the record id & rank
144 145 146
 *      - integer file I/O statistics (open, read/write counts, etc)
 *      - floating point I/O statistics (timestamps, cumulative timers, etc.)
 */
147 148
struct darshan_mpiio_file
{
149
    struct darshan_base_record base_rec;
150 151
    int64_t counters[MPIIO_NUM_INDICES];
    double fcounters[MPIIO_F_NUM_INDICES];
152 153 154
};

#endif /* __DARSHAN_MPIIO_LOG_FORMAT_H */