ARGOBOTS  1.1
abtd_env.c
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #include "abti.h"
7 #include <unistd.h>
8 #include <strings.h>
9 
10 #define ABTD_KEY_TABLE_DEFAULT_SIZE 4
11 #define ABTD_THREAD_DEFAULT_STACKSIZE 16384
12 #define ABTD_SCHED_DEFAULT_STACKSIZE (4 * 1024 * 1024)
13 #define ABTD_SCHED_EVENT_FREQ 50
14 #define ABTD_SCHED_SLEEP_NSEC 100
15 
16 #define ABTD_HUGE_PAGE_SIZE (2 * 1024 * 1024)
17 #define ABTD_MEM_PAGE_SIZE (2 * 1024 * 1024)
18 #define ABTD_MEM_STACK_PAGE_SIZE (8 * 1024 * 1024)
19 #define ABTD_MEM_MAX_NUM_STACKS 1024
20 #define ABTD_MEM_MAX_TOTAL_STACK_SIZE (64 * 1024 * 1024)
21 #define ABTD_MEM_MAX_NUM_DESCS 4096
22 
23 /* To avoid potential overflow, we intentionally use a smaller value than the
24  * real limit. */
25 #define ABTD_ENV_INT_MAX ((int)(INT_MAX / 2))
26 #define ABTD_ENV_UINT32_MAX ((uint32_t)(UINT32_MAX / 2))
27 #define ABTD_ENV_UINT64_MAX ((uint64_t)(UINT64_MAX / 2))
28 #define ABTD_ENV_SIZE_MAX ((size_t)(SIZE_MAX / 2))
29 
30 static uint32_t roundup_pow2_uint32(uint32_t val);
31 #ifdef ABT_CONFIG_USE_MEM_POOL
32 static size_t roundup_pow2_size(size_t val);
33 #endif
34 static const char *get_abt_env(const char *env_suffix);
35 static ABT_bool is_false(const char *str, ABT_bool include0);
36 static ABT_bool is_true(const char *str, ABT_bool include1);
37 static ABT_bool load_env_bool(const char *env_suffix, ABT_bool default_val);
38 static int load_env_int(const char *env_suffix, int default_val, int min_val,
39  int max_val);
40 static uint32_t load_env_uint32(const char *env_suffix, uint32_t default_val,
41  uint32_t min_val, uint32_t max_val);
42 static uint64_t load_env_uint64(const char *env_suffix, uint64_t default_val,
43  uint64_t min_val, uint64_t max_val);
44 static size_t load_env_size(const char *env_suffix, size_t default_val,
45  size_t min_val, size_t max_val);
46 
47 void ABTD_env_init(ABTI_global *p_global)
48 {
49  const char *env;
50 
51  /* Get the number of available cores in the system */
52  p_global->num_cores = sysconf(_SC_NPROCESSORS_ONLN);
53 
54  /* ABT_SET_AFFINITY, ABT_ENV_SET_AFFINITY */
55  env = get_abt_env("SET_AFFINITY");
56  if (env != NULL && is_false(env, ABT_FALSE)) {
57  p_global->set_affinity = ABT_FALSE;
58  } else {
59  /* By default, we use the CPU affinity */
60  p_global->set_affinity = ABT_TRUE;
61  ABTD_affinity_init(p_global, env);
62  }
63 
64 #ifdef ABT_CONFIG_USE_DEBUG_LOG_PRINT
65  /* If the debug log printing is set in configure, logging is turned on by
66  * default. */
67  const ABT_bool default_use_logging = ABT_TRUE;
68  const ABT_bool default_use_debug = ABT_TRUE;
69 #else
70  /* Otherwise, logging is not turned on by default. */
71  const ABT_bool default_use_logging = ABT_FALSE;
72  const ABT_bool default_use_debug = ABT_FALSE;
73 #endif
74  /* ABT_USE_LOG, ABT_ENV_USE_LOG */
75  p_global->use_logging = load_env_bool("USE_LOG", default_use_logging);
76 
77  /* ABT_USE_DEBUG, ABT_ENV_USE_DEBUG */
78  p_global->use_debug = load_env_bool("USE_DEBUG", default_use_debug);
79 
80  /* ABT_MAX_NUM_XSTREAMS, ABT_ENV_MAX_NUM_XSTREAMS
81  * Maximum size of the internal ES array */
82  p_global->max_xstreams =
83  load_env_int("MAX_NUM_XSTREAMS", p_global->num_cores, 1,
85 
86  /* ABT_KEY_TABLE_SIZE, ABT_ENV_KEY_TABLE_SIZE
87  * Default key table size */
89  load_env_uint32("KEY_TABLE_SIZE", ABTD_KEY_TABLE_DEFAULT_SIZE, 1,
91 
92  /* ABT_THREAD_STACKSIZE, ABT_ENV_THREAD_STACKSIZE
93  * Default stack size for ULT */
94  p_global->thread_stacksize =
95  ABTU_roundup_size(load_env_size("THREAD_STACKSIZE",
99 
100  /* ABT_SCHED_STACKSIZE, ABT_ENV_SCHED_STACKSIZE
101  * Default stack size for scheduler */
102  p_global->sched_stacksize =
103  ABTU_roundup_size(load_env_size("SCHED_STACKSIZE",
107 
108  /* ABT_SCHED_EVENT_FREQ, ABT_ENV_SCHED_EVENT_FREQ
109  * Default frequency for event checking by the scheduler */
110  p_global->sched_event_freq =
111  load_env_uint32("SCHED_EVENT_FREQ", ABTD_SCHED_EVENT_FREQ, 1,
113 
114  /* ABT_SCHED_SLEEP_NSEC, ABT_ENV_SCHED_SLEEP_NSEC
115  * Default nanoseconds for scheduler sleep */
116  p_global->sched_sleep_nsec =
117  load_env_uint64("SCHED_SLEEP_NSEC", ABTD_SCHED_SLEEP_NSEC, 0,
119 
120  /* ABT_MUTEX_MAX_HANDOVERS, ABT_ENV_MUTEX_MAX_HANDOVERS
121  * Default maximum number of mutex handover */
122  p_global->mutex_max_handovers =
123  load_env_uint32("MUTEX_MAX_HANDOVERS", 64, 1, ABTD_ENV_UINT32_MAX);
124 
125  /* ABT_MUTEX_MAX_WAKEUPS, ABT_ENV_MUTEX_MAX_WAKEUPS
126  * Default maximum number of mutex wakeup operations */
127  p_global->mutex_max_wakeups =
128  load_env_uint32("MUTEX_MAX_WAKEUPS", 1, 1, ABTD_ENV_UINT32_MAX);
129 
130  /* ABT_HUGE_PAGE_SIZE, ABT_ENV_HUGE_PAGE_SIZE
131  * Huge page size */
132  size_t default_huge_page_size = (ABT_CONFIG_SYS_HUGE_PAGE_SIZE != 0)
135  p_global->huge_page_size =
136  load_env_size("HUGE_PAGE_SIZE", default_huge_page_size, 4096,
138 
139 #ifdef ABT_CONFIG_USE_MEM_POOL
140  /* ABT_MEM_PAGE_SIZE, ABT_ENV_MEM_PAGE_SIZE
141  * Page size for memory allocation. It must be 2^N. */
142  p_global->mem_page_size = roundup_pow2_size(
144  4096, ABTD_ENV_SIZE_MAX),
146 
147  /* ABT_MEM_STACK_PAGE_SIZE, ABT_ENV_MEM_STACK_PAGE_SIZE
148  * Stack page size for memory allocation */
149  p_global->mem_sp_size =
150  ABTU_roundup_size(load_env_size("MEM_STACK_PAGE_SIZE",
152  p_global->thread_stacksize * 4,
155 
156  /* ABT_MEM_MAX_NUM_STACKS, ABT_ENV_MEM_MAX_NUM_STACKS
157  * Maximum number of stacks that each ES can keep during execution. */
158  /* If each execution stream caches too many stacks in total, let's reduce
159  * the max # of stacks. */
160  const uint32_t default_mem_max_stacks =
162  p_global->thread_stacksize,
164  /* The value must be a multiple of ABT_MEM_POOL_MAX_LOCAL_BUCKETS. */
165  p_global->mem_max_stacks =
166  ABTU_roundup_uint32(load_env_uint32("MEM_MAX_NUM_STACKS",
167  default_mem_max_stacks,
171 
172  /* ABT_MEM_MAX_NUM_DESCS, ABT_ENV_MEM_MAX_NUM_DESCS
173  * Maximum number of descriptors that each ES can keep during execution */
174  /* The value must be a multiple of ABT_MEM_POOL_MAX_LOCAL_BUCKETS. */
175  p_global->mem_max_descs =
176  ABTU_roundup_uint32(load_env_uint32("MEM_MAX_NUM_DESCS",
181 
182  /* ABT_MEM_LP_ALLOC, ABT_ENV_MEM_LP_ALLOC
183  * How to allocate large pages. The default is to use mmap() for huge
184  * pages and then to fall back to allocate regular pages using mmap() when
185  * huge pages are run out of. */
186  int lp_alloc;
187 #if defined(HAVE_MAP_ANONYMOUS) || defined(HAVE_MAP_ANON)
188  /*
189  * To use hugepage, mmap() needs a correct size of hugepage; otherwise,
190  * an error happens on "munmap()" (not mmap()).
191  */
192  if (get_abt_env("HUGE_PAGE_SIZE")) {
193  /* If the explicitly user explicitly sets the huge page size via the
194  * environmental variable, we respect that value. It is the user's
195  * responsibility to set a correct huge page size. */
196  lp_alloc = ABTI_MEM_LP_MMAP_HP_RP;
197  } else {
198  /* Let's use huge page when both of the following conditions are met:
199  * 1. Huge page is actually usable (ABT_CONFIG_USE_HUGE_PAGE_DEFAULT).
200  * 2. The huge page size is not too large (e.g., some systems use 512 MB
201  * huge page, which is too big for the default setting). */
202 #ifdef ABT_CONFIG_USE_HUGE_PAGE_DEFAULT
203  if (4096 <= ABT_CONFIG_SYS_HUGE_PAGE_SIZE &&
204  ABT_CONFIG_SYS_HUGE_PAGE_SIZE <= 8 * 1024 * 1024) {
205  lp_alloc = ABTI_MEM_LP_MMAP_HP_RP;
206  } else {
207  lp_alloc = ABTI_MEM_LP_MMAP_RP;
208  }
209 #else
210  /* Huge page allocation failed at configuration time. Don't use it.*/
211  lp_alloc = ABTI_MEM_LP_MMAP_RP;
212 #endif
213  }
214 #else
215  /* We cannot use mmap(). Let's use a normal malloc(). */
216  lp_alloc = ABTI_MEM_LP_MALLOC;
217 #endif
218  env = get_abt_env("MEM_LP_ALLOC");
219  if (env != NULL) {
220  if (strcasecmp(env, "malloc") == 0) {
221  lp_alloc = ABTI_MEM_LP_MALLOC;
222 #if defined(HAVE_MAP_ANONYMOUS) || defined(HAVE_MAP_ANON)
223  } else if (strcasecmp(env, "mmap_rp") == 0) {
224  lp_alloc = ABTI_MEM_LP_MMAP_RP;
225  } else if (strcasecmp(env, "mmap_hp_rp") == 0) {
226  lp_alloc = ABTI_MEM_LP_MMAP_HP_RP;
227  } else if (strcasecmp(env, "mmap_hp_thp") == 0) {
228  lp_alloc = ABTI_MEM_LP_MMAP_HP_THP;
229 #endif
230  } else if (strcasecmp(env, "thp") == 0) {
231  lp_alloc = ABTI_MEM_LP_THP;
232  }
233  }
234 
235  /* Check if the requested allocation method is really possible. */
236  if (lp_alloc != ABTI_MEM_LP_MALLOC) {
237  p_global->mem_lp_alloc = ABTI_mem_check_lp_alloc(p_global, lp_alloc);
238  } else {
239  p_global->mem_lp_alloc = lp_alloc;
240  }
241 #endif
242 
243  /* ABT_PRINT_CONFIG, ABT_ENV_PRINT_CONFIG
244  * Whether to print the configuration on ABT_init() */
245  p_global->print_config = load_env_bool("PRINT_CONFIG", ABT_FALSE);
246 
247  /* Init timer */
248  ABTD_time_init();
249 }
250 
251 /*****************************************************************************/
252 /* Internal static functions */
253 /*****************************************************************************/
254 
255 static uint32_t roundup_pow2_uint32(uint32_t val)
256 {
257  /* 3 -> 4
258  * 4 -> 4
259  * 5 -> 8 */
260  if (val == 0)
261  return 0;
262  uint32_t i;
263  for (i = 0; i < sizeof(uint32_t) * 8 - 1; i++) {
264  if ((val - 1) >> i == 0)
265  break;
266  }
267  return ((uint32_t)1) << i;
268 }
269 
270 #ifdef ABT_CONFIG_USE_MEM_POOL
271 static size_t roundup_pow2_size(size_t val)
272 {
273  if (val == 0)
274  return 0;
275  size_t i;
276  for (i = 0; i < sizeof(size_t) * 8 - 1; i++) {
277  if ((val - 1) >> i == 0)
278  break;
279  }
280  return ((size_t)1) << i;
281 }
282 #endif
283 
284 static const char *get_abt_env(const char *env_suffix)
285 {
286  /* Valid prefix is ABT_ and ABT_ENV_. ABT_ is prioritized. */
287  char buffer[128];
288  const char *prefixes[] = { "ABT_", "ABT_ENV_" };
289  uint32_t i;
290  for (i = 0; i < sizeof(prefixes) / sizeof(prefixes[0]); i++) {
291  int prefix_size = strlen(prefixes[i]);
292  int env_suffix_size = strlen(env_suffix);
293  if (prefix_size + env_suffix_size + 1 <= (int)sizeof(buffer)) {
294  memcpy(buffer, prefixes[i], prefix_size);
295  memcpy(buffer + prefix_size, env_suffix, env_suffix_size);
296  buffer[prefix_size + env_suffix_size] = '\0';
297  const char *env = getenv(buffer);
298  if (env)
299  return env;
300  }
301  }
302  return NULL;
303 }
304 
305 static ABT_bool is_false(const char *str, ABT_bool include0)
306 {
307  if (include0 && strcmp(str, "0") == 0) {
308  return ABT_TRUE;
309  } else if (strcasecmp(str, "n") == 0 || strcasecmp(str, "no") == 0 ||
310  strcasecmp(str, "false") == 0 || strcasecmp(str, "off") == 0) {
311  return ABT_TRUE;
312  }
313  return ABT_FALSE;
314 }
315 
316 static ABT_bool is_true(const char *str, ABT_bool include1)
317 {
318  if (include1 && strcmp(str, "1") == 0) {
319  return ABT_TRUE;
320  } else if (strcasecmp(str, "y") == 0 || strcasecmp(str, "yes") == 0 ||
321  strcasecmp(str, "true") == 0 || strcasecmp(str, "on") == 0) {
322  return ABT_TRUE;
323  }
324  return ABT_FALSE;
325 }
326 
327 static ABT_bool load_env_bool(const char *env_suffix, ABT_bool default_val)
328 {
329  const char *env = get_abt_env(env_suffix);
330  if (!env) {
331  return default_val;
332  } else {
333  if (default_val) {
334  /* If env is not "false", return true */
335  return is_false(env, ABT_TRUE) ? ABT_FALSE : ABT_TRUE;
336  } else {
337  /* If env is not "true", return false */
338  return is_true(env, ABT_TRUE) ? ABT_TRUE : ABT_FALSE;
339  }
340  }
341 }
342 
343 static int load_env_int(const char *env_suffix, int default_val, int min_val,
344  int max_val)
345 {
346  const char *env = get_abt_env(env_suffix);
347  if (!env) {
348  return ABTU_max_int(min_val, ABTU_min_int(max_val, default_val));
349  } else {
350  int val;
351  int abt_errno = ABTU_atoi(env, &val, NULL);
352  if (abt_errno != ABT_SUCCESS) {
353  return ABTU_max_int(min_val, ABTU_min_int(max_val, default_val));
354  } else {
355  return ABTU_max_int(min_val, ABTU_min_int(max_val, val));
356  }
357  }
358 }
359 
360 static uint32_t load_env_uint32(const char *env_suffix, uint32_t default_val,
361  uint32_t min_val, uint32_t max_val)
362 {
363  const char *env = get_abt_env(env_suffix);
364  if (!env) {
365  return ABTU_max_uint32(min_val, ABTU_min_uint32(max_val, default_val));
366  } else {
367  uint32_t val;
368  int abt_errno = ABTU_atoui32(env, &val, NULL);
369  if (abt_errno != ABT_SUCCESS) {
370  return ABTU_max_uint32(min_val,
371  ABTU_min_uint32(max_val, default_val));
372  } else {
373  return ABTU_max_uint32(min_val, ABTU_min_uint32(max_val, val));
374  }
375  }
376 }
377 
378 static uint64_t load_env_uint64(const char *env_suffix, uint64_t default_val,
379  uint64_t min_val, uint64_t max_val)
380 {
381  const char *env = get_abt_env(env_suffix);
382  if (!env) {
383  return ABTU_max_uint64(min_val, ABTU_min_uint64(max_val, default_val));
384  } else {
385  uint64_t val;
386  int abt_errno = ABTU_atoui64(env, &val, NULL);
387  if (abt_errno != ABT_SUCCESS) {
388  return ABTU_max_uint64(min_val,
389  ABTU_min_uint64(max_val, default_val));
390  } else {
391  return ABTU_max_uint64(min_val, ABTU_min_uint64(max_val, val));
392  }
393  }
394 }
395 
396 static size_t load_env_size(const char *env_suffix, size_t default_val,
397  size_t min_val, size_t max_val)
398 {
399  const char *env = get_abt_env(env_suffix);
400  if (!env) {
401  return ABTU_max_size(min_val, ABTU_min_size(max_val, default_val));
402  } else {
403  size_t val;
404  int abt_errno = ABTU_atosz(env, &val, NULL);
405  if (abt_errno != ABT_SUCCESS) {
406  return ABTU_max_size(min_val, ABTU_min_size(max_val, default_val));
407  } else {
408  return ABTU_max_size(min_val, ABTU_min_size(max_val, val));
409  }
410  }
411 }
load_env_uint64
static uint64_t load_env_uint64(const char *env_suffix, uint64_t default_val, uint64_t min_val, uint64_t max_val)
Definition: abtd_env.c:378
load_env_uint32
static uint32_t load_env_uint32(const char *env_suffix, uint32_t default_val, uint32_t min_val, uint32_t max_val)
Definition: abtd_env.c:360
ABTU_max_size
static size_t ABTU_max_size(size_t a, size_t b)
Definition: abtu.h:40
ABTU_min_int
static int ABTU_min_int(int a, int b)
Definition: abtu.h:45
ABTD_MEM_MAX_TOTAL_STACK_SIZE
#define ABTD_MEM_MAX_TOTAL_STACK_SIZE
Definition: abtd_env.c:20
ABTD_env_init
void ABTD_env_init(ABTI_global *p_global)
Definition: abtd_env.c:47
ABTI_global::sched_sleep_nsec
uint64_t sched_sleep_nsec
Definition: abti.h:212
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1001
ABTI_global::sched_stacksize
size_t sched_stacksize
Definition: abti.h:210
ABTU_max_uint64
static uint64_t ABTU_max_uint64(uint64_t a, uint64_t b)
Definition: abtu.h:35
ABTI_MEM_LP_MMAP_HP_THP
@ ABTI_MEM_LP_MMAP_HP_THP
Definition: abti_mem.h:21
is_true
static ABT_bool is_true(const char *str, ABT_bool include1)
Definition: abtd_env.c:316
ABTU_max_int
static int ABTU_max_int(int a, int b)
Definition: abtu.h:15
ABTD_MEM_MAX_NUM_STACKS
#define ABTD_MEM_MAX_NUM_STACKS
Definition: abtd_env.c:19
ABTU_roundup_size
static size_t ABTU_roundup_size(size_t val, size_t multiple)
Definition: abtu.h:95
load_env_size
static size_t load_env_size(const char *env_suffix, size_t default_val, size_t min_val, size_t max_val)
Definition: abtd_env.c:396
ABTI_MEM_LP_MALLOC
@ ABTI_MEM_LP_MALLOC
Definition: abti_mem.h:18
ABTU_min_size
static size_t ABTU_min_size(size_t a, size_t b)
Definition: abtu.h:70
ABT_MEM_POOL_MAX_LOCAL_BUCKETS
#define ABT_MEM_POOL_MAX_LOCAL_BUCKETS
Definition: abti_mem_pool.h:9
ABTI_global::print_config
ABT_bool print_config
Definition: abti.h:238
ABTD_ENV_UINT64_MAX
#define ABTD_ENV_UINT64_MAX
Definition: abtd_env.c:27
ABTD_SCHED_SLEEP_NSEC
#define ABTD_SCHED_SLEEP_NSEC
Definition: abtd_env.c:14
ABTU_min_uint64
static uint64_t ABTU_min_uint64(uint64_t a, uint64_t b)
Definition: abtu.h:65
roundup_pow2_uint32
static uint32_t roundup_pow2_uint32(uint32_t val)
Definition: abtd_env.c:255
load_env_int
static int load_env_int(const char *env_suffix, int default_val, int min_val, int max_val)
Definition: abtd_env.c:343
ABTD_MEM_PAGE_SIZE
#define ABTD_MEM_PAGE_SIZE
Definition: abtd_env.c:17
is_false
static ABT_bool is_false(const char *str, ABT_bool include0)
Definition: abtd_env.c:305
ABTU_max_uint32
static uint32_t ABTU_max_uint32(uint32_t a, uint32_t b)
Definition: abtu.h:25
ABTU_atoui64
ABTU_ret_err int ABTU_atoui64(const char *str, uint64_t *p_val, ABT_bool *p_overflow)
Definition: atoi.c:65
ABTI_MEM_LP_THP
@ ABTI_MEM_LP_THP
Definition: abti_mem.h:22
get_abt_env
static const char * get_abt_env(const char *env_suffix)
Definition: abtd_env.c:284
ABTD_ENV_UINT32_MAX
#define ABTD_ENV_UINT32_MAX
Definition: abtd_env.c:26
abti.h
ABTI_global::use_logging
ABT_bool use_logging
Definition: abti.h:206
ABTD_KEY_TABLE_DEFAULT_SIZE
#define ABTD_KEY_TABLE_DEFAULT_SIZE
Definition: abtd_env.c:10
ABTD_SCHED_EVENT_FREQ
#define ABTD_SCHED_EVENT_FREQ
Definition: abtd_env.c:13
ABTI_global::thread_stacksize
size_t thread_stacksize
Definition: abti.h:209
ABTI_global::huge_page_size
size_t huge_page_size
Definition: abti.h:218
ABTI_MEM_LP_MMAP_HP_RP
@ ABTI_MEM_LP_MMAP_HP_RP
Definition: abti_mem.h:20
ABTI_global::sched_event_freq
uint32_t sched_event_freq
Definition: abti.h:211
ABTD_ENV_INT_MAX
#define ABTD_ENV_INT_MAX
Definition: abtd_env.c:25
ABTI_global::mutex_max_handovers
uint32_t mutex_max_handovers
Definition: abti.h:216
ABT_CONFIG_STATIC_CACHELINE_SIZE
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
Definition: abt_config.h:72
ABTD_time_init
void ABTD_time_init(void)
Definition: abtd_time.c:11
ABTD_ENV_SIZE_MAX
#define ABTD_ENV_SIZE_MAX
Definition: abtd_env.c:28
ABT_SUCCESS
#define ABT_SUCCESS
Error code: the routine returns successfully.
Definition: abt.h:92
ABTU_atoui32
ABTU_ret_err int ABTU_atoui32(const char *str, uint32_t *p_val, ABT_bool *p_overflow)
Definition: atoi.c:39
ABTI_global::mutex_max_wakeups
uint32_t mutex_max_wakeups
Definition: abti.h:217
ABT_TRUE
#define ABT_TRUE
True constant for ABT_bool.
Definition: abt.h:748
ABTI_global::key_table_size
uint32_t key_table_size
Definition: abti.h:208
ABTD_THREAD_DEFAULT_STACKSIZE
#define ABTD_THREAD_DEFAULT_STACKSIZE
Definition: abtd_env.c:11
ABTU_atoi
ABTU_ret_err int ABTU_atoi(const char *str, int *p_val, ABT_bool *p_overflow)
Definition: atoi.c:11
ABT_FALSE
#define ABT_FALSE
False constant for ABT_bool.
Definition: abt.h:750
ABTD_MEM_MAX_NUM_DESCS
#define ABTD_MEM_MAX_NUM_DESCS
Definition: abtd_env.c:21
ABT_CONFIG_SYS_HUGE_PAGE_SIZE
#define ABT_CONFIG_SYS_HUGE_PAGE_SIZE
Definition: abt_config.h:75
ABTI_global::use_debug
ABT_bool use_debug
Definition: abti.h:207
load_env_bool
static ABT_bool load_env_bool(const char *env_suffix, ABT_bool default_val)
Definition: abtd_env.c:327
ABTI_global::set_affinity
ABT_bool set_affinity
Definition: abti.h:205
ABTD_affinity_init
void ABTD_affinity_init(ABTI_global *p_global, const char *affinity_str)
Definition: abtd_affinity.c:296
ABTI_global
Definition: abti.h:196
ABTD_SCHED_DEFAULT_STACKSIZE
#define ABTD_SCHED_DEFAULT_STACKSIZE
Definition: abtd_env.c:12
ABTU_atosz
ABTU_ret_err int ABTU_atosz(const char *str, size_t *p_val, ABT_bool *p_overflow)
Definition: atoi.c:85
ABTI_mem_check_lp_alloc
int ABTI_mem_check_lp_alloc(ABTI_global *p_global, int lp_alloc)
ABTI_global::num_cores
int num_cores
Definition: abti.h:204
ABTD_HUGE_PAGE_SIZE
#define ABTD_HUGE_PAGE_SIZE
Definition: abtd_env.c:16
ABTI_MEM_LP_MMAP_RP
@ ABTI_MEM_LP_MMAP_RP
Definition: abti_mem.h:19
ABTI_global::max_xstreams
int max_xstreams
Definition: abti.h:197
ABTD_MEM_STACK_PAGE_SIZE
#define ABTD_MEM_STACK_PAGE_SIZE
Definition: abtd_env.c:18
ABTU_min_uint32
static uint32_t ABTU_min_uint32(uint32_t a, uint32_t b)
Definition: abtu.h:55
ABTU_roundup_uint32
static uint32_t ABTU_roundup_uint32(uint32_t val, uint32_t multiple)
Definition: abtu.h:75