Skip to content

Commit

Permalink
rename bubbles into recursive tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
nfurmento committed Apr 4, 2024
1 parent 03d42ce commit aa562c8
Show file tree
Hide file tree
Showing 55 changed files with 473 additions and 472 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

StarPU 1.5.0
==============================================
Changes:
* Rename hierarchical tasks in recursive tasks

Small changes:
* Fix build system for StarPU Python interface

Expand Down
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2009-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2009-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2017 Guillaume Beauchamp
#
# StarPU is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -37,8 +37,8 @@ if STARPU_USE_MPI
SUBDIRS += mpi
endif

if STARPU_BUBBLE
SUBDIRS += bubble
if STARPU_RECURSIVE_TASKS
SUBDIRS += recursive_tasks
endif

if STARPU_BUILD_EXAMPLES
Expand Down
38 changes: 19 additions & 19 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,26 @@ AC_MSG_RESULT($enable_prof_tool)
# #
###############################################################################

AC_ARG_ENABLE(bubble, [AS_HELP_STRING([--enable-bubble],
[build the recursive tasks (a.k.a bubble) support])],
enable_bubble=$enableval, enable_bubble=no)
AC_ARG_ENABLE(recursive-tasks, [AS_HELP_STRING([--enable-recursive-tasks],
[build the recursive tasks support])],
enable_recursive_tasks=$enableval, enable_recursive_tasks=no)

AC_MSG_CHECKING([for recursive tasks - a.k.a bubble - support])
AC_MSG_CHECKING([for recursive tasks support])

if test x$enable_bubble = xyes; then
AC_DEFINE(STARPU_BUBBLE, [1], [Define this to enable recursive tasks support])
if test x$enable_recursive_tasks = xyes; then
AC_DEFINE(STARPU_RECURSIVE_TASKS, [1], [Define this to enable recursive tasks support])
fi

AM_CONDITIONAL([STARPU_BUBBLE], [test "x$enable_bubble" = "xyes"])
AC_MSG_RESULT($enable_bubble)
AM_CONDITIONAL([STARPU_RECURSIVE_TASKS], [test "x$enable_recursive_tasks" = "xyes"])
AC_MSG_RESULT($enable_recursive_tasks)

AC_MSG_CHECKING(whether bubble debug messages should be displayed)
AC_ARG_ENABLE(bubble-verbose, [AS_HELP_STRING([--enable-bubble-verbose],
[display verbose bubble messages])],
enable_bubble_verbose=$enableval, enable_bubble_verbose=no)
AC_MSG_RESULT($enable_bubble_verbose)
if test x$enable_bubble_verbose = xextra; then
AC_DEFINE(STARPU_BUBBLE_VERBOSE, [1], [display verbose bubble debug messages])
AC_MSG_CHECKING(whether recursive tasks debug messages should be displayed)
AC_ARG_ENABLE(recursive-tasks-verbose, [AS_HELP_STRING([--enable-recursive-tasks-verbose],
[display verbose recursive_tasks messages])],
enable_recursive_tasks_verbose=$enableval, enable_recursive_tasks_verbose=no)
AC_MSG_RESULT($enable_recursive_tasks_verbose)
if test x$enable_recursive_tasks_verbose = xextra; then
AC_DEFINE(STARPU_RECURSIVE_TASKS_VERBOSE, [1], [display verbose recursive tasks debug messages])
fi

###############################################################################
Expand Down Expand Up @@ -4343,7 +4343,7 @@ AC_CONFIG_COMMANDS([executable-scripts], [
; do
test -e $x || ( mkdir -p $(dirname $x) && ln -sf $ac_abs_top_srcdir/$x $(dirname $x) )
done
for x in tools julia/examples starpufft/tests examples examples/stencil mpi/tests mpi/examples socl/examples bubble/tests starpupy/examples starpu_openmp_llvm/examples \
for x in tools julia/examples starpufft/tests examples examples/stencil mpi/tests mpi/examples socl/examples recursive_tasks/tests starpupy/examples starpu_openmp_llvm/examples \
; do
test -e $x/loader.c || ln -sf $ac_abs_top_srcdir/tests/loader.c $x
done
Expand Down Expand Up @@ -4474,8 +4474,8 @@ AC_OUTPUT([
doc/doxygen_web_extensions/doxygen-config.cfg
tools/msvc/starpu_var.bat
min-dgels/Makefile
bubble/Makefile
bubble/tests/Makefile
recursive_tasks/Makefile
recursive_tasks/tests/Makefile
julia/Makefile
julia/src/Makefile
julia/src/dynamic_compiler/Makefile
Expand Down Expand Up @@ -4548,7 +4548,7 @@ AC_MSG_NOTICE([
Native fortran support: $enable_build_fortran
Native MPI fortran support: $use_mpi_fort
Support for multiple linear regression models: $support_mlr
Recursive tasks support: $enable_bubble
Recursive tasks support: $enable_recursive_tasks
JULIA enabled: $enable_julia
])

Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ PREDEFINED = STARPU_USE_OPENCL=1 \
STARPU_WORKER_CALLBACKS=1 \
STARPU_HAVE_GLPK_H=1 \
STARPU_USE_MPI_MASTER_SLAVE=1 \
STARPU_BUBBLE=1 \
STARPU_RECURSIVE_TASKS=1 \
__GCC__

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
Expand Down
4 changes: 2 additions & 2 deletions doc/doxygen/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ chapters = \
chapters/starpu_extensions/fault_tolerance.doxy \
chapters/starpu_extensions/fft_support.doxy \
chapters/starpu_extensions/socl_opencl_extensions.doxy \
chapters/starpu_extensions/bubble.doxy \
chapters/starpu_extensions/recursive_tasks.doxy \
chapters/starpu_extensions/parallel_worker.doxy \
chapters/starpu_extensions/darts.doxy \
chapters/starpu_extensions/interoperability.doxy \
Expand All @@ -107,7 +107,7 @@ chapters = \
chapters/files.doxy \
chapters/fdl_1_3.doxy \
chapters/api/fortran_support.doxy \
chapters/api/bubble_support.doxy \
chapters/api/recursive_tasks_support.doxy \
chapters/api/fft_support.doxy \
chapters/api/threads.doxy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

/*
* The file is empty but necessary to define the group API_Bubble
* The file is empty but necessary to define the group API_Recursive_Tasks
*/

/*! \defgroup API_Bubble Recursive Tasks
/*! \defgroup API_Recursive_Tasks Recursive Tasks

\brief API for Recursive Tasks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ the optimal size of the targeted computing resource.

<em>Recursive tasks</em> are tasks that can transform themselves into
a new task-graph dynamically at runtime. Programmers submit a coarse
version of the DAG, called the bubbles graph, which represents the
version of the DAG, called the recursive tasks graph, which represents the
general shape of the application tasks graph. The execution of this
bubble graph will generate and submit the computing tasks of the
recursive tasks graph will generate and submit the computing tasks of the
application. It is up to application programmers to decide how to
build the bubble graph (i.e. how to structure the computation tasks
graph to create some groups of tasks). Dependencies between bubbles
build the recursive tasks graph (i.e. how to structure the computation tasks
graph to create some groups of tasks). Dependencies between recursive tasks
are automatically deduced from dependencies between their computing
tasks.

//Figure of bubble task graph and computing task graph that maps with it
//Figure of recursive tasks graph and computing task graph that maps with it

\section BubblesExamples An Example
\section RecursiveTasksExamples An Example

In order to understand the recursive tasks model, an example of
"bubblification" is showed here. We start from a simple example,
multiplying the elements of a vector.

\subsection BubblesInitialVersion Initial Version
\subsection RecursiveTasksInitialVersion Initial Version

A computation is done several times on a vector split in smaller
vectors. For each step and each sub-vector, a task is generated to
Expand All @@ -71,7 +71,7 @@ struct starpu_codelet vector_cl =
.modes = {STARPU_RW}
};

int vector_no_bubble()
int vector_no_recursive_task()
{
TYPE *vector;
starpu_data_handle_t vhandle;
Expand All @@ -96,11 +96,11 @@ int vector_no_bubble()
}
\endcode

\subsection BubblesBubbleVersion Bubble Version
\subsection RecursiveTasksVersion Recursive Tasks Version

The bubble version of the code replaces the inner loop that realizes
the tasks insertion by a call to a bubble creation. At its execution,
the bubble will insert the computing tasks. The bubble graph is built
The recursive tasks version of the code replaces the inner loop that realizes
the tasks insertion by a call to a recursive tasks creation. At its execution,
the recursive task will insert the computing tasks. The recursive task graph is built
accordingly to the dependencies of the subdata.

\code{.c}
Expand All @@ -110,14 +110,14 @@ void no_func(void *buffers[], void *arg)
return;
}

int is_bubble(struct starpu_task *t, void *arg)
int is_recursive_task(struct starpu_task *t, void *arg)
{
(void)arg;
(void)t;
return 1;
}

void bubble_gen_dag(struct starpu_task *t, void *arg)
void recursive_task_gen_dag(struct starpu_task *t, void *arg)
{
int i;
starpu_data_handle_t *subdata = (starpu_data_handle_t *)arg;
Expand All @@ -131,15 +131,15 @@ void bubble_gen_dag(struct starpu_task *t, void *arg)
}
}

struct starpu_codelet bubble_codelet =
struct starpu_codelet recursive_task_codelet =
{
.cpu_funcs = {no_func},
.bubble_func = is_bubble,
.bubble_gen_dag_func = bubble_gen_dag,
.recursive_task_func = is_recursive_task,
.recursive_task_gen_dag_func = recursive_task_gen_dag,
.nbuffers = 1
};

int vector_bubble()
int vector_recursive_task()
{
TYPE *vector;
starpu_data_handle_t vhandle;
Expand All @@ -152,10 +152,10 @@ int vector_bubble()

for(loop=0 ; loop<NITER; loop++)
{
starpu_task_insert(&bubble_codelet,
starpu_task_insert(&recursive_task_codelet,
STARPU_RW, vhandle,
STARPU_NAME, "B1",
STARPU_BUBBLE_GEN_DAG_FUNC_ARG, sub_handles,
STARPU_RECURSIVE_TASK_GEN_DAG_FUNC_ARG, sub_handles,
0);
}

Expand All @@ -166,31 +166,31 @@ int vector_bubble()
}
\endcode

The full example is available in the file <c>bubble/tests/vector/vector.c</c>.
The full example is available in the file <c>recursive_tasks/tests/vector/vector.c</c>.

To define a recursive task, one needs to define the fields
starpu_codelet::bubble_func and starpu_codelet::bubble_gen_dag_func.
starpu_codelet::recursive_task_func and starpu_codelet::recursive_task_gen_dag_func.

The field starpu_codelet::bubble_func is a pointer function which will
The field starpu_codelet::recursive_task_func is a pointer function which will
be executed by StarPU to decide at runtime if the task must be
transformed into a bubble. If the function returns a non-zero value,
the function starpu_codelet::bubble_gen_dag_func will be executed to
transformed into a recursive_task. If the function returns a non-zero value,
the function starpu_codelet::recursive_task_gen_dag_func will be executed to
create the new graph of tasks.

The pointer functions can also be defined when calling
starpu_task_insert() by using the arguments ::STARPU_BUBBLE_FUNC and
::STARPU_BUBBLE_GEN_DAG_FUNC. Both these functions can be passed
parameters through the arguments ::STARPU_BUBBLE_FUNC_ARG and
::STARPU_BUBBLE_GEN_DAG_FUNC_ARG
starpu_task_insert() by using the arguments ::STARPU_RECURSIVE_TASK_FUNC and
::STARPU_RECURSIVE_TASK_GEN_DAG_FUNC. Both these functions can be passed
parameters through the arguments ::STARPU_RECURSIVE_TASK_FUNC_ARG and
::STARPU_RECURSIVE_TASK_GEN_DAG_FUNC_ARG

When executed, the function starpu_codelet::bubble_func will be given
When executed, the function starpu_codelet::recursive_task_func will be given
as parameter the task being checked, and the value specified with
::STARPU_BUBBLE_FUNC_ARG.
::STARPU_RECURSIVE_TASK_FUNC_ARG.

When executed, the function starpu_codelet::bubble_gen_dag_func will be
When executed, the function starpu_codelet::recursive_task_gen_dag_func will be
given as parameter the task being turned into a recursive task and
the value specified with ::STARPU_BUBBLE_GEN_DAG_FUNC_ARG.
the value specified with ::STARPU_RECURSIVE_TASK_GEN_DAG_FUNC_ARG.

An example involving these functions is in <c>bubble/tests/basic/brec.c</c>. And more examples are available in <c>bubble/tests/basic/*.c</c>.
An example involving these functions is in <c>recursive_tasks/tests/basic/brec.c</c>. And more examples are available in <c>recursive_tasks/tests/basic/*.c</c>.

*/
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ Enable OpenMP Support (\ref OpenMPRuntimeSupport)
Enable LLVM OpenMP Support (\ref OMPLLVM)
</dd>

<dt>--enable-bubble</dt>
<dt>--enable-recursive-tasks</dt>
<dd>
\anchor enable-bubble
\addindex __configure__--enable-bubble
\anchor enable-recursive-tasks
\addindex __configure__--enable-recursive-tasks
Enable recursive tasks support (\ref RecursiveTasks)

<dt>--enable-parallel-worker</dt>
Expand Down
4 changes: 2 additions & 2 deletions doc/doxygen/doxygen-config-include.cfg.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2009-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2009-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2011 Télécom-SudParis
# Copyright (C) 2013 Simon Archipoff
#
Expand Down Expand Up @@ -45,7 +45,7 @@ INPUT += @top_builddir@/doc/doxygen/starpu_config.h \
@top_srcdir@/mpi/include/starpu_mpi_ft.h \
@top_srcdir@/mpi/include/starpu_mpi_lb.h \
@top_srcdir@/mpi/include/fstarpu_mpi_mod.f90 \
@top_srcdir@/doc/doxygen/chapters/api/bubble_support.doxy \
@top_srcdir@/doc/doxygen/chapters/api/recursive_tasks_support.doxy \
@top_srcdir@/include/starpu_bitmap.h \
@top_srcdir@/include/starpu_bound.h \
@top_srcdir@/include/starpu_deprecated_api.h \
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/doxygen-config.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ INPUT = @top_srcdir@/doc/doxygen/chapters/starpu_introduction/i
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/fault_tolerance.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/fft_support.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/socl_opencl_extensions.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/bubble.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/recursive_tasks.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/parallel_worker.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/darts.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/interoperability.doxy \
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/refman.tex
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ \chapter{Module Documentation a.k.a StarPU's API}
\hypertarget{ModuleDocumentation}{}

\input{group__API__Bitmap}
\input{group__API__Bubble}
\input{group__API__Recursive__Tasks}
\input{group__API__Codelet__And__Tasks}
\input{group__API__CUDA__Extensions}
\input{group__API__Data__Interfaces}
Expand Down
4 changes: 2 additions & 2 deletions doc/doxygen_web_extensions/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2009-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2009-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
#
# StarPU is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -46,7 +46,7 @@ chapters = \
../doxygen/chapters/starpu_extensions/fault_tolerance.doxy \
../doxygen/chapters/starpu_extensions/fft_support.doxy \
../doxygen/chapters/starpu_extensions/socl_opencl_extensions.doxy \
../doxygen/chapters/starpu_extensions/bubble.doxy \
../doxygen/chapters/starpu_extensions/recursive_tasks.doxy \
../doxygen/chapters/starpu_extensions/parallel_worker.doxy \
../doxygen/chapters/starpu_extensions/darts.doxy \
../doxygen/chapters/starpu_extensions/interoperability.doxy \
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen_web_extensions/doxygen-config.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ INPUT = @top_srcdir@/doc/doxygen/chapters/starpu_extensions/ext
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/fault_tolerance.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/fft_support.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/socl_opencl_extensions.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/bubble.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/recursive_tasks.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/parallel_worker.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/darts.doxy \
@top_srcdir@/doc/doxygen/chapters/starpu_extensions/interoperability.doxy \
Expand Down
2 changes: 1 addition & 1 deletion include/starpu_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
*/
#undef STARPU_OPENMP

#undef STARPU_BUBBLE
#undef STARPU_RECURSIVE_TASKS
#undef STARPU_PARALLEL_WORKER

#undef STARPU_SIMGRID
Expand Down
Loading

0 comments on commit aa562c8

Please sign in to comment.