darshan-mpiio-logutils.h 921 Bytes
Newer Older
Philip Carns's avatar
Philip Carns committed
1 2 3 4 5 6 7 8 9 10 11 12
/*
 * Copyright (C) 2015 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef __DARSHAN_MPIIO_LOG_UTILS_H
#define __DARSHAN_MPIIO_LOG_UTILS_H

#include "darshan-logutils.h"
#include "darshan-mpiio-log-format.h"

13 14 15
extern char *mpiio_counter_names[];
extern char *mpiio_f_counter_names[];

Philip Carns's avatar
Philip Carns committed
16 17
int darshan_log_get_mpiio_file(darshan_fd fd, struct darshan_mpiio_file *file);

18 19 20 21 22 23 24 25 26 27 28 29
#define MPIIO_COUNTER_PRINT(__file_rec, __counter) do { \
    printf("%" PRId64 "\t%" PRIu64 "\t%s\t%" PRId64 "\n", \
        (__file_rec)->rank, (__file_rec)->f_id, mpiio_counter_names[__counter], \
        (__file_rec)->counters[__counter]); \
} while(0)

#define MPIIO_F_COUNTER_PRINT(__file_rec, __counter) do { \
    printf("%" PRId64 "\t%" PRIu64 "\t%s\t%f\n", \
        (__file_rec)->rank, (__file_rec)->f_id, mpiio_f_counter_names[__counter], \
        (__file_rec)->fcounters[__counter]); \
} while(0)

Philip Carns's avatar
Philip Carns committed
30
#endif