Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
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
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <stdio.h>
#include "box.h"
enum verbosity_level_enum
{
OFF = 0,
INFO = 1,
DEBUG = 2,
TRACE = 3,
};
enum transfer_mode_enum
{
SPARSE_COLLECTIVE = 0,
COLLECTIVE = 1,
P2P_DEFAULT = 2,
P2P_SYNCHRONOUS = 3,
P2P_READY = 4,
};
typedef struct
{
int verbosity_level;
int debug_rank;
int transfer_mode;
int n_iterations;
box_t global_domain;
} conf_t;
// Meta-information for MPI-Datatype creation (see mpitypes.c)
#define CONF_T_N_INT_MEMBERS 4
#define CONF_T_FIRST_INT_MEMBER verbosity_level
#define CONF_T_N_BOX_MEMBERS 1
#define CONF_T_FIRST_BOX_MEMBER global_domain
void conf_init(conf_t *c);
const char* conf_set_from_args(conf_t *c, int argc, char* argv[]);
void conf_print(const conf_t *c, FILE *file);
int info_enabled(const conf_t *c);
int warn_enabled(const conf_t *c);
int debug_enabled(const conf_t *c);
int trace_enabled(const conf_t *c);
#endif