darshan.h 1.69 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 where does this go? */
29
30
#define DARSHAN_MPI_CALL(func) func

31
struct darshan_module_funcs
32
{
33
34
35
36
37
38
    void (*get_output_data)(
        MPI_Comm mod_comm, /* communicator to use for module shutdown */
        void** buf, /* output parameter to save module buffer address */
        int* size /* output parameter to save module buffer size */
    );
    void (*shutdown)(void);
39
40
};

41
42
43
/*****************************************************
* darshan-core functions exported to darshan modules *
*****************************************************/
44

45
void darshan_core_register_module(
46
    darshan_module_id id,
47
48
49
    char *name,
    struct darshan_module_funcs *funcs,
    int *runtime_mem_limit);
50

51
void darshan_core_lookup_record_id(
52
53
54
    void *name,
    int len,
    int printable_flag,
55
    darshan_record_id *id);
56

57
double darshan_core_wtime(void);
58

59
60
61
62
63
64
/***********************************************
* darshan-common functions for darshan modules *
***********************************************/

char* darshan_clean_file_path(const char* path);

65
#endif /* __DARSHAN_H */