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

#ifndef __DARSHAN_PNETCDF_LOG_FORMAT_H
#define __DARSHAN_PNETCDF_LOG_FORMAT_H

10
/* current PNETCDF log format version */
11
#define DARSHAN_PNETCDF_VER 2
12 13 14 15 16 17 18 19 20 21 22

#define PNETCDF_COUNTERS \
    /* count of PNETCDF independent opens */\
    X(PNETCDF_INDEP_OPENS) \
    /* count of PNETCDF collective opens */\
    X(PNETCDF_COLL_OPENS) \
    /* end of counters */\
    X(PNETCDF_NUM_INDICES)

#define PNETCDF_F_COUNTERS \
    /* timestamp of first open */\
23 24 25 26 27
    X(PNETCDF_F_OPEN_START_TIMESTAMP) \
    /* timestamp of first close */\
    X(PNETCDF_F_CLOSE_START_TIMESTAMP) \
    /* timestamp of last open */\
    X(PNETCDF_F_OPEN_END_TIMESTAMP) \
28
    /* timestamp of last close */\
29
    X(PNETCDF_F_CLOSE_END_TIMESTAMP) \
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    /* end of counters*/\
    X(PNETCDF_F_NUM_INDICES)

#define X(a) a,
/* integer statistics for PNETCDF file records */
enum darshan_pnetcdf_indices
{
    PNETCDF_COUNTERS
};

/* floating point statistics for PNETCDF file records */
enum darshan_pnetcdf_f_indices
{
    PNETCDF_F_COUNTERS
};
#undef X

/* file record structure for PNETCDF files. a record is created and stored for
 * every PNETCDF file opened by the original application. For the PNETCDF module,
 * the record includes:
50
 *      - a darshan_base_record structure, which contains the record id & rank
51 52 53 54 55
 *      - integer file I/O statistics (open, read/write counts, etc)
 *      - floating point I/O statistics (timestamps, cumulative timers, etc.)
 */
struct darshan_pnetcdf_file
{
56
    struct darshan_base_record base_rec;
57 58 59 60 61
    int64_t counters[PNETCDF_NUM_INDICES];
    double fcounters[PNETCDF_F_NUM_INDICES];
};

#endif /* __DARSHAN_PNETCDF_LOG_FORMAT_H */