darshan.h 1.14 KB
Newer Older
1 2 3 4 5
/*
 *  (C) 2009 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */

6 7 8 9 10 11 12
#ifndef __DARSHAN_H
#define __DARSHAN_H

#include <unistd.h>
#include <sys/types.h>
#include <stdint.h>
#include <mpi.h>
13

14 15
#include "darshan-log-format.h"

16 17 18 19 20 21 22 23 24 25 26 27
/* Environment variable to override CP_JOBID */
#define CP_JOBID_OVERRIDE "DARSHAN_JOBID"

/* Environment variable to override __CP_LOG_PATH */
#define CP_LOG_PATH_OVERRIDE "DARSHAN_LOGPATH"

/* Environment variable to override __CP_LOG_PATH */
#define CP_LOG_HINTS_OVERRIDE "DARSHAN_LOGHINTS"

/* Environment variable to override __CP_MEM_ALIGNMENT */
#define CP_MEM_ALIGNMENT_OVERRIDE "DARSHAN_MEMALIGN"

28
/* TODO these go where ? */
29 30
#define DARSHAN_MPI_CALL(func) func

31
typedef uint64_t darshan_file_id;
32

33
struct darshan_module_funcs
34
{
35 36
    void (*prepare_for_shutdown)(void);
    void (*get_output_data)(void **, int);
37 38
};

39 40 41 42
void darshan_core_register_module(
    char *name,
    struct darshan_module_funcs *funcs,
    int *runtime_mem_limit);
43

44 45 46 47 48
void darshan_core_lookup_id(
    void *name,
    int len,
    int printable_flag,
    darshan_file_id *id);
49

50
double darshan_core_wtime(void);
51 52

#endif /* __DARSHAN_H */