Go to the documentation of this file.
11 FILE *fp,
double timeout,
void (*cb_func)(
ABT_bool,
void *),
void *arg);
208 #ifndef ABT_CONFIG_ENABLE_VER_20_API
212 switch (query_kind) {
219 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
231 #ifdef HAVE_VALGRIND_SUPPORT
238 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
251 #if !defined(ABTD_FCONTEXT_PRESERVE_FPU) && defined(ABT_CONFIG_USE_FCONTEXT)
259 #ifndef ABT_CONFIG_DISABLE_THREAD_CANCEL
266 #ifndef ABT_CONFIG_DISABLE_TASK_CANCEL
273 #ifndef ABT_CONFIG_DISABLE_MIGRATION
283 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
290 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
332 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
339 #ifdef ABT_CONFIG_USE_FCONTEXT
346 #if ABT_CONFIG_THREAD_TYPE == ABT_THREAD_TYPE_DYNAMIC_PROMOTION
353 #ifdef ABT_CONFIG_ENABLE_STACK_UNWIND
360 #if ABT_CONFIG_STACK_CHECK_TYPE == ABTI_STACK_CHECK_TYPE_CANARY
367 #if ABT_CONFIG_ACTIVE_WAIT_POLICY
411 #ifndef ABT_CONFIG_ENABLE_VER_20_API
417 fprintf(fp,
"Argobots is not initialized.\n");
458 #ifndef ABT_CONFIG_ENABLE_VER_20_API
464 fprintf(fp,
"Argobots is not initialized.\n");
472 fprintf(fp,
"# of created ESs: %d\n", p_global->
num_xstreams);
477 p_xstream = p_xstream->
p_next;
519 #ifndef ABT_CONFIG_ENABLE_VER_20_API
560 #ifndef ABT_CONFIG_ENABLE_VER_20_API
601 #ifndef ABT_CONFIG_ENABLE_VER_20_API
646 #ifndef ABT_CONFIG_ENABLE_VER_20_API
687 #ifndef ABT_CONFIG_ENABLE_VER_20_API
733 #ifndef ABT_CONFIG_ENABLE_VER_20_API
779 #ifndef ABT_CONFIG_ENABLE_VER_20_API
784 fprintf(fp,
"no stack\n");
792 fprintf(fp,
"no stack\n");
834 #ifndef ABT_CONFIG_ENABLE_VER_20_API
922 #define PRINT_STACK_FLAG_UNSET 0
923 #define PRINT_STACK_FLAG_INITIALIZE 1
924 #define PRINT_STACK_FLAG_WAIT 2
925 #define PRINT_STACK_FLAG_FINALIZE 3
944 if (self_value == 0) {
972 "ABT_info_trigger_print_all_thread_stacks: "
973 "timeout (only %d ESs stop)\n",
978 fprintf(
print_stack_fp,
"ABT_info_trigger_print_all_thread_stacks: "
979 "failed because of an internal error.\n");
1000 if (dec_value == 0) {
1009 fprintf(fp,
"Argobots Configuration:\n");
1011 fprintf(fp,
" - # of cores: %d\n", p_global->
num_cores);
1013 fprintf(fp,
" - huge page size: %zu B\n", p_global->
huge_page_size);
1014 fprintf(fp,
" - max. # of ESs: %d\n", p_global->
max_xstreams);
1015 fprintf(fp,
" - cur. # of ESs: %d\n", p_global->
num_xstreams);
1016 fprintf(fp,
" - ES affinity: %s\n",
1018 fprintf(fp,
" - logging: %s\n",
1020 fprintf(fp,
" - debug output: %s\n",
1022 fprintf(fp,
" - print errno: "
1023 #ifdef ABT_CONFIG_PRINT_ABT_ERRNO
1029 fprintf(fp,
" - valgrind support: "
1030 #ifdef HAVE_VALGRIND_SUPPORT
1036 fprintf(fp,
" - thread cancellation: "
1037 #ifndef ABT_CONFIG_DISABLE_THREAD_CANCEL
1043 fprintf(fp,
" - task cancellation: "
1044 #ifndef ABT_CONFIG_DISABLE_TASK_CANCEL
1050 fprintf(fp,
" - thread migration: "
1051 #ifndef ABT_CONFIG_DISABLE_MIGRATION
1057 fprintf(fp,
" - external thread: "
1058 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
1064 fprintf(fp,
" - error check: "
1065 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
1071 fprintf(fp,
" - tool interface: "
1078 fprintf(fp,
" - wait policy: "
1079 #ifdef ABT_CONFIG_ACTIVE_WAIT_POLICY
1085 fprintf(fp,
" - context-switch: "
1090 " (dynamic-promotion)"
1093 " (dynamic-promotion, no FPU save)"
1104 fprintf(fp,
" - key table entries: %" PRIu32
"\n",
1106 fprintf(fp,
" - default ULT stack size: %zu KB\n",
1108 fprintf(fp,
" - default scheduler stack size: %zu KB\n",
1110 fprintf(fp,
" - default scheduler event check frequency: %u\n",
1112 fprintf(fp,
" - default scheduler sleep: "
1113 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
1119 fprintf(fp,
" - default scheduler sleep duration : %" PRIu64
" [ns]\n",
1122 fprintf(fp,
" - timer function: "
1125 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
1126 "mach_absolute_time"
1127 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
1132 #ifdef ABT_CONFIG_USE_MEM_POOL
1133 fprintf(fp,
"Memory Pool:\n");
1134 fprintf(fp,
" - page size for allocation: %zu KB\n",
1135 p_global->mem_page_size / 1024);
1136 fprintf(fp,
" - stack page size: %zu KB\n", p_global->mem_sp_size / 1024);
1137 fprintf(fp,
" - max. # of stacks per ES: %u\n", p_global->mem_max_stacks);
1138 fprintf(fp,
" - max. # of descs per ES: %u\n", p_global->mem_max_descs);
1139 switch (p_global->mem_lp_alloc) {
1141 fprintf(fp,
" - large page allocation: malloc\n");
1144 fprintf(fp,
" - large page allocation: mmap regular pages\n");
1147 fprintf(fp,
" - large page allocation: mmap huge pages + "
1151 fprintf(fp,
" - large page allocation: mmap huge pages + THPs\n");
1154 fprintf(fp,
" - large page allocation: THPs\n");
1182 FILE *
fp = p_arg->
fp;
1187 fprintf(
fp,
"=== unknown (%p) ===\n", (
void *)unit);
1189 fprintf(
fp,
"=== ULT (%p) ===\n", (
void *)unit);
1193 "id : %" PRIu64
"\n"
1195 (uint64_t)thread_id, (
void *)&p_ythread->
ctx);
1198 fprintf(
fp,
"=== tasklet (%p) ===\n", (
void *)unit);
1205 if (p_pool == NULL) {
1206 fprintf(
fp,
"== NULL pool ==\n");
1214 fprintf(
fp,
"== pool (%p) ==\n", (
void *)p_pool);
1225 size_t default_len = 16;
1230 p_set->
len = default_len;
1243 for (i = 0; i < p_set->
num; i++) {
1244 if (p_set->
pools[i] == pool)
1248 if (p_set->
num == p_set->
len) {
1249 size_t new_len = p_set->
len * 2;
1254 p_set->
len = new_len;
1261 FILE *
fp,
double timeout,
void (*cb_func)(
ABT_bool,
void *),
void *arg)
1295 fprintf(fp,
"= xstream[%d] (%p) =\n", p_xstream->
rank,
1297 fprintf(fp,
"main_sched : %p\n", (
void *)p_main_sched);
1300 for (i = 0; i < p_main_sched->
num_pools; i++) {
1303 fprintf(fp,
" pools[%zu] : %p\n", i,
1311 p_xstream = p_xstream->
p_next;
1313 for (i = 0; i < pool_set.num; i++) {
1318 fprintf(fp,
" Failed to print (errno = %d).\n", abt_errno);
@ 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
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.
ABT_pool_print_all_fn p_print_all
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.
#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
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 ABT_THREAD_TYPE_DYNAMIC_PROMOTION
#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
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.
static ABTU_ret_err int info_print_thread_stacks_in_pool(FILE *fp, ABTI_pool *p_pool)
#define ABT_CONFIG_THREAD_TYPE
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
static void info_print_unit(void *arg, ABT_unit unit)
@ 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_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_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
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
@ 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
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)
static ABTD_atomic_int print_stack_barrier
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.
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 ABTI_thread * ABTI_unit_get_thread(ABTI_global *p_global, ABT_unit unit)
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)
void ABTI_ythread_print_stack(ABTI_ythread *p_ythread, FILE *p_os)
@ ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO
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
@ ABT_INFO_QUERY_KIND_WAIT_POLICY
#define ABTD_FCONTEXT_PRESERVE_FPU
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.
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)