With the new OMPT interface with OpenMP, it should be possible to develop tools to visualise the computation according to what thread is doing what work (which can be identified from things like the
Code: Select all
ompt_record_task_create_s.codeptr_ra
For example:
Code: Select all
for(...){
for(...){
#omp task .... name(pair)
{
pair_task(...);
}
}
#omp task ... name(self)
{
self_task(...);
}
}
Question on ompt_callback_schedule_task_t:
So my understanding of the ompt_callback_schedule_task_t is as follows (or at least, a subset of its behaviour with explicit tasks):
thread X completes executing task with task_data A
thread X calls the task scheduler to find a new task to execute with task_data B
thread X calls the ompt_callback_schedule_task_t (if enabled) with prior_task_data=A, prior_task_status=ompt_task_complete and next_task_data=B
thread executes the task with task_data B
If no task is available immediately (due to dependencies or some other reason), rather than the above behaviour will the task framework instead:
thread X finds no new task
thread X calls the ompt_callback_schedule_task_t with prior_task_data=A, prior_task_status=ompt_task_complete and next_task_data=NULL
and then wait to find a new task? If creating a timeline visualisation (for example) having a task appear to take much longer than accurate will not be good.
If this is the case, then having seperate callbacks on task_schedule and task_unschedule (i.e. cancel, yield, complete) may be useful in generating more accurate displays of behaviours.