ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
12 FILE *fp,
double timeout,
void (*cb_func)(
ABT_bool,
void *),
void *arg);
220 #ifndef ABT_CONFIG_ENABLE_VER_20_API
224 switch (query_kind) {
234 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
249 #ifdef HAVE_VALGRIND_SUPPORT
256 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
269 #if !defined(ABTD_FCONTEXT_PRESERVE_FPU) && defined(ABT_CONFIG_USE_FCONTEXT)
277 #ifndef ABT_CONFIG_DISABLE_CANCELLATION
284 #ifndef ABT_CONFIG_DISABLE_CANCELLATION
291 #ifndef ABT_CONFIG_DISABLE_MIGRATION
301 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
308 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
369 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
376 #ifdef ABT_CONFIG_USE_FCONTEXT
386 #ifdef ABT_CONFIG_ENABLE_STACK_UNWIND
401 #if ABT_CONFIG_STACK_CHECK_TYPE == ABTI_STACK_CHECK_TYPE_CANARY
416 #if ABT_CONFIG_STACK_CHECK_TYPE == ABTI_STACK_CHECK_TYPE_CANARY
425 #if ABT_CONFIG_ACTIVE_WAIT_POLICY
432 #ifdef ABT_CONFIG_DISABLE_LAZY_STACK_ALLOC
478 #ifndef ABT_CONFIG_ENABLE_VER_20_API
484 fprintf(fp,
"Argobots is not initialized.\n");
527 #ifndef ABT_CONFIG_ENABLE_VER_20_API
533 fprintf(fp,
"Argobots is not initialized.\n");
541 fprintf(fp,
"# of created ESs: %d\n", p_global->
num_xstreams);
546 p_xstream = p_xstream->
p_next;
590 #ifndef ABT_CONFIG_ENABLE_VER_20_API
633 #ifndef ABT_CONFIG_ENABLE_VER_20_API
676 #ifndef ABT_CONFIG_ENABLE_VER_20_API
723 #ifndef ABT_CONFIG_ENABLE_VER_20_API
766 #ifndef ABT_CONFIG_ENABLE_VER_20_API
814 #ifndef ABT_CONFIG_ENABLE_VER_20_API
865 #ifndef ABT_CONFIG_ENABLE_VER_20_API
870 fprintf(fp,
"no stack\n");
876 fprintf(fp,
"Argobots is not initialized.\n");
883 fprintf(fp,
"no stack\n");
927 #ifndef ABT_CONFIG_ENABLE_VER_20_API
933 fprintf(fp,
"Argobots is not initialized.\n");
1022 #define PRINT_STACK_FLAG_UNSET 0
1023 #define PRINT_STACK_FLAG_INITIALIZE 1
1024 #define PRINT_STACK_FLAG_WAIT 2
1025 #define PRINT_STACK_FLAG_FINALIZE 3
1044 if (self_value == 0) {
1072 "ABT_info_trigger_print_all_thread_stacks: "
1073 "timeout (only %d ESs stop)\n",
1078 fprintf(
print_stack_fp,
"ABT_info_trigger_print_all_thread_stacks: "
1079 "failed because of an internal error.\n");
1100 if (dec_value == 0) {
1109 fprintf(fp,
"Argobots Configuration:\n");
1111 fprintf(fp,
" - # of cores: %d\n", p_global->
num_cores);
1113 fprintf(fp,
" - huge page size: %zu B\n", p_global->
huge_page_size);
1114 fprintf(fp,
" - max. # of ESs: %d\n", p_global->
max_xstreams);
1115 fprintf(fp,
" - cur. # of ESs: %d\n", p_global->
num_xstreams);
1116 fprintf(fp,
" - ES affinity: %s\n",
1118 fprintf(fp,
" - logging: %s\n",
1120 fprintf(fp,
" - debug output: %s\n",
1122 fprintf(fp,
" - print errno: "
1123 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
1129 fprintf(fp,
" - valgrind support: "
1130 #ifdef HAVE_VALGRIND_SUPPORT
1136 fprintf(fp,
" - thread cancellation: "
1137 #ifndef ABT_CONFIG_DISABLE_CANCELLATION
1143 fprintf(fp,
" - thread migration: "
1144 #ifndef ABT_CONFIG_DISABLE_MIGRATION
1150 fprintf(fp,
" - external thread: "
1151 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
1157 fprintf(fp,
" - error check: "
1158 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
1164 fprintf(fp,
" - tool interface: "
1171 fprintf(fp,
" - wait policy: "
1172 #ifdef ABT_CONFIG_ACTIVE_WAIT_POLICY
1178 fprintf(fp,
" - context-switch: "
1189 fprintf(fp,
" - key table entries: %" PRIu32
"\n",
1191 fprintf(fp,
" - default ULT stack size: %zu KB\n",
1193 fprintf(fp,
" - default scheduler stack size: %zu KB\n",
1195 fprintf(fp,
" - default scheduler event check frequency: %u\n",
1197 fprintf(fp,
" - default scheduler sleep: "
1198 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
1204 fprintf(fp,
" - default scheduler sleep duration : %" PRIu64
" [ns]\n",
1207 fprintf(fp,
" - timer function: "
1210 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
1211 "mach_absolute_time"
1212 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
1217 #ifdef ABT_CONFIG_USE_MEM_POOL
1218 fprintf(fp,
"Memory Pool:\n");
1219 fprintf(fp,
" - page size for allocation: %zu KB\n",
1221 fprintf(fp,
" - stack page size: %zu KB\n", p_global->
mem_sp_size / 1024);
1222 fprintf(fp,
" - max. # of stacks per ES: %u\n", p_global->
mem_max_stacks);
1223 fprintf(fp,
" - max. # of descs per ES: %u\n", p_global->
mem_max_descs);
1226 fprintf(fp,
" - large page allocation: malloc\n");
1229 fprintf(fp,
" - large page allocation: mmap regular pages\n");
1232 fprintf(fp,
" - large page allocation: mmap huge pages + "
1236 fprintf(fp,
" - large page allocation: mmap huge pages + THPs\n");
1239 fprintf(fp,
" - large page allocation: THPs\n");
1268 FILE *
fp = p_arg->
fp;
1272 fprintf(
fp,
"=== unknown (%p) ===\n", (
void *)thread);
1274 fprintf(
fp,
"=== ULT (%p) ===\n", (
void *)thread);
1278 "id : %" PRIu64
"\n"
1280 (uint64_t)thread_id, (
void *)&p_ythread->
ctx);
1283 fprintf(
fp,
"=== tasklet (%p) ===\n", (
void *)thread);
1291 if (p_pool == NULL) {
1292 fprintf(
fp,
"== NULL pool ==\n");
1300 fprintf(
fp,
"== pool (%p) ==\n", (
void *)p_pool);
1312 size_t default_len = 16;
1317 p_set->
len = default_len;
1330 for (i = 0; i < p_set->
num; i++) {
1331 if (p_set->
pools[i] == pool)
1335 if (p_set->
num == p_set->
len) {
1336 size_t new_len = p_set->
len * 2;
1341 p_set->
len = new_len;
1348 FILE *
fp,
double timeout,
void (*cb_func)(
ABT_bool,
void *),
void *arg)
1376 struct tm *tm = NULL;
1384 tm = localtime(&seconds);
1386 fprintf(fp,
"Start of ULT stacks dump %04d/%02d/%02d-%02d:%02d:%02d\n",
1387 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour,
1388 tm->tm_min, tm->tm_sec);
1392 fprintf(fp,
"= xstream[%d] (%p) =\n", p_xstream->
rank,
1394 fprintf(fp,
"main_sched : %p\n", (
void *)p_main_sched);
1397 for (i = 0; i < p_main_sched->
num_pools; i++) {
1400 fprintf(fp,
" pools[%zu] : %p\n", i,
1408 p_xstream = p_xstream->
p_next;
1410 for (i = 0; i < pool_set.num; i++) {
1415 fprintf(fp,
" Failed to print (errno = %d).\n", abt_errno);
1419 tm = localtime(&seconds);
1421 fprintf(fp,
"End of ULT stacks dump %04d/%02d/%02d-%02d:%02d:%02d\n",
1422 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour,
1423 tm->tm_min, tm->tm_sec);
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_OVERFLOW_CHECK
#define ABTI_CHECK_NULL_SCHED_PTR(p)
static int ABTD_atomic_fetch_sub_int(ABTD_atomic_int *ptr, int v)
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream)
Print the information of an execution stream.
static ABTI_sched * ABTI_sched_get_ptr(ABT_sched sched)
uint64_t sched_sleep_nsec
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
int ABT_bool
Boolean type.
static void info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg)
@ ABTI_MEM_LP_MMAP_HP_THP
#define ABTI_CHECK_NULL_TASK_PTR(p)
static ABTU_ret_err int ABTU_realloc(size_t old_size, size_t new_size, void **p_ptr)
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr)
Print the information of a ULT attribute.
@ ABTI_STACK_GUARD_MPROTECT_STRICT
struct ABT_thread_attr_opaque * ABT_thread_attr
ULT attribute handle type.
struct ABT_thread_opaque * ABT_task
Work unit handle type.
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
@ ABT_INFO_QUERY_KIND_ENABLED_LAZY_STACK_ALLOC
#define ABTI_SETUP_GLOBAL(pp_global)
ABTD_spinlock xstream_list_lock
int ABT_info_print_all_xstreams(FILE *fp)
Print the information of all execution streams.
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE
ABT_pool_user_print_all_fn p_print_all
static ABTI_global * ABTI_global_get_global(void)
@ ABT_INFO_QUERY_KIND_ENABLED_STACK_UNWIND
#define ABT_ERR_POOL
Error code: error related to a pool.
static void info_finalize_pool_set(struct info_pool_set_t *p_set)
void ABTI_thread_print(ABTI_thread *p_thread, FILE *p_os, int indent)
void ABTI_info_check_print_all_thread_stacks(void)
#define ABTI_CHECK_ERROR(abt_errno)
#define ABTI_THREAD_TYPE_YIELDABLE
static ABTI_ythread * ABTI_thread_get_ythread(ABTI_thread *p_thread)
ABT_unit_id ABTI_thread_get_id(ABTI_thread *p_thread)
static ABTD_atomic_int print_stack_flag
#define ABT_CONFIG_USE_FCONTEXT
static FILE * print_stack_fp
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg)
Print stacks of work units in pools associated with all the main schedulers.
@ ABT_INFO_QUERY_KIND_ENABLED_MIGRATION
static void info_print_unit(void *arg, ABT_thread thread)
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool)
Print stacks of all work units in a pool.
static void(* print_cb_func)(ABT_bool, void *)
#define ABT_CONFIG_DISABLE_TOOL_INTERFACE
#define ABTI_IS_ERROR_CHECK_ENABLED
static ABTI_thread_attr * ABTI_thread_attr_get_ptr(ABT_thread_attr attr)
#define ABTI_CHECK_NULL_THREAD_ATTR_PTR(p)
struct ABT_pool_opaque * ABT_pool
Pool handle type.
ABTI_stack_guard stack_guard_kind
void ABTI_thread_attr_print(ABTI_thread_attr *p_attr, FILE *p_os, int indent)
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
@ ABT_INFO_QUERY_KIND_FCONTEXT
#define ABT_ERR_INV_QUERY_KIND
Error code: invalid query kind.
static double print_stack_timeout
@ ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD
#define ABTI_CHECK_NULL_THREAD_PTR(p)
@ ABT_INFO_QUERY_KIND_ENABLED_AFFINITY
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val)
Retrieve the configuration information.
ABT_bool ABTD_env_get_print_config(void)
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER
uint64_t ABT_unit_id
Work unit ID type.
struct ABT_xstream_opaque * ABT_xstream
Execution stream handle type.
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread)
Print stack of a work unit.
@ ABT_INFO_QUERY_KIND_ENABLED_VALGRIND
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
#define ABT_CONFIG_USE_CLOCK_GETTIME
#define ABTI_HANDLE_ERROR(n)
static void ABTD_atomic_pause(void)
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
ABT_bool ABTD_env_get_use_debug(void)
ABT_info_query_kind
Query kind for ABT_info_query_config().
@ ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED
#define PRINT_STACK_FLAG_INITIALIZE
ABTI_sched * p_main_sched
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG
static ABTU_ret_err int info_add_pool_set(ABT_pool pool, struct info_pool_set_t *p_set)
uint32_t sched_event_freq
size_t ABTD_env_get_sched_stacksize(void)
uint32_t ABTD_env_get_sched_event_freq(void)
@ ABT_INFO_QUERY_KIND_ENABLED_DEBUG
void ABTI_xstream_print(ABTI_xstream *p_xstream, FILE *p_os, int indent, ABT_bool print_sub)
#define ABTI_ASSERT(cond)
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
size_t ABTD_env_get_thread_stacksize(void)
static int ABTD_atomic_fetch_add_int(ABTD_atomic_int *ptr, int v)
@ ABT_INFO_QUERY_KIND_ENABLED_TOOL
#define ABT_SUCCESS
Error code: the routine returns successfully.
#define PRINT_STACK_FLAG_UNSET
@ ABT_INFO_QUERY_KIND_DYNAMIC_PROMOTION
ABTI_xstream * p_xstream_head
static int ABTD_atomic_acquire_load_int(const ABTD_atomic_int *ptr)
ABT_bool ABTD_env_get_use_logging(void)
static ABTD_atomic_int print_stack_barrier
@ ABTI_STACK_GUARD_MPROTECT
int ABT_info_print_pool(FILE *fp, ABT_pool pool)
Print the information of a pool.
@ ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE
#define ABT_TRUE
True constant for ABT_bool.
static ABTI_pool * ABTI_pool_get_ptr(ABT_pool pool)
#define ABTD_ATOMIC_INT_STATIC_INITIALIZER(val)
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER
#define PRINT_STACK_FLAG_WAIT
@ ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR
#define ABT_FALSE
False constant for ABT_bool.
#define ABTI_UB_ASSERT(cond)
int ABT_info_print_thread(FILE *fp, ABT_thread thread)
Print the information of a work unit.
#define ABTI_CHECK_NULL_POOL_PTR(p)
#define ABTI_CHECK_NULL_XSTREAM_PTR(p)
static void ABTU_free(void *ptr)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
static ABTU_ret_err int print_all_thread_stacks(ABTI_global *p_global, FILE *fp)
static ABTI_xstream * ABTI_xstream_get_ptr(ABT_xstream xstream)
@ ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU
static int ABTD_atomic_bool_cas_strong_int(ABTD_atomic_int *ptr, int oldv, int newv)
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
int ABTD_env_get_max_xstreams(void)
static ABTU_ret_err int info_print_thread_stacks_in_pool(ABTI_global *p_global, FILE *fp, ABTI_pool *p_pool)
int ABT_info_print_task(FILE *fp, ABT_task task)
Print the information of a work unit.
int ABT_info_print_config(FILE *fp)
Print the runtime information of Argobots.
void ABTI_info_print_config(ABTI_global *p_global, FILE *fp)
void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
#define ABTI_CHECK_TRUE(cond, abt_errno)
@ ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ
ABTI_pool_optional_def optional_def
uint64_t ABTD_env_get_sched_sleep_nsec(void)
@ ABT_INFO_QUERY_KIND_WAIT_POLICY
#define ABTD_FCONTEXT_PRESERVE_FPU
ABT_bool ABTD_env_get_stack_guard_mprotect(ABT_bool *is_strict)
static void ABTD_atomic_release_store_int(ABTD_atomic_int *ptr, int val)
static ABTI_global * ABTI_global_get_global_or_null(void)
int ABT_info_print_sched(FILE *fp, ABT_sched sched)
Print the information of a scheduler.
void ABTI_ythread_print_stack(ABTI_global *p_global, ABTI_ythread *p_ythread, FILE *p_os)
static ABTI_thread * ABTI_thread_get_ptr(ABT_thread thread)
static ABTU_ret_err int info_initialize_pool_set(struct info_pool_set_t *p_set)
static double ABTI_get_wtime(void)
static ABT_pool ABTI_pool_get_handle(ABTI_pool *p_pool)
@ ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS
@ ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
@ ABT_INFO_QUERY_KIND_ENABLED_LOG
#define PRINT_STACK_FLAG_FINALIZE
#define ABT_VERSION
Version string of Argobots.
@ ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL
@ ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP
void ABTI_sched_print(ABTI_sched *p_sched, FILE *p_os, int indent, ABT_bool print_sub)