[Mochi-devel] Example of running other work units in the same execution stream as margo
Philip Davis
philip.e.davis at rutgers.edu
Tue Jul 28 14:44:29 CDT 2020
Got it, that makes sense. Thanks!
On Jul 28, 2020, at 2:23 PM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:
I don't think I have specific examples but:
If you use margo_init, Argobots will be initialized for you, including the ES that are used to run the Mercury progress loop and the RPC handlers. Under the cover, Margo actually creates 2 pools: a progress pool (where the ULT with the progress loop are pushed) and a handlers pool (where the ULTs corresponding to RPC handlers are pushed). You can get the handlers pool using margo_get_handler_pool and you can push your own ULT in it, using ABT_thread_create. The ULT will eventually be pulled out of the pool by one of the ES created by Margo and executed. If the ULT blocks on a mutex/rwlock/eventual/future or explicitly calls ABT_thread_yield, it will be put back into the pool, giving a chance for other ULTs (e.g. pending RPC handlers) to execute.
Let me know if you need a code example of that or if the explanation is sufficient.
Thanks,
Matthieu
On 28/07/2020, 17:17, "Philip Davis" <philip.e.davis at rutgers.edu<mailto:philip.e.davis at rutgers.edu>> wrote:
I am looking at the unrelated ULT case, but I’d also be interested in seeing an example of submitting inside the RPC handler if you have one.
On Jul 28, 2020, at 12:13 PM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:
Hi Philip,
Are you trying to submit new ULTs from inside an RPC handler? Or have totally unrelated ULTs that just happen to be in the same ES as RPC handlers?
Thanks,
Matthieu
On 28/07/2020, 16:49, "mochi-devel on behalf of Philip Davis" <mochi-devel-bounces at lists.mcs.anl.gov<mailto:mochi-devel-bounces at lists.mcs.anl.gov> on behalf of philip.e.davis at rutgers.edu<mailto:philip.e.davis at rutgers.edu>> wrote:
Hello,
Is there an example somewhere of a program that runs other work units in the same execution stream as the rpc handler for margo? I am a bit shaky on argobots usage, so any pointers would be helpful.
Thanks,
Philip
_______________________________________________
mochi-devel mailing list
mochi-devel at lists.mcs.anl.gov<mailto:mochi-devel at lists.mcs.anl.gov>
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mcs.anl.gov%2Fmailman%2Flistinfo%2Fmochi-devel&data=02%7C01%7Cphilip.e.davis%40rutgers.edu%7C110d6ae2ea214a77410a08d83323532b%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C637315574101128632&sdata=mhzd5iaCTTzrXH2FFz8d0EGLZbx4g7lBo1HFNqI4GWY%3D&reserved=0
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mcs.anl.gov%2Fresearch%2Fprojects%2Fmochi&data=02%7C01%7Cphilip.e.davis%40rutgers.edu%7C110d6ae2ea214a77410a08d83323532b%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C637315574101128632&sdata=XFnObSkIL0iptWCYBlyqwi2MA%2B3oL63AdCTq9p2oVfM%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mochi-devel/attachments/20200728/4245583a/attachment-0001.html>
More information about the mochi-devel
mailing list