ARGOBOTS
Functions
Information

Functions

int ABT_info_query_config (ABT_info_query_kind query_kind, void *val)
 Get the configuration information associated with query_kind. More...
 
int ABT_info_print_config (FILE *fp)
 Write the configuration information to the output stream. More...
 
int ABT_info_print_all_xstreams (FILE *fp)
 Write the information of all created ESs to the output stream. More...
 
int ABT_info_print_xstream (FILE *fp, ABT_xstream xstream)
 Write the information of the target ES to the output stream. More...
 
int ABT_info_print_sched (FILE *fp, ABT_sched sched)
 Write the information of the target scheduler to the output stream. More...
 
int ABT_info_print_pool (FILE *fp, ABT_pool pool)
 Write the information of the target pool to the output stream. More...
 
int ABT_info_print_thread (FILE *fp, ABT_thread thread)
 Write the information of the target ULT to the output stream. More...
 
int ABT_info_print_thread_attr (FILE *fp, ABT_thread_attr attr)
 Write the information of the target ULT attribute to the output stream. More...
 
int ABT_info_print_task (FILE *fp, ABT_task task)
 Write the information of the target tasklet to the output stream. More...
 
int ABT_info_print_thread_stack (FILE *fp, ABT_thread thread)
 Dump the stack of the target thread to the output stream. More...
 
int ABT_info_print_thread_stacks_in_pool (FILE *fp, ABT_pool pool)
 Dump stack information of all the threads in the target pool. More...
 
int ABT_info_trigger_print_all_thread_stacks (FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg)
 Dump stacks of threads in pools existing in Argobots. More...
 

Detailed Description

This group is for getting diverse runtime information of Argobots. The routines in this group are meant for debugging and diagnosing Argobots.

Function Documentation

int ABT_info_print_all_xstreams ( FILE *  fp)

Write the information of all created ESs to the output stream.

ABT_info_print_all_xstreams() writes the information of all ESs to the given output stream fp.

Parameters
[in]fpoutput stream
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_UNINITIALIZEDArgobots has not been initialized

Definition at line 268 of file info.c.

int ABT_info_print_config ( FILE *  fp)

Write the configuration information to the output stream.

ABT_info_print_config() writes the configuration information to the given output stream fp.

Parameters
[in]fpoutput stream
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_UNINITIALIZEDArgobots has not been initialized

Definition at line 251 of file info.c.

int ABT_info_print_pool ( FILE *  fp,
ABT_pool  pool 
)

Write the information of the target pool to the output stream.

ABT_info_print_pool() writes the information of the target pool pool to the given output stream fp.

Parameters
[in]fpoutput stream
[in]poolhandle to the target pool
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 366 of file info.c.

int ABT_info_print_sched ( FILE *  fp,
ABT_sched  sched 
)

Write the information of the target scheduler to the output stream.

ABT_info_print_sched() writes the information of the target scheduler sched to the given output stream fp.

Parameters
[in]fpoutput stream
[in]schedhandle to the target scheduler
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 338 of file info.c.

int ABT_info_print_task ( FILE *  fp,
ABT_task  task 
)

Write the information of the target tasklet to the output stream.

ABT_info_print_task() writes the information of the target tasklet task to the given output stream fp.

Parameters
[in]fpoutput stream
[in]taskhandle to the target tasklet
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 451 of file info.c.

int ABT_info_print_thread ( FILE *  fp,
ABT_thread  thread 
)

Write the information of the target ULT to the output stream.

ABT_info_print_thread() writes the information of the target ULT thread to the given output stream fp.

Parameters
[in]fpoutput stream
[in]threadhandle to the target ULT
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 394 of file info.c.

int ABT_info_print_thread_attr ( FILE *  fp,
ABT_thread_attr  attr 
)

Write the information of the target ULT attribute to the output stream.

ABT_info_print_thread_attr() writes the information of the target ULT attribute attr to the given output stream fp.

Parameters
[in]fpoutput stream
[in]attrhandle to the target ULT attribute
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 423 of file info.c.

int ABT_info_print_thread_stack ( FILE *  fp,
ABT_thread  thread 
)

Dump the stack of the target thread to the output stream.

ABT_info_print_thread_stack() dumps the call stack of thread to the given output stream fp.

Parameters
[in]fpoutput stream
[in]threadhandle to the target thread
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 479 of file info.c.

int ABT_info_print_thread_stacks_in_pool ( FILE *  fp,
ABT_pool  pool 
)

Dump stack information of all the threads in the target pool.

ABT_info_print_thread_stacks_in_pool() dumps call stacks of all threads stored in pool. This function returns ABT_ERR_POOL if pool does not support p_print_all.

Parameters
[in]fpoutput stream
[in]poolhandle to the target pool
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 550 of file info.c.

int ABT_info_print_xstream ( FILE *  fp,
ABT_xstream  xstream 
)

Write the information of the target ES to the output stream.

ABT_info_print_xstream() writes the information of the target ES xstream to the given output stream fp.

Parameters
[in]fpoutput stream
[in]xstreamhandle to the target ES
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 310 of file info.c.

int ABT_info_query_config ( ABT_info_query_kind  query_kind,
void *  val 
)

Get the configuration information associated with query_kind.

ABT_info_query_config() gets the configuration information associated with the given query_kind and writes a value to val.

The behavior of ABT_info_query_config() depends on query_kind.

  • ABT_INFO_QUERY_KIND_ENABLED_DEBUG val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the debug mode is enabled. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to print an error number when an error happens. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_LOG val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to print debug messages. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_VALGRIND val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to be Valgrind friendly. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR val must be a pointer to a variable of the type ABT_bool. ABT_FALSE is set to *val if the Argobots library is configured to ignore some error checks. Otherwise, ABT_TRUE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER val must be a pointer to a variable of the type ABT_bool. ABT_FALSE is set to *val if the Argobots library is configured to ignore an access violation error regarding pool producers. Otherwise, ABT_TRUE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER val must be a pointer to a variable of the type ABT_bool. ABT_FALSE is set to *val if the Argobots library is configured to ignore an access violation error regarding pool consumers. Otherwise, ABT_TRUE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to save floating-point registers on user-level context switching. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the thread cancellation feature. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the task cancellation feature. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_MIGRATION val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the thread/task migration cancellation feature. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the stackable scheduler feature is supported. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the external thread feature is supported. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the sleep feature of predefined schedulers. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to print all the configuration settings on ABT_init(). Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_ENABLED_AFFINITY val must be a pointer to a variable of the type ABT_bool. ABT_TRUE is set to *val if the Argobots library is configured to enable the affinity setting. Otherwise, ABT_FALSE is set.
  • ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS val must be a pointer to a variable of the type unsigned int. The maximum number of execution streams that can be created in Argobots is set to *val.
  • ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE val must be a pointer to a variable of the type size_t. The default stack size of ULTs is set to *val.
  • ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE val must be a pointer to a variable of the type size_t. The default stack size of ULT-type schedulers is set to *val.
  • ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ val must be a pointer to a variable of the type uint64_t. The default event-checking frequency of predefined schedulers is set to *val.
  • ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC val must be a pointer to a variable of the type uint64_t. The default sleep time (nanoseconds) of predefined schedulers is set to *val.
Parameters
[in]query_kindquery kind
[out]vala pointer to a result
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_INV_QUERY_KINDgiven query kind is invalid
ABT_ERR_UNINITIALIZEDArgobots has not been initialized

Definition at line 108 of file info.c.

int ABT_info_trigger_print_all_thread_stacks ( FILE *  fp,
double  timeout,
void(*)(ABT_bool, void *)  cb_func,
void *  arg 
)

Dump stacks of threads in pools existing in Argobots.

ABT_info_trigger_print_all_thread_stacks() tries to dump call stacks of all threads stored in pools in the Argobots runtime. This function itself does not print stacks; it immediately returns after updating a flag. Stacks are printed when all execution streams stop in ABT_xstream_check_events().

If some execution streams do not stop within a certain time period, one of the stopped execution streams starts to print stack information. In this case, this function might not work correctly and at worst causes a crash. This function does not work at all if no execution stream executes ABT_xstream_check_events().

cb_func is called after completing stack dump unless it is NULL. The first argument is set to ABT_TRUE if not all the execution streams stop within timeout. Otherwise, ABT_FALSE is set. The second argument is user-defined data arg. Since cb_func is not called by a thread or an execution stream, ABT_self_...() functions in cb_func return undefined values. Neither signal-safety nor thread-safety is required for cb_func.

In Argobots, ABT_info_trigger_print_all_thread_stacks is exceptionally signal-safe; it can be safely called in a signal handler.

The following threads are not captured in this function:

  • threads that are suspending (e.g., by ABT_thread_suspend())
  • threads in pools that are not associated with main schedulers
Parameters
[in]fpoutput stream
[in]timeouttimeout (second). Disabled if the value is negative.
[in]cb_funccall-back function
[in]argan argument passed to cb_func
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 680 of file info.c.