[argobots-discuss] API was updated for better error handling

Iwasaki, Shintaro siwasaki at anl.gov
Sat Aug 22 00:03:01 CDT 2020

Dear All,

For better error handling, we updated returned error codes of Argobots functions
(see https://github.com/pmodels/argobots/pull/232).

In summary, most of the Argobots functions are classified into one of the three types:

1. A function that can be called by a ULT, a tasklet, or an external thread (e.g., Pthreads)
For example, ABT_thread_get_state(ABT_thread thread) can be called by any of them.

2. A function that can be called by a ULT or a tasklet, but not by an external thread
For example, an external thread may not call ABT_key_set().

3. A function that can be called only by a ULT
For example, only ULT can yield (ABT_thread_yield())

There exist two exceptions (ABT_task_self() and ABT_task_self_id()),
but they will be updated somehow in the future.

This update significantly could simplify the current execution contexts implicitly
assumed by Argobots functions.

>>IMPORTANT<< This change, however, broke the existing API in terms of error codes.
Your program might not work if the algorithm relies on the returned error code.
https://github.com/pmodels/argobots/pull/232 summarizes all the updated functions.
Though this should not affect the core functionality of Argobots, please let us know
if your program is broken by this update so that we can fix it.

Have a good weekend!

Shintaro Iwasaki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.argobots.org/pipermail/discuss/attachments/20200822/75189d8e/attachment.html>

More information about the discuss mailing list