[argobots-discuss] Idle Execution Stream

Iwasaki, Shintaro siwasaki at anl.gov
Fri May 7 17:45:38 CDT 2021

Hello Houjun,

Thanks for your question.
It depends on the setting. By default, the execution stream will busily check the pool, so it wastes its underlying core if the pool is empty.
If so, it competes with other non-Argobots threads.

To let idle execution streams sleep, Argobots provides a few options:

1. If you enable the scheduler sleep at configuration time, the ES that uses a builtin scheduler will sleep when it cannot consecutively find a ready ULT in its associated pools.
./configure --enable-sched-sleep
The sleep time is configurable via ABT_SCHED_SLEEP_NSEC=XXX
This implementation is very naive but it is easy for users to try.

2. If ABT_POOL_FIFO_WAIT is used to create a pool, the ES will timed-wait on an empty pool until a ULT is pushed to that pool.
Internally, it uses a condition variable, so it is smarter. This needs some efforts to use (at least you need to change the code).

Perhaps you might be interested in the following example.
The following PR is related. This (indirectly) shows how to check the CPU resource consumption by ESs.

If you have any further questions, please feel free to ask!


From: Houjun Tang via discuss <discuss at lists.argobots.org>
Sent: Friday, May 7, 2021 5:25 PM
To: discuss at argobots.org <discuss at argobots.org>
Cc: Houjun Tang <htang4 at lbl.gov>
Subject: [argobots-discuss] Idle Execution Stream


>From what I understand, an Argobots execution stream is mapped to a pthread, and the ULTs are executed by it. What happens when there is no ULT in the ES, does the pthread sleep and wait on a conditional variable until a new ULT is scheduled for execution? Does it compete with other non-Argobots threads for the CPU resources while idle?

Houjun Tang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.argobots.org/pipermail/discuss/attachments/20210507/a56ee6e0/attachment-0003.html>

More information about the discuss mailing list