[argobots-discuss] ABT_thread_yield_to() semantics when crossing pools

Iwasaki, Shintaro siwasaki at anl.gov
Wed Aug 12 10:31:45 CDT 2020


Hi Phil,

This is not explicitly mentioned, but ABT_thread_yield_to() works as follows:
- The yielded thread (Ty) is removed from Ty's pool. If failed (e.g., Ty is being executed by another ES), it causes an undefined behavior (NO ERROR CHECK).
- The current thread (Tc) suspends and is pushed to Tc's pool.

So unless the target thread is "ready" in the pool (i.e., not running, not completed), there is no problem.
It should work even if Ty and Tc are in separate or customized pools.

(This "NO ERROR CHECK" part cannot be easily fixed because of the current ABT_pool_remove() specification.
If you want to use this feature with an error check, please tell us (or create a GitHub issue) so that we can fix it.)

Thanks,
Shintaro Iwasaki

________________________________
From: Carns, Philip H. via discuss <discuss at lists.argobots.org>
Sent: Wednesday, August 12, 2020 9:56 AM
To: discuss at lists.argobots.org <discuss at lists.argobots.org>
Cc: Carns, Philip H. <carns at mcs.anl.gov>
Subject: [argobots-discuss] ABT_thread_yield_to() semantics when crossing pools

Hi,

I was just curious: what happens if you create a thread on a separate pool (with it's own execution streams) and then call ABT_thread_yield_to()?

Nothing?  Error?  Or maybe it pulls the ULT back to the local execution stream?

thanks!
-Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.argobots.org/pipermail/discuss/attachments/20200812/47944102/attachment.html>


More information about the discuss mailing list