XcalableMP 2.0 and Future Directions
251
Fig. 4 Syntax of the
tasklet, taskletwait,
and tasklets directives in
XMP
To support task parallelism in XMP as in OpenMP, the tasklet directive 2 is proposed in XMP 2.0. Figure 4 describes the syntax of the tasklet,
tasklets, and taskletwait directives for the multi-tasking execution in
XMP. The tasklet directive generates a task for the associated structured block
on the node specified by the on clause, and the task is scheduled and immediately
executed by an arbitrary thread in the specified node if there is no task dependency. If
it has any task dependencies, the task execution is postponed until all dependencies
are resolved. These behaviors occur when these tasks are surrounded by tasklets
directive. When these tasks are not surrounded by the tasklets directives, they
are executed sequentially at the specified node. The tasklet directive supports
several clauses for the description of the task dependency. The in, out, and inout
clauses represent the task dependency in a node. When in, out, or inout clause
presents on the tasklet directive, the generated task has each data dependency
in a node. The behavior of these data dependencies is same as OpenMP task
depend clause: flow, anti, and output dependencies.
The taskletwait directive waits on the completion of the generated tasks
on each node. Since the directive does not involve the barrier synchronization, the
barrier directive in XMP is also required in order to guarantee that all tasks of
all nodes are finished at this point. There is an implicit barrier on each node at the
end of the tasklets directive.
In OpenMP, the task dependencies are created according to the order of reading
and writing to data based on the sequential execution in a node. Therefore, the
OpenMP task parallel model cannot be directly applied to describe the dependency
between tasks running in different nodes since threads of each nodes are running in
parallel.
In OmpSs [10], interactions between nodes are described through the MPI
task that is executing MPI communications. Task dependency between nodes
is guaranteed by the completion of MPI point-to-point communication in tasks.
While this approach can satisfy dependencies between nodes, it may cause further
productivity degradation because it forces users to use a combination of two
programming models that are based on different description formats. Therefore,
we propose new directives for communication with tasks in XMP, and they enable
2 There is the task directive in XMP, it is different from OpenMP’s one.
Précédent

- 254/265

Suivant