1 /*
2  * Copyright (c) 2015      Mellanox Technologies, Inc.
3  *                         All rights reserved.
4  * $COPYRIGHT$
5  *
6  * Additional copyrights may follow
7  *
8  * $HEADER$
9  */
10 
11 #ifndef OSHMEM_INFO_H
12 #define OSHMEM_INFO_H
13 
14 #include "oshmem_config.h"
15 #include "oshmem/types.h"
16 #include "oshmem/constants.h"
17 
18 /*
19  * Environment variables
20  */
21 #define OSHMEM_ENV_SYMMETRIC_SIZE      "SMA_SYMMETRIC_SIZE"
22 #define OSHMEM_ENV_DEBUG               "SMA_DEBUG"
23 #define OSHMEM_ENV_INFO                "SMA_INFO"
24 #define OSHMEM_ENV_VERSION             "SMA_VERSION"
25 
26 /**
27  * \internal
28  * oshmem_info_t structure.
29  */
30 struct oshmem_info_t {
31     /**< print the library version at start-up */
32     bool print_version;
33     /**< print helpful text about all these environment variables */
34     bool print_info;
35     /**< enable debugging messages */
36     bool debug;
37     /**< number of bytes to allocate for symmetric heap */
38     size_t symmetric_heap_size;
39 };
40 
41 /**
42  * \internal
43  * Convenience typedef
44  */
45 typedef struct oshmem_info_t oshmem_info_t;
46 
47 
48 BEGIN_C_DECLS
49 
50 /**
51  * Global instance for oshmem_info_env
52  */
53 OSHMEM_DECLSPEC extern oshmem_info_t oshmem_shmem_info_env;
54 
55 /**
56  * This function is invoked during oshmem_shmem_init() and sets up
57  * oshmem_shmem_info_env handling.
58  */
59 int oshmem_info_init(void);
60 
61 /**
62  * This functions is called during oshmem_shmem_finalize() and shuts
63  * down oshmem_shmem_info_env handling.
64  */
65 int oshmem_info_finalize(void);
66 
67 END_C_DECLS
68 
69 #endif /* OSHMEM_INFO_H */
70