[argobots-discuss] modifying scheduler event frequency?

Phil Carns carns at mcs.anl.gov
Wed Apr 14 14:18:12 CDT 2021


Hi all,

Is there a clean way to change a scheduler's event frequency on the fly?

Browsing the API, I see two possibilities:

  * set it when the scheduler is first created (using ABT_sched_basic_freq?)
  * set it dynamically by manipulating the ABT_sched_get_data() pointer,
    but this seems especially dangerous since the sched data struct
    definition isn't public (i.e. it could cause memory corruption if
    the internal struct def changed)

For some context (in case there is a different way to go about this 
entirely), I'm trying to figure out how to get 
ABT_info_trigger_print_all_thread_stacks() to print information more 
quickly, which IIUC relies on getting the active schedulers to call 
get_events() sooner.

I'm happy to add some explicit ABT_thread_yield() shortly after the 
ABT_info_trigger_print_all_thread_stacks() to at least get the calling 
ES to execute it's scheduler loop immediately, but I think that won't 
matter much if it doesn't trip the frequency counter when I do it.

Without this (at least with the _wait scheduler and threads that are 
occasionally tied up in system calls) I think the stack dump is likely 
to trigger too late to display what I'm hoping to capture when I call 
it.  The first example I tried appeared to essentially defer dump until 
shutdown.

thanks!

-Phil

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


More information about the discuss mailing list