250
M. Sato et al.
tasking model cannot be applied to describe the dependency between tasks running
in different nodes since threads of each nodes are running in parallel.
We propose new directives for communication with tasks in XMP, and they
enable users to write easily the multi-tasking execution based on XMP language
constructs. 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. The tasklet gmove directive copies the variable of the right-hand side
(RHS) into the left-hand side (LHS) of the associated assignment statement for local
or distributed data in tasks. If the variable of the RHS or the LHS is the remote
data, this directive may synchronize on data dependency between nodes and execute
communication. The tasklet reflect directive is a task-version of reflect operation. It
updates halo regions of the array specified to array-name in tasks. In this directive,
data dependency is automatically added to these tasks based on the communication
data because the boundary index of the distributed data is dynamically determined
by XMP runtime system.
We have designed a simple code translation algorithm from the proposed
directives to XMP runtime calls with MPI and OpenMP. We have evaluated
the performance using block-Cholesky Factorization Program on KNL basedsystem, Oakforest-PACS. Through the experiment, we confirmed the advantage
of task parallelism over the traditional loop-based data parallelism. At the same
time, we found the performance problems on communication between multiple
threads (MPI_THREAD_MULTIPLE). Currently, we are investigating a lower-level
communication API for efficient one-sided communication of PGAS operations in
multithreaded execution environment.
Details of the proposal in this chapter are described in [8].
3.1 OpenMP and XMP Tasklet Directive
While OpenMP originally focuses on work sharing for loops as the parallel
for directive, OpenMP 3.0 introduces task parallelism using the task directive. It
facilitates the parallelization where work is generated dynamically and irregularly
as in recursive structures or unbounded loops. The depend clause on the task
directive is supported from OpenMP 4.0 and specifies data dependencies with
dependence-type in, out, and inout. Task dependency can reduce the global
synchronization of a thread team because it can execute fine-grained synchronization between tasks through user-specified data dependencies.
M. Sato et al.
tasking model cannot be applied to describe the dependency between tasks running
in different nodes since threads of each nodes are running in parallel.
We propose new directives for communication with tasks in XMP, and they
enable users to write easily the multi-tasking execution based on XMP language
constructs. 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. The tasklet gmove directive copies the variable of the right-hand side
(RHS) into the left-hand side (LHS) of the associated assignment statement for local
or distributed data in tasks. If the variable of the RHS or the LHS is the remote
data, this directive may synchronize on data dependency between nodes and execute
communication. The tasklet reflect directive is a task-version of reflect operation. It
updates halo regions of the array specified to array-name in tasks. In this directive,
data dependency is automatically added to these tasks based on the communication
data because the boundary index of the distributed data is dynamically determined
by XMP runtime system.
We have designed a simple code translation algorithm from the proposed
directives to XMP runtime calls with MPI and OpenMP. We have evaluated
the performance using block-Cholesky Factorization Program on KNL basedsystem, Oakforest-PACS. Through the experiment, we confirmed the advantage
of task parallelism over the traditional loop-based data parallelism. At the same
time, we found the performance problems on communication between multiple
threads (MPI_THREAD_MULTIPLE). Currently, we are investigating a lower-level
communication API for efficient one-sided communication of PGAS operations in
multithreaded execution environment.
Details of the proposal in this chapter are described in [8].
3.1 OpenMP and XMP Tasklet Directive
While OpenMP originally focuses on work sharing for loops as the parallel
for directive, OpenMP 3.0 introduces task parallelism using the task directive. It
facilitates the parallelization where work is generated dynamically and irregularly
as in recursive structures or unbounded loops. The depend clause on the task
directive is supported from OpenMP 4.0 and specifies data dependencies with
dependence-type in, out, and inout. Task dependency can reduce the global
synchronization of a thread team because it can execute fine-grained synchronization between tasks through user-specified data dependencies.
