Browse Source

Merge remote-tracking branch 'origin/master'

HE Kun 3 years ago
parent
commit
57459c4a0c
100 changed files with 2596 additions and 459 deletions
  1. 17 8
      .gitlab-ci.yml
  2. 2 0
      AUTHORS
  3. 18 2
      ChangeLog
  4. 4 0
      Makefile.am
  5. 7 0
      README.dev
  6. 147 75
      configure.ac
  7. 1 1
      contrib/ci.inria.fr/job-1-check.sh
  8. 19 5
      doc/doxygen/Makefile.am
  9. 3 0
      doc/doxygen/chapters/000_introduction.doxy
  10. 15 15
      doc/doxygen/chapters/210_check_list_performance.doxy
  11. 9 4
      doc/doxygen/chapters/310_data_management.doxy
  12. 42 1
      doc/doxygen/chapters/320_scheduling.doxy
  13. 114 17
      doc/doxygen/chapters/380_offline_performance_tools.doxy
  14. 1 1
      doc/doxygen/chapters/400_python.doxy
  15. 86 0
      doc/doxygen/chapters/497_eclipse_plugin.doxy
  16. 119 2
      doc/doxygen/chapters/501_environment_variables.doxy
  17. 12 0
      doc/doxygen/chapters/510_configure_options.doxy
  18. 1 1
      doc/doxygen/chapters/code/disk_compute.c
  19. BIN
      doc/doxygen/chapters/images/eclipse_hello_build.png
  20. BIN
      doc/doxygen/chapters/images/eclipse_hello_fxt.png
  21. BIN
      doc/doxygen/chapters/images/eclipse_hello_graph.png
  22. BIN
      doc/doxygen/chapters/images/eclipse_hello_hgraph.png
  23. BIN
      doc/doxygen/chapters/images/eclipse_hello_paje_trace.png
  24. BIN
      doc/doxygen/chapters/images/eclipse_hello_plugin.png
  25. BIN
      doc/doxygen/chapters/images/eclipse_hello_run.png
  26. BIN
      doc/doxygen/chapters/images/eclipse_hello_svg_graph.png
  27. BIN
      doc/doxygen/chapters/images/eclipse_hello_vite.png
  28. BIN
      doc/doxygen/chapters/images/eclipse_install_cdt.png
  29. BIN
      doc/doxygen/chapters/images/eclipse_install_pde.png
  30. BIN
      doc/doxygen/chapters/images/eclipse_installer.png
  31. 1 1
      doc/doxygen/dev/starpu_check_include.sh
  32. 1 0
      doc/doxygen/doxygen-config.cfg.in
  33. 2 1
      doc/doxygen/doxygen.cfg
  34. 6 0
      doc/doxygen/refman.tex
  35. 43 0
      doc/doxygen/sectionNumbering.py
  36. 4 2
      doc/doxygen_dev/Makefile.am
  37. 1 1
      doc/doxygen_dev/dev/starpu_check_missing.sh
  38. 1 0
      doc/doxygen_dev/doxygen-config.cfg.in
  39. 2 1
      doc/doxygen_dev/doxygen.cfg
  40. 6 5
      doc/tutorial/Makefile
  41. 19 15
      doc/tutorial/vector_scal_opencl.c
  42. 11 0
      eclipse-plugin/.classpath
  43. 1 0
      eclipse-plugin/.gitignore
  44. 28 0
      eclipse-plugin/.project
  45. 9 0
      eclipse-plugin/.settings/org.eclipse.jdt.core.prefs
  46. 12 0
      eclipse-plugin/META-INF/MANIFEST.MF
  47. 34 0
      eclipse-plugin/Makefile.am
  48. 8 0
      eclipse-plugin/build.properties
  49. 343 0
      eclipse-plugin/build.xml
  50. 35 0
      eclipse-plugin/examples/Makefile.am
  51. 242 0
      eclipse-plugin/examples/hello/.cproject.in
  52. 26 0
      eclipse-plugin/examples/hello/.project
  53. 48 0
      eclipse-plugin/examples/hello/.settings/language.settings.xml
  54. 133 0
      eclipse-plugin/examples/hello/hello.c
  55. BIN
      eclipse-plugin/icons/fxt.png
  56. BIN
      eclipse-plugin/icons/svg.png
  57. BIN
      eclipse-plugin/icons/taskGraph.png
  58. BIN
      eclipse-plugin/icons/vite.png
  59. 159 0
      eclipse-plugin/plugin.xml
  60. 54 0
      eclipse-plugin/src/Makefile.am
  61. 7 0
      eclipse-plugin/src/deploy/build.xml
  62. 79 0
      eclipse-plugin/src/deploy/javaCompilerArgs
  63. 82 0
      eclipse-plugin/src/starpu/handlers/SvgHandler.java
  64. 68 0
      eclipse-plugin/src/starpu/handlers/TaskGraphHandler.java
  65. 70 0
      eclipse-plugin/src/starpu/handlers/TraceGenHandler.java
  66. 95 0
      eclipse-plugin/src/starpu/handlers/TraceUtils.java
  67. 49 0
      eclipse-plugin/src/starpu/handlers/TraceVizHandler.java
  68. 36 0
      eclipse-plugin/tools/cproject.sh
  69. 30 0
      eclipse-plugin/tools/install_workspace.sh
  70. 3 1
      examples/Makefile.am
  71. 2 2
      examples/axpy/axpy.c
  72. 0 1
      examples/basic_examples/task_insert_color.c
  73. 6 6
      examples/cg/cg.c
  74. 1 1
      examples/cholesky/cholesky_kernels.c
  75. 7 1
      examples/filters/fmultiple_manual.c
  76. 1 1
      examples/filters/fmultiple_submit_readonly.c
  77. 0 244
      examples/filters/fplan_notautomatic.c
  78. 1 1
      examples/filters/fread.c
  79. 4 0
      examples/filters/frecursive.c
  80. 3 3
      examples/heat/dw_factolu.c
  81. 0 2
      examples/heat/dw_factolu_kernels.c
  82. 1 1
      examples/heat/heat.c
  83. 1 1
      examples/heat/heat.h
  84. 1 0
      examples/lu/lu.sh
  85. 1 1
      examples/lu/lu_example.c
  86. 0 2
      examples/lu/xlu_kernels.c
  87. 1 1
      examples/mult/sgemm.sh
  88. 43 6
      examples/mult/xgemm.c
  89. 1 1
      examples/pi/SobolQRNG/sobol_gold.c
  90. 4 2
      examples/sched_ctx/gpu_partition.c
  91. 1 2
      examples/sched_ctx/sched_ctx.c
  92. 3 2
      examples/sched_ctx/sched_ctx_without_sched_policy.c
  93. 1 2
      examples/spmv/matrix_market/mm_to_bcsr.c
  94. 6 6
      examples/spmv/spmv.c
  95. 84 2
      include/schedulers/starpu_heteroprio.h
  96. 1 0
      include/starpu.h
  97. 25 1
      include/starpu_data.h
  98. 8 8
      include/starpu_data_filters.h
  99. 24 0
      include/starpu_data_interfaces.h
  100. 0 0
      include/starpu_stdlib.h

+ 17 - 8
.gitlab-ci.yml

@@ -30,20 +30,29 @@ build:
       when: never  # Prevent pipeline run for push event
     - when: always # Run pipeline for all other cases
 
-check:
+.check_template:
   stage: deploy
-  script:
-    - ./contrib/gitlab/deploy.sh
+  needs: [build]
+  dependencies:
+    - build
   rules:
     - if: '$CI_PIPELINE_SOURCE == "push"'
       when: never  # Prevent pipeline run for push event
     - when: always # Run pipeline for all other cases
 
+check_linux:
+  extends: .check_template
+  tags : ["linux"]
+  script:
+    - ./contrib/gitlab/deploy.sh
+
+check_macosx:
+  extends: .check_template
+  tags : ["macosx"]
+  script:
+    - ./contrib/gitlab/deploy.sh
+
 simgrid:
-  stage: deploy
+  extends: .check_template
   script:
     - ./contrib/gitlab/simgrid.sh
-  rules:
-    - if: '$CI_PIPELINE_SOURCE == "push"'
-      when: never  # Prevent pipeline run for push event
-    - when: always # Run pipeline for all other cases

+ 2 - 0
AUTHORS

@@ -11,6 +11,7 @@ Collin Nicolas, Inria, <nicolas.collin@inria.fr>
 Danjean Vincent, University Grenoble Alpes, <Vincent.Danjean@ens-lyon.org>
 Denis Alexandre, Inria, <alexandre.denis@inria.fr>
 Eyraud-Dubois Lionel, Inria, <lionel.eyraud-dubois@inria.fr>
+Flint Clément, Inria, <clement.flint@inria.fr>
 Furmento Nathalie, CNRS, <nathalie.furmento@labri.fr>
 Guermouche Amina, Télécom SudParis, <amina.guermouche@inria.fr>
 Guilbaud Adrien, Inria, <adrien.guilbaud@inria.fr>
@@ -30,6 +31,7 @@ Nakov Stojce, Inria, <stojce.nakov@inria.fr>
 Namyst Raymond, Université de Bordeaux, <raymond.namyst@labri.fr>
 Nesi Lucas Leandro, Federal University of Rio Grande do Sul (UFRGS), <llnesi@inf.ufrgs.br>
 Pablo Joris, Inria, <joris.pablo@orange.fr>
+Paillat Ludovic, Inria, <ludovic.paillat@inria.fr>
 Pasqualinotto Damien, Université de Bordeaux, <dam.pasqualinotto@wanadoo.fr>
 Pinto Vinicius Garcia, <vgpinto@inf.ufrgs.br>
 Pitoiset Samuel, Inria, <samuel.pitoiset@inria.fr>

+ 18 - 2
ChangeLog

@@ -53,10 +53,21 @@ New features:
   * Add peek_data interface method.
   * Add STARPU_MPI_REDUX
   * Add starpu_data_query_status2 function.
+  * Add starpu_data_evict_from_node function.
+  * Add a StarPU Eclipse Plugin
 
 Small features:
   * New configure option --with-check-cflags to define flags for C,
     CXX and Fortran compilers
+  * FxT is now automatically enabled at build-time, but not enabled at
+    run-time by default any more, STARPU_FXT_TRACE needs to be explicitly set to
+    1 to enable FxT trace recording.
+  * Deprecate starpu_free() and add new function starpu_free_noflag()
+    to specify allocated size.
+
+Changes:
+  * The redux codelet should expose the STARPU_COMMUTE flag, since StarPU
+    actually uses commutability.
 
 Small changes:
   * Add a synthetic energy efficiency testcase.
@@ -65,8 +76,13 @@ Small changes:
   * Rename
     - starpu_conf::sched_policy_init to starpu_conf::sched_policy_callback
     and
-   - starpu_sched_ctx_get_sched_policy_init() to starpu_sched_ctx_get_sched_policy_callback()
-   as the callback function may not only be used for init purposes
+    - starpu_sched_ctx_get_sched_policy_init() to starpu_sched_ctx_get_sched_policy_callback()
+    as the callback function may not only be used for init purposes
+  - Change the default value for configure option --enable-maxcpus to
+    auto. it allows StarPU to automatically use the number of CPUs
+    on the build machine.
+  - New option --worker for tool starpu_machine_display to only
+    display workers of a specific type
 
 StarPU 1.3.8
 ====================================================================

+ 4 - 0
Makefile.am

@@ -67,6 +67,10 @@ if STARPU_USE_JULIA
 SUBDIRS += julia
 endif
 
+if STARPU_BUILD_ECLIPSE_PLUGIN
+SUBDIRS += eclipse-plugin
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
 

+ 7 - 0
README.dev

@@ -113,3 +113,10 @@ Only real LDFLAGS such as -no-undefined go to LDFLAGS.
 If a program foo needs more libraries, it can put then in foo_LDADD.
 
 (No, AM_LDADD does not exist)
+
+All install rules must use $(DESTDIR) so that
+
+./configure --prefix=/usr && make && make install DESTDIR=/tmp/foobar
+
+can properly work, as it is used by distributions. That can easily checked by
+*not* running it as root.

+ 147 - 75
configure.ac

@@ -1060,7 +1060,15 @@ fi
 AC_MSG_CHECKING(maximum number of CPUs)
 AC_ARG_ENABLE(maxcpus, [AS_HELP_STRING([--enable-maxcpus=<number>],
 			[maximum number of CPUs])],
-			maxcpus=$enableval, maxcpus=64)
+			maxcpus=$enableval, maxcpus=auto)
+if test x$maxcpus == xauto
+then
+	maxcpus=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
+	if test x$maxcpus = x
+	then
+		AC_MSG_ERROR([cannot get the number of CPUS, please specify a numerical value with --enable-maxcpus])
+	fi
+fi
 AC_MSG_RESULT($maxcpus)
 AC_DEFINE_UNQUOTED(STARPU_MAXCPUS, [$maxcpus], [Maximum number of CPUs supported])
 
@@ -1836,94 +1844,104 @@ AC_MSG_RESULT($enable_coverity)
 AM_CONDITIONAL(STARPU_COVERITY, test x$enable_coverity = xyes)
 
 # shall we use FxT to generate trace of the execution ?
-AC_MSG_CHECKING(whether FxT traces should be generated)
-AC_ARG_WITH(fxt, [AS_HELP_STRING([--with-fxt[[=<dir>]]], [generate fxt traces])],
+AC_ARG_ENABLE(fxt, [AS_HELP_STRING([--disable-fxt],
+		[disable FxT trace mechanisms])],, [enable_fxt=maybe])
+AC_ARG_WITH(fxt,
+	[AS_HELP_STRING([--with-fxt=<path>],
+	[specify FxT installation directory])],
 	[
-		if test x$withval != xno; then
-			use_fxt=yes
-			if test x$withval = xyes; then
-				AC_MSG_RESULT(yes)
-				use_fxt_from_system=yes
-			else
-				# use specified path
-				# TODO check if the dir is actually containing FxT
-				use_fxt_from_system=no
-				fxtdir=$withval
-				AC_MSG_RESULT(yes using $fxtdir)
-				AC_SUBST(FXTDIR, $fxtdir)
-			fi
-		else
-			use_fxt=no
-			AC_MSG_RESULT(no)
-		fi
+		fxt_dir="$withval"
+		use_fxt_from_system=no
+		# in case this was not explicit yet
+		enable_fxt=yes
+		AC_SUBST(FXTDIR, $fxt_dir)
 	],
 	[
-		use_fxt=no
-		AC_MSG_RESULT(no)
+		use_fxt_from_system=yes
+		fxt_dir=""
 	])
-AC_SUBST(STARPU_USE_FXT, $use_fxt)
-AM_CONDITIONAL(STARPU_USE_FXT, test x$use_fxt = xyes)
-
-if test x$use_fxt = xyes; then
-	AC_DEFINE(STARPU_USE_FXT, [1], [enable FxT traces])
-	AC_DEFINE(CONFIG_FUT, [1], [enable FUT traces])
 
+if test x$enable_fxt != xno; then
 	if test x$use_fxt_from_system = xno; then
 	    save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
-	    PKG_CONFIG_PATH="$fxtdir/lib/pkgconfig:$PKG_CONFIG_PATH"
-	    PKG_CHECK_MODULES([FXT],  [fxt], , [
+	    PKG_CONFIG_PATH="$fxt_dir/lib/pkgconfig:$PKG_CONFIG_PATH"
+	    PKG_CHECK_MODULES([FXT],  [fxt], [have_valid_fxt=yes], [
+	    	have_valid_fxt=yes
 		AC_MSG_WARN([Old FxT without fxt.pc file, hoping link will succeed])
-		FXT_CFLAGS="-I$fxtdir/include/ "
-		FXT_LDFLAGS="-L$fxtdir/lib/"
+		FXT_CFLAGS="-I$fxt_dir/include/ "
+		FXT_LDFLAGS="-L$fxt_dir/lib/"
 		AC_ARG_VAR(FXT_LDFLAGS)
 		FXT_LIBS="-lfxt"
 	    ])
 	    PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
 	else
-	    PKG_CHECK_MODULES([FXT],  [fxt])
-	fi
-	save_LIBS="$LIBS"
-	LIBS="$LIBS $FXT_LIBS"
-	save_LDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS $FXT_LDFLAGS"
-	AC_CHECK_FUNCS([fxt_close])
-	AC_CHECK_FUNCS([fxt_blockev_leave])
-	AC_CHECK_FUNCS([enable_fut_flush])
-	AC_CHECK_FUNCS([fut_set_filename])
-	AC_CHECK_FUNCS([fut_setup_flush_callback])
-	LDFLAGS="$save_LDFLAGS"
-	LIBS="$save_LIBS"
-	save_CFLAGS="$CFLAGS"
-	CFLAGS="$CFLAGS $FXT_CFLAGS"
-	AC_CHECK_DECLS([enable_fut_flush], [], [], [[#include <fut.h>]])
-	AC_CHECK_DECLS([fut_set_filename], [], [], [[#include <fut.h>]])
-	AC_CHECK_DECLS([fut_setup_flush_callback], [], [], [[#include <fut.h>]])
-	CFLAGS="$save_CFLAGS"
-
-	if test x$enable_simgrid = xyes -a x$enable_shared = xno ; then
-                # simgrid's SMPI needs fxt to be linked in statically for
-                # variable privatization to work
-		FXT_LIBS="$(pkg-config --variable=libdir fxt)/libfxt.a -Wl,--as-needed $(pkg-config --libs --static fxt) -Wl,--no-as-needed"
+	    PKG_CHECK_MODULES([FXT],  [fxt], [have_valid_fxt=yes], [have_valid_fxt=no])
 	fi
-
-	##########################################
-	# Poti is a library to generate paje trace files
-	##########################################
-	PKG_CHECK_MODULES([POTI], [poti], [have_valid_poti=yes], [have_valid_poti=no])
-	AC_ARG_ENABLE(poti, [AS_HELP_STRING([--enable-poti],
-				[Enable the use of the POTI library to generate Paje traces])],
-				enable_poti=$enableval, enable_poti=no)
-	if test x$enable_poti = xyes -a x$have_valid_poti = xyes ; then
-		AC_DEFINE(STARPU_HAVE_POTI, [1], [Define to 1 if you have libpoti and it is meant to be used])
+	if test x$have_valid_fxt = xyes ; then
+		enable_fxt=yes
 		save_LIBS="$LIBS"
-		LIBS="$LIBS $POTI_LIBS"
-		AC_CHECK_FUNCS([poti_init_custom poti_user_NewEvent])
+		LIBS="$LIBS $FXT_LIBS"
+			save_LDFLAGS="$LDFLAGS"
+		LDFLAGS="$LDFLAGS $FXT_LDFLAGS"
+		AC_CHECK_FUNCS([fxt_close])
+		AC_CHECK_FUNCS([fxt_blockev_leave])
+		AC_CHECK_FUNCS([enable_fut_flush])
+		AC_CHECK_FUNCS([fut_set_filename])
+		AC_CHECK_FUNCS([fut_setup_flush_callback])
+		LDFLAGS="$save_LDFLAGS"
 		LIBS="$save_LIBS"
-		FXT_CFLAGS="$FXT_CFLAGS $POTI_CFLAGS"
-		FXT_LIBS="$FXT_LIBS $POTI_LIBS"
+		save_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS $FXT_CFLAGS"
+		AC_CHECK_DECLS([enable_fut_flush], [], [], [[#include <fut.h>]])
+		AC_CHECK_DECLS([fut_set_filename], [], [], [[#include <fut.h>]])
+		AC_CHECK_DECLS([fut_setup_flush_callback], [], [], [[#include <fut.h>]])
+		CFLAGS="$save_CFLAGS"
+
+		if test x$enable_simgrid = xyes -a x$enable_shared = xno ; then
+	                # simgrid's SMPI needs fxt to be linked in statically for
+	                # variable privatization to work
+			FXT_LIBS="$(pkg-config --variable=libdir fxt)/libfxt.a -Wl,--as-needed $(pkg-config --libs --static fxt) -Wl,--no-as-needed"
+		fi
+
+		AC_CHECK_LIB([papi], [PAPI_library_init],
+			     [AC_DEFINE([STARPU_PAPI], [1], [Define to 1 if you have the libpapi library])
+			      PAPI_LIBS=-lpapi])
+
+		##########################################
+		# Poti is a library to generate paje trace files
+		##########################################
+		PKG_CHECK_MODULES([POTI], [poti], [have_valid_poti=yes], [have_valid_poti=no])
+		AC_ARG_ENABLE(poti, [AS_HELP_STRING([--enable-poti],
+					[Enable the use of the POTI library to generate Paje traces])],
+					enable_poti=$enableval, enable_poti=no)
+		if test x$enable_poti = xyes -a x$have_valid_poti = xyes ; then
+			AC_DEFINE(STARPU_HAVE_POTI, [1], [Define to 1 if you have libpoti and it is meant to be used])
+			save_LIBS="$LIBS"
+			LIBS="$LIBS $POTI_LIBS"
+			AC_CHECK_FUNCS([poti_init_custom poti_user_NewEvent])
+			LIBS="$save_LIBS"
+			FXT_CFLAGS="$FXT_CFLAGS $POTI_CFLAGS"
+			FXT_LIBS="$FXT_LIBS $POTI_LIBS"
+		fi
+	else
+		if test x$enable_fxt = xyes ; then
+			AC_MSG_ERROR([FxT is required but not available])
+		fi
+		enable_fxt=no
 	fi
 fi
 
+AC_MSG_CHECKING(whether FxT traces should be generated)
+AC_MSG_RESULT($enable_fxt)
+
+if test x$enable_fxt = xyes; then
+	AC_DEFINE(STARPU_USE_FXT, [1], [enable FxT traces])
+	AC_DEFINE(CONFIG_FUT, [1], [enable FUT traces])
+fi
+
+AC_SUBST(STARPU_USE_FXT, $enable_fxt)
+AM_CONDITIONAL(STARPU_USE_FXT, test x$enable_fxt = xyes)
+
 AC_MSG_CHECKING(whether additional locking systems FxT traces should be enabled)
 AC_ARG_ENABLE(fxt-lock, [AS_HELP_STRING([--enable-fxt-lock],
 			[enable additional locking systems FxT traces])],
@@ -1938,7 +1956,6 @@ AC_CHECK_LIB([papi], [PAPI_library_init],
 	      PAPI_LIBS=-lpapi])
 AC_SUBST(PAPI_LIBS)
 
-AM_CONDITIONAL([STARPU_USE_PAPI], [test "x$PAPI_LIBS" != "x"])
 
 AC_MSG_CHECKING(whether performance debugging should be enabled)
 AC_ARG_ENABLE(perf-debug, [AS_HELP_STRING([--enable-perf-debug],
@@ -2025,6 +2042,21 @@ AM_CONDITIONAL([STARPU_USE_AYUDAME2], [test "x$enable_ayudame2" = "xyes"])
 STARPU_FXT_EVENT_DEFINES="`grep -E '#define\s+_STARPU_(MPI_)?FUT_' ${srcdir}/src/common/fxt.h ${srcdir}/mpi/src/starpu_mpi_fxt.h | grep 0x | grep -v 0x1 | cut -d : -f 2`"
 AC_SUBST([STARPU_FXT_EVENT_DEFINES])
 
+# Heteroprio works better if it can store information based on the program's name
+AC_MSG_CHECKING(whether the target supports program_invocation_short_name)
+AC_LINK_IFELSE([AC_LANG_SOURCE(
+	[
+		#include <stdio.h>
+		#include <errno.h>
+		int main() {
+			printf("%s\n", program_invocation_short_name);
+			return 0;
+		}
+	])],
+	[AC_DEFINE([STARPU_HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1], [variable program_invocation_short_name is available]) AC_MSG_RESULT(yes)],
+	AC_MSG_RESULT(no)
+)
+
 ###############################################################################
 #                                                                             #
 #                  Miscellaneous options for StarPU                           #
@@ -2787,7 +2819,7 @@ if test x$blas_lib != xnone; then
     AC_CHECK_FUNCS([cblas_sgemv])
     LIBS="$SAVED_LIBS"
 fi
-AM_CONDITIONAL(STARPU_HAVE_CBLAS_SGEMV, test $HAVE_CBLAS_SGEMV = 1)
+AM_CONDITIONAL(STARPU_HAVE_CBLAS_SGEMV, test x$HAVE_CBLAS_SGEMV = x1)
 
 AM_CONDITIONAL(STARPU_ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
 AM_CONDITIONAL(STARPU_GOTO_BLAS_LIB, test x$blas_lib = xgoto)
@@ -3304,6 +3336,13 @@ AM_CONDITIONAL(STARPU_AVAILABLE_DOC, [test x$available_doc != xno])
 AM_CONDITIONAL(STARPU_BUILD_DOC_PDF, [test x$enable_build_doc_pdf != xno])
 AM_CONDITIONAL(STARPU_AVAILABLE_DOC_PDF, [test x$available_doc_pdf != xno])
 
+if test x$enable_build_doc_pdf != xno ; then
+   DOC_GENERATE_LATEX=YES
+else
+   DOC_GENERATE_LATEX=NO
+fi
+AC_SUBST(DOC_GENERATE_LATEX)
+
 ###############################################################################
 #                                                                             #
 #                                Julia                                        #
@@ -3317,8 +3356,8 @@ if test "$enable_julia" = "yes" ; then
    AC_PATH_PROG(juliapath, julia)
    AC_MSG_CHECKING(whether julia is available)
    AC_MSG_RESULT($juliapath)
-   if test ! -x $julia_path ; then
-      AC_MSG_ERROR(Julia compiler '$julia_path' is not valid)
+   if test ! -x $juliapath ; then
+      AC_MSG_ERROR(Julia compiler '$juliapath' is not valid)
       enable_julia=no
    fi
 fi
@@ -3327,6 +3366,35 @@ AC_SUBST(JULIA, $juliapath)
 
 ###############################################################################
 #                                                                             #
+#                         Eclipse Plugin                                      #
+#                                                                             #
+###############################################################################
+AC_ARG_ENABLE(eclipse-plugin, [AS_HELP_STRING([--enable-eclipse-plugin],
+			      [Build the Eclipse plugin])],
+			      enable_eclipse_plugin=$enableval, enable_eclipse_plugin=no)
+if test "$enable_eclipse_plugin" = "yes" ; then
+   AC_PATH_PROG(eclipsepath, eclipse)
+   AC_MSG_CHECKING(whether eclipse is available)
+   AC_MSG_RESULT($eclipsepath)
+   if test ! -x "$eclipsepath" ; then
+      AC_MSG_ERROR(Eclipse executable '$eclipsepath' is not valid)
+      enable_eclipse_plugin=no
+   fi
+
+   libs=$(for x in starpu-$STARPU_EFFECTIVE_VERSION $(echo $STARPU_EXPORTED_LIBS | sed 's/-l//g') $HWLOC_REQUIRES ; do echo $x ; done)
+   option_libs=$($srcdir/eclipse-plugin/tools/cproject.sh option $libs)
+   module_libs=$($srcdir/eclipse-plugin/tools/cproject.sh module $libs)
+fi
+
+AM_CONDITIONAL([STARPU_BUILD_ECLIPSE_PLUGIN], [test "x$enable_eclipse_plugin" = "xyes"])
+AC_SUBST(ECLIPSE, $eclipsepath)
+AC_SUBST(STARPU_INCLUDE_PATH, $(eval echo ${includedir}/starpu/$STARPU_EFFECTIVE_VERSION))
+AC_SUBST(STARPU_LIB_PATH, $(eval echo ${prefix}/lib))
+AC_SUBST(STARPU_MODULE_LIBS, "$module_libs")
+AC_SUBST(STARPU_OPTION_LIBS, "$option_libs")
+
+###############################################################################
+#                                                                             #
 #                                Final settings                               #
 #                                                                             #
 ###############################################################################
@@ -3523,6 +3591,10 @@ AC_OUTPUT([
 	julia/src/dynamic_compiler/Makefile
 	julia/examples/Makefile
 	julia/examples/execute.sh
+	eclipse-plugin/Makefile
+	eclipse-plugin/src/Makefile
+	eclipse-plugin/examples/Makefile
+	eclipse-plugin/examples/hello/.cproject
 ])
 
 AC_MSG_NOTICE([
@@ -3550,7 +3622,7 @@ AC_MSG_NOTICE([
 	Magma enabled:     $have_magma
 	BLAS library:      $blas_lib
 	hwloc:             $have_valid_hwloc
-	FxT trace enabled: $use_fxt
+	FxT trace enabled: $enable_fxt
 
         Documentation HTML:  $enable_build_doc
         Documentation PDF:   $enable_build_doc_pdf

+ 1 - 1
contrib/ci.inria.fr/job-1-check.sh

@@ -45,7 +45,7 @@ cd $basename
 
 test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
 tar xfz ../$tarball
-touch --date="last hour" $(find $basename)
+touch --date="last hour" $(find $basename) || true
 cd $basename
 mkdir build
 cd build

+ 19 - 5
doc/doxygen/Makefile.am

@@ -87,6 +87,7 @@ chapters =	\
 	chapters/480_openmp_runtime_support.doxy		\
 	chapters/490_clustering_a_machine.doxy		\
 	chapters/495_interoperability.doxy		\
+	chapters/497_eclipse_plugin.doxy 		\
 	chapters/501_environment_variables.doxy		\
 	chapters/510_configure_options.doxy		\
 	chapters/520_files.doxy		\
@@ -141,7 +142,18 @@ images = 	\
 	chapters/images/tasks_size_overhead.eps \
 	chapters/images/tasks_size_overhead.pdf \
 	chapters/images/tasks_size_overhead.png \
-	chapters/images/temanejo.png
+	chapters/images/temanejo.png		\
+	chapters/images/eclipse_installer.png	\
+	chapters/images/eclipse_install_cdt.png	\
+	chapters/images/eclipse_hello_build.png	\
+	chapters/images/eclipse_hello_run.png	\
+	chapters/images/eclipse_hello_fxt.png	\
+	chapters/images/eclipse_hello_graph.png	\
+	chapters/images/eclipse_hello_vite.png	\
+	chapters/images/eclipse_hello_svg_graph.png	\
+	chapters/images/eclipse_hello_plugin.png	\
+	chapters/images/eclipse_hello_paje_trace.png	\
+	chapters/images/eclipse_hello_hgraph.png
 
 if STARPU_BUILD_DOC
 EXTRA_DIST += \
@@ -170,7 +182,7 @@ chapters/version.sty: $(chapters)
 		if test -f $$f ; then $(RM) $$f ; fi ;\
 	done
 
-chapters/version.html: $(chapters)
+chapters/version.html: $(chapters) $(images)
 	@for f in $(chapters) ; do \
                 if test -f $(top_srcdir)/doc/doxygen/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen/$$f ; fi \
         done | sort -r | head -1 > timestamp_html
@@ -264,12 +276,14 @@ $(DOX_TAG): $(dox_inputs)
 	@if test -f html/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html/navtree.js ; fi
 	@$(SED) -i 's/.*"Files.html".*//' html/pages.html
 	@if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
-	@$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
-	@cat $(top_srcdir)/doc/doxygen/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
+	@if test -f $(DOX_LATEX_DIR)/refman.tex ; then $(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex ; fi
+	@if test -f $(DOX_LATEX_DIR)/refman.tex ; then cat $(top_srcdir)/doc/doxygen/refman.tex >> $(DOX_LATEX_DIR)/refman.tex ; fi
+	$(top_srcdir)/doc/doxygen/sectionNumbering.py $(top_srcdir)/doc/doxygen/chapters/ $(DOX_HTML_DIR)
 
 $(DOX_HTML_DIR): $(DOX_TAG)
 
-$(DOX_PDF): $(DOX_TAG) refman.tex
+$(DOX_PDF): $(DOX_TAG) refman.tex $(images)
+	$(MKDIR_P) $(DOX_LATEX_DIR)
 	@cp $(top_srcdir)/doc/doxygen/chapters/version.sty $(DOX_LATEX_DIR)
 	@cp $(top_srcdir)/doc/doxygen/chapters/images/*pdf $(DOX_LATEX_DIR)
 	@echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex

+ 3 - 0
doc/doxygen/chapters/000_introduction.doxy

@@ -291,6 +291,7 @@ The documentation chapters include
 </ul>
 <li> Part 4: StarPU Extensions
 <ul>
+<li> \ref PythonInterface
 <li> \ref OutOfCore
 <li> \ref MPISupport
 <li> \ref FaultTolerance
@@ -300,6 +301,8 @@ The documentation chapters include
 <li> \ref SimGridSupport
 <li> \ref OpenMPRuntimeSupport
 <li> \ref ClusteringAMachine
+<li> \ref InteroperabilitySupport
+<li> \ref EclipsePlugin
 </ul>
 <li> Part 5: StarPU Reference API
 <ul>

+ 15 - 15
doc/doxygen/chapters/210_check_list_performance.doxy

@@ -99,6 +99,21 @@ cudaStreamSynchronize(starpu_cuda_get_local_stream());
 as well as the use of \c cudaMemcpyAsync(), etc. for each CUDA operation one needs
 to use a version that takes the a stream parameter.
 
+If the kernel uses its own non-default stream, one can synchronize this stream
+with the StarPU-provided stream this way:
+
+\code{.c}
+cudaEvent_t event;
+call_kernel_with_its_own_stream()
+cudaEventCreateWithFlags(&event, cudaEventDisableTiming);
+cudaEventRecord(event, get_kernel_stream());
+cudaStreamWaitEvent(starpu_cuda_get_local_stream(), event, 0);
+cudaEventDestroy(event);
+\endcode
+
+This code makes the StarPU-provided stream wait for a new event, which will be
+triggered by the completion of the kernel.
+
 Unfortunately, some CUDA libraries do not have stream variants of
 kernels. This will seriously lower the potential for overlapping.
 If some CUDA calls are made without specifying this local stream,
@@ -129,21 +144,6 @@ able to submit and complete data transfers while kernels are executing, instead
 kernel submission. The kernel just has to make sure that StarPU can use the
 local stream to synchronize with the kernel startup and completion.
 
-If the kernel uses its own non-default stream, one can synchronize this stream
-with the StarPU-provided stream this way:
-
-\code{.c}
-cudaEvent_t event;
-call_kernel_with_its_own_stream()
-cudaEventCreateWithFlags(&event, cudaEventDisableTiming);
-cudaEventRecord(event, get_kernel_stream());
-cudaStreamWaitEvent(starpu_cuda_get_local_stream(), event, 0);
-cudaEventDestroy(event);
-\endcode
-
-This code makes the StarPU-provided stream wait for a new event, which will be
-triggered by the completion of the kernel.
-
 Using the flag ::STARPU_CUDA_ASYNC also permits to enable concurrent kernel
 execution, on cards which support it (Kepler and later, notably). This is
 enabled by setting the environment variable \ref STARPU_NWORKER_PER_CUDA to the

+ 9 - 4
doc/doxygen/chapters/310_data_management.doxy

@@ -529,12 +529,12 @@ When we want to switch to the vertical slice view, all we need to do is bring
 coherency between them by running an empty task on the home node of the data:
 
 \code{.c}
-void empty(void *buffers[], void *cl_arg)
-{ }
 struct starpu_codelet cl_switch =
 {
-	.cpu_funcs = {empty},
-	.nbuffers = STARPU_VARIABLE_NBUFFERS,
+	.where = STARPU_NOWHERE,
+	.nbuffers = 3,
+	.specific_nodes = 1,
+	.nodes = { STARPU_MAIN_RAM, STARPU_MAIN_RAM, STARPU_MAIN_RAM },
 };
 
 ret = starpu_task_insert(&cl_switch, STARPU_RW, handle,
@@ -552,6 +552,11 @@ Again, we prefer to make sure that we don't accidentally access the matrix throu
 starpu_data_invalidate_submit(handle);
 \endcode
 
+Note: when enabling a set of handles in this way, the set must not have any
+overlapping, i.e. the handles of the set must not have any part of data in
+common, otherwise StarPU will not properly handle concurrent accesses between
+them.
+
 And now we can start using vertical slices, etc.
 
 \section DataPointers Handles data buffer pointers

+ 42 - 1
doc/doxygen/chapters/320_scheduling.doxy

@@ -374,7 +374,11 @@ The tasks are stored inside buckets, where each bucket corresponds to a priority
 worker uses an indirect access array to know the order in which it should access the buckets. Moreover,
 all the tasks inside a bucket must be compatible with all the processing units that may access it (at least).
 
-As an example, see the following code where we have 5 types of tasks.
+These priorities are now automatically assigned by Heteroprio in auto calibration mode using heuristics.
+If you want to set these priorities manually, you can change \ref STARPU_HETEROPRIO_USE_AUTO_CALIBRATION
+and follow the example below.
+
+In this example code, we have 5 types of tasks.
 CPU workers can compute all of them, but CUDA workers can only execute
 tasks of types 0 and 1, and is expected to go 20 and 30 time
 faster than the CPU, respectively.
@@ -431,4 +435,41 @@ So, in the given example, the priority of a task will be between 0 and 4 include
 However, tasks of priorities 0-1 must provide CPU and CUDA kernels, and
 tasks of priorities 2-4 must provide CPU kernels (at least).
 
+\subsection LAHeteroprio Using locality aware Heteroprio
+
+Heteroprio supports a mode where locality is evaluated to guide the distribution
+of the tasks (see https://peerj.com/articles/cs-190.pdf).
+Currently, this mode is available using the dedicated function or an environment variable
+\ref STARPU_HETEROPRIO_USE_LA, and can be configured using environment variables.
+\code{.c}
+void starpu_heteroprio_set_use_locality(unsigned sched_ctx_id, unsigned use_locality);
+\endcode
+
+In this mode, multiple strategies are available to determine which memory node's workers are the most qualified for executing a specific task. This strategy can be set with \ref STARPU_LAHETEROPRIO_PUSH
+and available strategies are:
+- WORKER: the worker which pushed the task is preferred for the execution.
+- LcS: the node with the shortest data transfer time (estimated by StarPU) is the most qualified
+- LS_SDH: the node with the smallest data amount to be transferred will be preferred.
+- LS_SDH2: similar to LS_SDH, but data in write access is counted in a quadratic manner to give them more importance.
+- LS_SDHB: similar to LS_SDH, but data in write access is balanced with a coefficient (its value is set to 1000) and
+for the same amount of data, the one with less pieces of data to be transferred will be preferred.
+- LC_SMWB: similar to LS_SDH, but the amount of data in write access gets multiplied by a coefficient which gets closer to 2
+as the amount of data in read access gets larger than the data in write access.
+- AUTO: strategy by default, this one selects the best strategy and changes it in runtime to improve performance
+
+Other environment variables to configure LaHeteteroprio are documented in \ref ConfiguringLaHeteroprio
+
+\subsection AutoHeteroprio Using Heteroprio in auto-calibration mode
+
+In this mode, Heteroprio saves data about each program execution, in order to improve future ones.
+By default, theses files are stored in the folder used by perfmodel, but this can be changed using the
+\ref STARPU_HETEROPRIO_DATA_DIR environment variable. You can also specify the data filename directly using
+\ref STARPU_HETEROPRIO_DATA_FILE.
+
+Additionally, to assign priorities to tasks, Heteroprio needs a way to detect that some tasks are similar.
+By default, Heteroprio looks for tasks with the same perfmodel, or with the same codelet's name if no perfmodel was assigned.
+This behavior can be changed to only consider the codelet's name by setting
+\ref STARPU_HETEROPRIO_CODELET_GROUPING_STRATEGY to <c>1</c>
+
+Other environment variables to configure AutoHeteteroprio are documented in \ref ConfiguringAutoHeteroprio
 */

+ 114 - 17
doc/doxygen/chapters/380_offline_performance_tools.doxy

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2021  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
- * Copyright (C) 2020       Federal University of Rio Grande do Sul (UFRGS)
+ * Copyright (C) 2020,2021  Federal University of Rio Grande do Sul (UFRGS)
  *
  * 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
@@ -70,7 +70,14 @@ $ make
 $ make install
 \endverbatim
 
-In order to have StarPU to generate traces, StarPU should be configured with
+In order to have StarPU to generate traces, StarPU needs be configured again
+after installing FxT, and configuration show:
+
+\verbatim
+FxT trace enabled: yes
+\endverbatim
+
+If <c>configure</c> does not find FxT automatically, it can be specified by hand with
 the option \ref with-fxt "--with-fxt" :
 
 \verbatim
@@ -78,10 +85,9 @@ $ ./configure --with-fxt=$FXTDIR
 \endverbatim
 
 Or you can simply point the <c>PKG_CONFIG_PATH</c> to
-<c>$FXTDIR/lib/pkgconfig</c> and pass
-\ref with-fxt "--with-fxt" to <c>configure</c>
+<c>$FXTDIR/lib/pkgconfig</c>
 
-When FxT is enabled, a trace is generated when StarPU is terminated by calling
+When \ref STARPU_FXT_TRACE is set to 1, a trace is generated when StarPU is terminated by calling
 starpu_shutdown(). The trace is a binary file whose name has the form
 <c>prof_file_XXX_YYY</c> where <c>XXX</c> is the user name, and
 <c>YYY</c> is the MPI id of the process that used StarPU (or 0 when running a sequential program).
@@ -97,9 +103,6 @@ be used to generate trace events which describes the locks behaviour during
 the execution. It is however very heavy and should not be used unless debugging
 StarPU's internal locking.
 
-The environment variable \ref STARPU_FXT_TRACE can be set to 0 to disable the
-generation of the <c>prof_file_XXX_YYY</c> file.
-
 When the FxT trace file <c>prof_file_something</c> has been generated,
 it is possible to generate different trace formats by calling:
 
@@ -281,10 +284,10 @@ flow of tasks between the components of the modular scheduler.
 
 \subsubsection TimeBetweenSendRecvDataUse Analyzing Time Between MPI Data Transfer and Use by Tasks
 
-<c>starpu_fxt_tool</c> produces a file called <c>comms.rec</c> which describes all 
-MPI communications. The script <c>starpu_send_recv_data_use.py</c> uses this file 
-and <c>tasks.rec</c> in order to produce two graphs: the first one shows durations 
-between the reception of data and their usage by a task and the second one plots the 
+<c>starpu_fxt_tool</c> produces a file called <c>comms.rec</c> which describes all
+MPI communications. The script <c>starpu_send_recv_data_use.py</c> uses this file
+and <c>tasks.rec</c> in order to produce two graphs: the first one shows durations
+between the reception of data and their usage by a task and the second one plots the
 same graph but with elapsed time between send and usage of a data by the sender.
 
 \image html trace_recv_use.png
@@ -400,7 +403,7 @@ starpu_perfmodel_load_symbol(). The source code of the tool
 
 An XML output can also be printed by using the <c>-x</c> option:
 \verbatim
-$ tools/starpu_perfmodel_display -x -s non_linear_memset_regression_based 
+$ tools/starpu_perfmodel_display -x -s non_linear_memset_regression_based
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE StarPUPerfmodel SYSTEM "starpu-perfmodel.dtd">
 <!-- symbol non_linear_memset_regression_based -->
@@ -426,7 +429,7 @@ models. It writes a <c>.gp</c> file in the current directory, to be
 run with the tool <c>gnuplot</c>, which shows the corresponding curve.
 
 \verbatim
-$ tools/starpu_perfmodel_plot -s non_linear_memset_regression_based 
+$ tools/starpu_perfmodel_plot -s non_linear_memset_regression_based
 $ gnuplot starpu_non_linear_memset_regression_based.gp
 $ gv starpu_non_linear_memset_regression_based.eps
 \endverbatim
@@ -647,12 +650,12 @@ $ starpu_paje_sort paje.trace
 Performance counter values could be obtained from the PAPI framework if
 <c>./configure</c> detected the libpapi.
 
-In Debian, packages <c>libpapi-dev</c> and <c>libpapi5.7</c> provide required
-files.  Package <c>papi-tools</c> contains a set of useful tools, for example
+In Debian, the <c>libpapi-dev</c> package provides the required
+files.  Additionally, the <c>papi-tools</c> package contains a set of useful tools, for example
 <c>papi_avail</c> to see which counters are available.
 
 To be able to use Papi counters, one may need to reduce the level of the kernel
-parameter <c>kernel.perf_event_paranoid</c> to at least 2. See
+parameter <c>kernel.perf_event_paranoid</c> to 2 or below. See
 https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html for the
 security impact of this parameter.
 
@@ -838,6 +841,100 @@ An example of visualization follows:
 \image html starvz_visu_r.png
 \image latex starvz_visu_r.pdf "" width=\textwidth
 
+\section EclipsePluginUsage StarPU Eclipse Plugin
+
+The StarPU Eclipse Plugin provides the ability to generate the
+different traces directly from the Eclipse IDE. Once StarPU has been
+configured and installed with its Eclipse plugin (see Section \ref
+EclipsePlugin), you first need to set up your environment for StarPU.
+
+\verbatim
+cd $HOME/usr/local/starpu
+source ./bin/starpu_env
+\endverbatim
+
+To generate traces from the application, it is necessary to set \ref
+STARPU_FXT_TRACE to 1.
+
+\verbatim
+export STARPU_FXT_TRACE=1
+\endverbatim
+
+The eclipse workspace together with an example is available in \c
+lib/starpu/eclipse-plugin.
+
+\verbatim
+cd ./lib/starpu/eclipse-plugin
+eclipse -data workspace
+\endverbatim
+
+You can then open the file \c hello/hello.c, and build the application
+by pressing \c Ctrl-B.
+
+\image html eclipse_hello_build.png
+\image latex eclipse_hello_build.png "" width=\textwidth
+
+The application can now be executed.
+
+\image html eclipse_hello_run.png
+\image latex eclipse_hello_run.png "" width=\textwidth
+
+After executing the C/C++ StarPU application, one can use the StarPU
+plugin to generate and visualise the task graph of the application.
+The StarPU plugin eclipse is either available through the icons in the
+upper toolbar, or from the dropdown menu \c StarPU.
+
+\image html eclipse_hello_plugin.png
+\image latex eclipse_hello_plugin.png "" width=\textwidth
+
+To start, one first need to run the StarPU FxT tool, either through
+the \c FxT icon of the toolbar, or from the menu \c StarPU / <c>StarPU
+FxT Tool</c>. This will call the tool \c starpu_fxt_tool to generate
+traces for your application execution.
+
+A message dialog box is displayed to confirm the generation of the
+different traces.
+
+\image html eclipse_hello_fxt.png
+\image latex eclipse_hello_fxt.png "" width=\textwidth
+
+One of the generated files is a Paje trace which can be viewed with
+ViTE, a trace explorer. To open and visualise the file \c paje.trace with
+ViTE, one can select the second command of the StarPU menu, which is
+named <c>Generate Paje Trace</c>, or click on the second icon named
+<c>Trace</c> in the toolbar.
+
+\image html eclipse_hello_paje_trace.png
+\image latex eclipse_hello_paje_trace.png "" width=\textwidth
+
+\image html eclipse_hello_vite.png
+\image latex eclipse_hello_vite.png "" width=\textwidth
+
+Another generated trace file is a task graph described using the DOT
+language. It is possible to get a graphical output of the graph by
+calling the <c>graphviz library</c>. To do this, one can click on the
+third command of StarPU menu. A task graph of the application in
+the \c png format is then generated.
+
+\image html eclipse_hello_graph.png
+\image latex eclipse_hello_graph.png "" width=\textwidth
+
+In StarPU eclipse plugin, one can display the graph task directly from
+eclipse, or through a web browser. To do this, there is another
+command named <c> Generate SVG graph</c> in the StarPU menu or HGraph
+in the toolbar of eclipse.
+
+From the HTML file, you can see the graph task, and by clicking on a
+task name, it will open the C file in which the task submission was
+called (if you have an editor which understands the syntax \c
+href="file.c#123").
+
+\image html eclipse_hello_svg_graph.png
+\image latex eclipse_hello_svg_graph.png "" width=\textwidth
+
+\image html eclipse_hello_hgraph.png
+\image latex eclipse_hello_hgraph.png "" width=\textwidth
+
 \section MemoryFeedback Memory Feedback
 
 It is possible to enable memory statistics. To do so, you need to pass

+ 1 - 1
doc/doxygen/chapters/400_python.doxy

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2020-2021  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

+ 86 - 0
doc/doxygen/chapters/497_eclipse_plugin.doxy

@@ -0,0 +1,86 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2021       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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+/*! \page EclipsePlugin Eclipse Plugin
+
+The StarPU Eclipse Plugin provides the ability to visualise traces directly from the Eclipse IDE.
+
+\section EclipseInstallation Eclipse Installation
+
+Download the Eclipse installer from
+https://www.eclipse.org/downloads/packages/installer. When you run the
+installer, click on <em>Eclipse IDE for Java Developers</em> to start
+the installation process.
+
+\image html eclipse_installer.png
+\image latex eclipse_installer.png "" width=10cm
+
+To be able to develop C/C++ applications, you need to install the CDT
+plugin. To do so, go to the <em>Help</em> dropdown menu at the top of the
+Eclipse window, choose <em>Install New Software ...</em>. In the new
+window, enter the URL
+http://download.eclipse.org/tools/cdt/releases/9.10
+into the box <em>Work with</em> and press the return key.
+
+\image html eclipse_install_cdt.png
+\image latex eclipse_install_cdt.png "" width=10cm
+
+You need then to select <em>CDT Main Features</em>, then click the
+button <em>Next</em> twice, accept the terms of the license, and click
+the button <em>Finish</em>. Eclipse will ask you to restart.
+
+To be able to compile the plugin, you need to install the plugin
+development environnement (PDE). To do so, go to the menu
+<em>Help</em>, choose <em>Eclipse Marketplace...</em>. In the new
+window, enter <em>PDE</em> into the box <em>Find</em> and press the
+return key.
+
+\image html eclipse_install_pde.png
+\image latex eclipse_install_pde.png "" width=10cm
+
+You can then click on the button <em>Install</em> of the <em>Eclipse
+PDE latest</em>. You may need to confirm the installation, then accept
+the terms of the license, and finally restart the Eclipse IDE.
+
+The installation is now done.
+
+\section PluginInstallation StarPU Eclipse Plugin Compilation and Installation
+
+StarPU can now be compiled and installed with its Eclipse plugin. To
+do so, you first need to configure StarPU with the option \ref
+enable-eclipse-plugin "--enable-eclipse-plugin". The Eclipse IDE
+executable \c eclipse must be in your \c PATH.
+
+\verbatim
+export PATH=$HOME/usr/local/eclipse/java-2021-03/eclipse:$PATH
+mkdir build
+cd build
+../configure --prefix=$HOME/usr/local/starpu --enable-eclipse-plugin
+make
+make install
+\endverbatim
+
+The StarPU Eclipse plugin is installed in the directory \c dropins.
+
+\verbatim
+$ ls $HOME/usr/local/eclipse/java-2021-03/eclipse/dropins
+StarPU_1.0.0.202105272056.jar
+\endverbatim
+
+You can now go to Section \ref EclipsePluginUsage to see how to use
+the plugin.
+
+*/

+ 119 - 2
doc/doxygen/chapters/501_environment_variables.doxy

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2021  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2016       Uppsala University
- * Copyright (C) 2020       Federal University of Rio Grande do Sul (UFRGS)
+ * Copyright (C) 2020,2021  Federal University of Rio Grande do Sul (UFRGS)
  *
  * 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
@@ -622,6 +622,123 @@ Specify which PAPI events should be recorded in the trace (\ref PapiCounters).
 
 </dl>
 
+\section ConfiguringHeteroprio Configuring The Heteroprio Scheduler
+
+\subsection ConfiguringLaHeteroprio Configuring LAHeteroprio
+<dl>
+
+<dt>STARPU_HETEROPRIO_USE_LA</dt>
+<dd>
+\anchor STARPU_HETEROPRIO_USE_LA
+\addindex __env__STARPU_HETEROPRIO_USE_LA
+Enable the locality aware mode of Heteroprio which guides the distribution of tasks to workers
+in order to reduce the data transfers between memory nodes.
+</dd>
+
+<dt>STARPU_LAHETEROPRIO_PUSH</dt>
+<dd>
+\anchor STARPU_LAHETEROPRIO_PUSH
+\addindex __env__STARPU_LAHETEROPRIO_PUSH
+Choose between the different push strategies for locality aware Heteroprio: 
+WORKER, LcS, LS_SDH, LS_SDH2, LS_SDHB, LC_SMWB, AUTO (by default: AUTO). These are detailed in
+\ref LAHeteroprio
+</dd>
+
+<dt>STARPU_LAHETEROPRIO_S_[ARCH]</dt>
+<dd>
+\anchor STARPU_LAHETEROPRIO_S_[ARCH]
+\addindex __env__STARPU_LAHETEROPRIO_S_arch
+Specify the number of memory nodes contained in an affinity group. An affinity
+group will be composed of the closests memory nodes to a worker of a given architecture,
+and this worker will look for tasks available inside these memory nodes, before
+considering stealing tasks outside this group.
+ARCH can be CPU, CUDA, OPENCL, MICC, SCC, MPI_MS, etc.
+</dd>
+
+<dt>STARPU_LAHETEROPRIO_PRIO_STEP_[ARCH]</dt>
+<dd>
+\anchor STARPU_LAHETEROPRIO_PRIO_STEP_[ARCH]
+\addindex __env__STARPU_LAHETEROPRIO_PRIO_STEP_arch
+Specify the number of buckets in the local memory node in which a worker will look for
+available tasks, before this worker starts looking for tasks in other memory nodes' buckets.
+ARCH indicates that this number is specific to a given arch which can be:
+CPU, CUDA, OPENCL, MICC, SCC, MPI_MS, etc.
+</dd>
+
+</dl>
+
+\subsection ConfiguringAutoHeteroprio Configuring AutoHeteroprio
+<dl>
+
+<dt>STARPU_HETEROPRIO_USE_AUTO_CALIBRATION</dt>
+<dd>
+\anchor STARPU_HETEROPRIO_USE_AUTO_CALIBRATION
+\addindex __env__STARPU_HETEROPRIO_USE_AUTO_CALIBRATION
+Enable the auto calibration mode of Heteroprio which assign priorities to tasks automatically
+</dd>
+
+<dt>STARPU_HETEROPRIO_DATA_DIR</dt>
+<dd>
+\anchor STARPU_HETEROPRIO_DATA_DIR
+\addindex __env__STARPU_HETEROPRIO_DATA_DIR
+Specify the path of the directory where Heteroprio stores data about program executions.
+By default, these are stored in the same directory used by perfmodel.
+</dd>
+
+<dt>STARPU_HETEROPRIO_DATA_FILE</dt>
+<dd>
+\anchor STARPU_HETEROPRIO_DATA_FILE
+\addindex __env__STARPU_HETEROPRIO_DATA_FILE
+Specify the filename where Heteroprio will save data about the current program's execution.
+</dd>
+
+<dt>STARPU_HETEROPRIO_CODELET_GROUPING_STRATEGY</dt>
+<dd>
+\anchor STARPU_HETEROPRIO_CODELET_GROUPING_STRATEGY
+\addindex __env__STARPU_HETEROPRIO_CODELET_GROUPING_STRATEGY
+Choose how Heteroprio groups similar tasks. It can be <c>0</c> to group
+the tasks with the same perfmodel or the same codelet's name if no perfmodel was assigned.
+Or, it could be <c>1</c> to group the tasks only by codelet's name.
+</dd>
+
+<dt>STARPU_AUTOHETEROPRIO_PRINT_DATA_ON_UPDATE</dt>
+<dd>
+\anchor STARPU_AUTOHETEROPRIO_PRINT_DATA_ON_UPDATE
+\addindex __env__STARPU_AUTOHETEROPRIO_PRINT_DATA_ON_UPDATE
+Enable the printing of priorities' data every time they get updated.
+</dd>
+
+<dt>STARPU_AUTOHETEROPRIO_PRINT_AFTER_ORDERING</dt>
+<dd>
+\anchor STARPU_AUTOHETEROPRIO_PRINT_AFTER_ORDERING
+\addindex __env__STARPU_AUTOHETEROPRIO_PRINT_AFTER_ORDERING
+Enable the printing of priorities' order for each architecture every time there's a reordering.
+</dd>
+
+<dt>STARPU_AUTOHETEROPRIO_PRIORITY_ORDERING_POLICY</dt>
+<dd>
+\anchor STARPU_AUTOHETEROPRIO_PRIORITY_ORDERING_POLICY
+\addindex __env__STARPU_AUTOHETEROPRIO_PRIORITY_ORDERING_POLICY
+Specify the heuristic which will be used to assign priorities automatically.
+It should be an integer between 0 and 27.
+</dd>
+
+<dt>STARPU_AUTOHETEROPRIO_ORDERING_INTERVAL</dt>
+<dd>
+\anchor STARPU_AUTOHETEROPRIO_ORDERING_INTERVAL
+\addindex __env__STARPU_AUTOHETEROPRIO_ORDERING_INTERVAL
+Specify the period (in number of tasks pushed), between priorities reordering operations.
+</dd>
+
+<dt>STARPU_AUTOHETEROPRIO_FREEZE_GATHERING</dt>
+<dd>
+\anchor STARPU_AUTOHETEROPRIO_FREEZE_GATHERING
+\addindex __env__STARPU_AUTOHETEROPRIO_FREEZE_GATHERING
+Disable data gathering from task executions.
+</dd>
+
+</dl>
+
 \section Extensions Extensions
 
 <dl>
@@ -1016,7 +1133,7 @@ Specify in which file to save the generated trace if FxT is enabled.
 <dd>
 \anchor STARPU_FXT_TRACE
 \addindex __env__STARPU_FXT_TRACE
-Specify whether to generate (1) or not (0) the FxT trace in /tmp/prof_file_XXX_YYY (the directory and file name can be changed with \ref STARPU_FXT_PREFIX and \ref STARPU_FXT_SUFFIX). The default is 1 (generate it)
+Specify whether to generate (1) or not (0) the FxT trace in /tmp/prof_file_XXX_YYY (the directory and file name can be changed with \ref STARPU_FXT_PREFIX and \ref STARPU_FXT_SUFFIX). The default is 0 (do not generate it)
 </dd>
 
 <dt>STARPU_LIMIT_CUDA_devid_MEM</dt>

+ 12 - 0
doc/doxygen/chapters/510_configure_options.doxy

@@ -182,6 +182,11 @@ about workers going to sleep and waking up.
 \addindex __configure__--enable-maxcpus
 Use at most <c>count</c> CPU cores.  This information is then
 available as the macro ::STARPU_MAXCPUS.
+
+The default value is <c>auto</c>. it allows StarPU to automatically
+detect the number of CPUs on the build machine. This should not be
+used if the running host has a larger number of CPUs than the
+build machine.
 </dd>
 
 <dt>--enable-maxnumanodes=<c>count</c></dt>
@@ -468,6 +473,13 @@ Enable OpenMP Support (\ref OpenMPRuntimeSupport)
 Enable cluster Support (\ref ClusteringAMachine)
 </dd>
 
+<dt>--enable-eclipse-plugin</dt>
+<dd>
+\anchor enable-eclipse-plugin
+\addindex __configure__--enable-eclipse-plugin
+Enable the StarPU Eclipse Plugin. See \ref EclipsePlugin to know how to install Eclipse.
+</dd>
+
 </dl>
 
 \section AdvancedConfiguration Advanced Configuration

+ 1 - 1
doc/doxygen/chapters/code/disk_compute.c

@@ -128,7 +128,7 @@ int main(int argc, char **argv)
 	if (f == NULL)
 		goto enoent;
 	/* take datas */
-	int size = fread(C, sizeof(int), NX, f);
+	fread(C, sizeof(int), NX, f);
 
 	/* close the file */
 	fclose(f);

BIN
doc/doxygen/chapters/images/eclipse_hello_build.png


BIN
doc/doxygen/chapters/images/eclipse_hello_fxt.png


BIN
doc/doxygen/chapters/images/eclipse_hello_graph.png


BIN
doc/doxygen/chapters/images/eclipse_hello_hgraph.png


BIN
doc/doxygen/chapters/images/eclipse_hello_paje_trace.png


BIN
doc/doxygen/chapters/images/eclipse_hello_plugin.png


BIN
doc/doxygen/chapters/images/eclipse_hello_run.png


BIN
doc/doxygen/chapters/images/eclipse_hello_svg_graph.png


BIN
doc/doxygen/chapters/images/eclipse_hello_vite.png


BIN
doc/doxygen/chapters/images/eclipse_install_cdt.png


BIN
doc/doxygen/chapters/images/eclipse_install_pde.png


BIN
doc/doxygen/chapters/images/eclipse_installer.png


+ 1 - 1
doc/doxygen/dev/starpu_check_include.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+# Copyright (C) 2020-2021  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

+ 1 - 0
doc/doxygen/doxygen-config.cfg.in

@@ -87,3 +87,4 @@ INPUT_FILTER           = @top_builddir@/doc/doxygen/doxygen_filter.sh
 
 IMAGE_PATH             = @top_srcdir@/doc/doxygen/chapters/images
 
+GENERATE_LATEX         = @DOC_GENERATE_LATEX@

+ 2 - 1
doc/doxygen/doxygen.cfg

@@ -1319,7 +1319,8 @@ EXTRA_SEARCH_MAPPINGS  =
 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
-GENERATE_LATEX         = YES
+#defined in doxygen-config.cfg
+#GENERATE_LATEX         = YES
 
 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be

+ 6 - 0
doc/doxygen/refman.tex

@@ -193,6 +193,11 @@ Documentation License”.
 \hypertarget{InteropSupport}{}
 \input{InteroperabilitySupport}
 
+\chapter{Eclipse Plugin}
+\label{EclipsePlugin}
+\hypertarget{EclipsePlugin}{}
+\input{EclipsePlugin}
+
 \part{StarPU Reference API}
 
 \chapter{Execution Configuration Through Environment Variables}
@@ -258,6 +263,7 @@ Documentation License”.
 \input{group__API__Master__Slave}
 \input{group__API__Random__Functions}
 \input{group__API__Sink}
+\input{group__API__HeteroPrio}
 
 \chapter{File Index}
 \input{files}

+ 43 - 0
doc/doxygen/sectionNumbering.py

@@ -0,0 +1,43 @@
+#!/usr/bin/python3
+
+import os
+import operator
+import sys
+
+files = {}
+for x in os.listdir(sys.argv[1]):
+    if x.endswith(".doxy"):
+        with open(sys.argv[1]+x, "r", encoding="utf-8") as fin:
+            for line in fin.readlines():
+                if "\page" in line:
+                    line = line.replace("/*! \page ", "").strip()
+                    files[x] = line[0:line.index(" ")]+".html"
+
+sfiles= dict(sorted(files.items(), key=operator.itemgetter(0)))
+htmlfiles = ["index.html"]
+htmlfiles.extend(sfiles.values())
+
+htmldir=sys.argv[2]+"/"
+
+chapter=0
+for x in htmlfiles:
+    chapter+=1
+    section=0
+    with open(htmldir+x, "r", encoding="utf-8") as fin:
+        with open(htmldir+x+".count.html", "w", encoding="utf-8") as fout:
+            for line in fin.readlines():
+                if "<div class=\"title\">" in line:
+                    line = line.replace("<div class=\"title\">", "<div class=\"title\">"+str(chapter)+". ")
+                if "<h1>" in line:
+                    section += 1
+                    line = line.replace("<h1>", "<h1>" + str(chapter) + "." + str(section))
+                    subsection = 0
+                if "<h2>" in line:
+                    subsection += 1
+                    line = line.replace("<h2>", "<h2>" + str(chapter) + "." + str(section) + "." + str(subsection))
+                    subsubsection = 0
+                if "<h3>" in line:
+                    subsubsection += 1
+                    line = line.replace("<h3>", "<h3>" + str(chapter) + "." + str(section) + "." + str(subsection) + "." + str(subsubsection))
+                fout.write(line)
+    os.rename(htmldir+x+".count.html", htmldir+x)

+ 4 - 2
doc/doxygen_dev/Makefile.am

@@ -211,10 +211,12 @@ $(DOX_TAG): $(dox_inputs)
 	@if test -f html_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
 	@$(SED) -i 's/.*"Files.html".*//' html_dev/pages.html
 	@if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
-	@$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
-	@cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
+	@if test -f $(DOX_LATEX_DIR)/refman.tex ; then $(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex ; fi
+	@if test -f $(DOX_LATEX_DIR)/refman.tex ; then cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex ; fi
+	$(top_srcdir)/doc/doxygen/sectionNumbering.py $(top_srcdir)/doc/doxygen_dev/chapters/ $(DOX_HTML_DIR)
 
 $(DOX_PDF): $(DOX_TAG) refman.tex
+	$(MKDIR_P) $(DOX_LATEX_DIR)
 	@cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
 	@cp $(top_srcdir)/doc/doxygen_dev/modules.tex $(DOX_LATEX_DIR)
 	@echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex

+ 1 - 1
doc/doxygen_dev/dev/starpu_check_missing.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+# Copyright (C) 2020-2021  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

+ 1 - 0
doc/doxygen_dev/doxygen-config.cfg.in

@@ -134,3 +134,4 @@ INPUT_FILTER           = @top_builddir@/doc/doxygen_dev/doxygen_filter.sh
 
 #IMAGE_PATH             = @top_srcdir@/doc/doxygen_dev/chapters/images
 
+GENERATE_LATEX         = @DOC_GENERATE_LATEX@

+ 2 - 1
doc/doxygen_dev/doxygen.cfg

@@ -1319,7 +1319,8 @@ EXTRA_SEARCH_MAPPINGS  =
 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
-GENERATE_LATEX         = YES
+#defined in doxygen-config.cfg
+#GENERATE_LATEX         = YES
 
 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be

+ 6 - 5
doc/tutorial/Makefile

@@ -13,12 +13,12 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 #
-CFLAGS          +=      $$(pkg-config --cflags starpu-1.1)
-LDLIBS          +=      $$(pkg-config --libs starpu-1.1)
+CFLAGS          +=      $$(pkg-config --cflags starpu-1.3)
+LDLIBS          +=      $$(pkg-config --libs starpu-1.3)
 
-HAS_CUDA	=	$(shell pkg-config --libs starpu-1.1 |grep -i cuda)
+HAS_CUDA	=	$(shell starpu_machine_display | grep "CUDA" | grep -v "No CUDA worker" | head -1)
 NVCC		?=	nvcc
-HAS_OPENCL	=	$(shell pkg-config --libs starpu-1.1 |grep -i opencl)
+HAS_OPENCL	=	$(shell starpu_machine_display | grep "OpenCL" | grep -v "No OpenCL worker" | head -1)
 
 %.o: %.cu
 	nvcc $(CFLAGS) $< -c
@@ -35,7 +35,8 @@ else
 VECTOR_SCAL_COMPILER		=	$(CC)
 endif
 ifneq ($(strip $(HAS_OPENCL)),)
-VECTOR_SCAL_PREREQUISITES += vector_scal_opencl.o
+VECTOR_SCAL_PREREQUISITES 	+=	vector_scal_opencl.o
+LDLIBS				+=	-lOpenCL
 endif
 
 vector_scal: $(VECTOR_SCAL_PREREQUISITES)

+ 19 - 15
doc/tutorial/vector_scal_opencl.c

@@ -21,38 +21,42 @@ extern struct starpu_opencl_program programs;
 void vector_scal_opencl(void *buffers[], void *_args)
 {
 	float *factor = _args;
-	int id, devid, err;
+	int id, devid;
+	cl_int err;
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 
 	/* length of the vector */
-	unsigned n = STARPU_VECTOR_GET_NX(buffers[0]);
+	unsigned int n = STARPU_VECTOR_GET_NX(buffers[0]);
 	/* OpenCL copy of the vector pointer */
 	cl_mem val = (cl_mem) STARPU_VECTOR_GET_DEV_HANDLE(buffers[0]);
 
 	id = starpu_worker_get_id();
 	devid = starpu_worker_get_devid(id);
 
-	err = starpu_opencl_load_kernel(&kernel, &queue, &programs,
-					"vector_mult_opencl", devid);   /* Name of the codelet defined above */
+	err = starpu_opencl_load_kernel(&kernel, &queue, &programs, "vector_mult_opencl", devid);
 	if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
 
-	err = clSetKernelArg(kernel, 0, sizeof(val), &val);
-	err |= clSetKernelArg(kernel, 1, sizeof(n), &n);
+	err = clSetKernelArg(kernel, 0, sizeof(n), &n);
+	err = clSetKernelArg(kernel, 1, sizeof(val), &val);
 	err |= clSetKernelArg(kernel, 2, sizeof(*factor), factor);
 	if (err) STARPU_OPENCL_REPORT_ERROR(err);
 
 	{
-		size_t global=1;
-		size_t local=1;
-		err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, &global, &local, 0, NULL, &event);
-		if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
-	}
+		size_t global=n;
+		size_t local;
+                size_t s;
+                cl_device_id device;
+
+                starpu_opencl_get_device(devid, &device);
 
-	clFinish(queue);
-	starpu_opencl_collect_stats(event);
-	clReleaseEvent(event);
+                err = clGetKernelWorkGroupInfo (kernel, device, CL_KERNEL_WORK_GROUP_SIZE, sizeof(local), &local, &s);
+                if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
+                if (local > global) local=global;
+                else global = (global + local-1) / local * local;
 
+		err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, &global, &local, 0, NULL, NULL);
+		if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
+	}
 	starpu_opencl_release_kernel(kernel);
 }

+ 11 - 0
eclipse-plugin/.classpath

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+		<attributes>
+			<attribute name="module" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="build/bin"/>
+</classpath>

+ 1 - 0
eclipse-plugin/.gitignore

@@ -0,0 +1 @@
+build/

+ 28 - 0
eclipse-plugin/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>plugin</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 9 - 0
eclipse-plugin/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11

+ 12 - 0
eclipse-plugin/META-INF/MANIFEST.MF

@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: StarPU
+Bundle-SymbolicName: StarPU;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.e4.ui.model.workbench,
+ org.eclipse.equinox.registry,
+ org.eclipse.e4.core.di.annotations
+Automatic-Module-Name: StarPU
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-ClassPath: .

+ 34 - 0
eclipse-plugin/Makefile.am

@@ -0,0 +1,34 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2021       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
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+include $(top_srcdir)/starpu.mk
+
+EXTRA_DIST =			\
+	tools/cproject.sh	\
+	tools/install_workspace.sh \
+	build.properties	\
+	build.xml		\
+	.classpath		\
+	plugin.xml		\
+	.project		\
+	META-INF/MANIFEST.MF	\
+	icons/fxt.png		\
+	icons/svg.png		\
+	icons/taskGraph.png	\
+	icons/vite.png
+
+SUBDIRS	= src
+SUBDIRS += examples
+

+ 8 - 0
eclipse-plugin/build.properties

@@ -0,0 +1,8 @@
+source.. = src/
+output.. = build/bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               icons/,\
+               .classpath,\
+src.includes = .classpath

+ 343 - 0
eclipse-plugin/build.xml

@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="StarPU" default="build.jars" basedir=".">
+
+ 	<property environment="env"/>
+	<property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/>
+	<property name="basews" value="${ws}"/>
+	<property name="baseos" value="${os}"/>
+	<property name="basearch" value="${arch}"/>
+	<property name="basenl" value="${nl}"/>
+	<property name="bundleId" value="StarPU"/>
+	<property name="bundleVersion" value="1.0.0.202105060849"/>
+	<property name="p2.publishonerror" value="false"/>
+
+	<!-- Compiler settings. -->
+	<property name="javacFailOnError" value="false"/>
+	<property name="javacDebugInfo" value="on"/>
+	<property name="javacVerbose" value="false"/>
+	<property name="logExtension" value=".log"/>
+	<property name="compilerArg" value=""/>
+	<property name="compilation.prereq.log" value="${buildDirectory}/prereqErrors.log"/>
+	<property name="javacSource" value="1.3"/>
+	<property name="javacTarget" value="1.2"/>
+	<condition property="dir_bootclasspath" value="${java.home}/../Classes">
+		<and>
+			<os family="mac"/>
+			<available file="${java.home}/../Classes" type="dir"/>
+		</and>
+	</condition>
+	<property name="dir_bootclasspath" value="${java.home}/lib"/>
+	<path id="path_bootclasspath">
+		<fileset dir="${dir_bootclasspath}">
+			<include name="*.jar"/>
+		</fileset>
+	</path>
+	<property name="bootclasspath" refid="path_bootclasspath"/>
+	<condition property="bundleBootClasspath" value="${JavaSE-11}"	>
+		<isset property="JavaSE-11"/>
+	</condition>
+	<condition property="bundleJavacSource" value="11"	>
+		<isset property="JavaSE-11"/>
+	</condition>
+	<property name="bundleJavacSource" value="${javacSource}"/>
+	<property name="bundleJavacTarget" value="${javacTarget}"/>
+	<property name="bundleBootClasspath" value="${bootclasspath}"/>
+
+	<target name="init" depends="properties">
+		<condition property="pluginTemp" value="${buildTempFolder}/plugins"		>
+			<isset property="buildTempFolder"/>
+		</condition>
+		<property name="pluginTemp" value="${basedir}"/>
+		<condition property="build.result.folder" value="${pluginTemp}/StarPU_1.0.0.202105060849"		>
+			<isset property="buildTempFolder"/>
+		</condition>
+		<property name="build.result.folder" value="${env.PWD}/build"/>
+		<property name="temp.folder" value="${basedir}/temp.folder"/>
+		<property name="plugin.destination" value="${basedir}"/>
+		<condition property="p2.publish.parts" value="true"		>
+			<istrue value="${p2.gathering}"/>
+		</condition>
+		<property name="compilation.problem.marker" value="${build.result.folder}/compilation.problem"/>
+		<condition property="compilation.problem.marker.exists" value="true"		>
+			<and>
+			<available file="${compilation.problem.marker}"/>
+			<isfalse value="${p2.publishonerror}"/>
+			</and>
+		</condition>
+	</target>
+
+	<target name="properties" if="eclipse.running">
+		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+
+	</target>
+
+	<target name="build.update.jar" depends="init" description="Build the plug-in: StarPU for an update site.">
+		<delete dir="${temp.folder}"/>
+		<mkdir dir="${temp.folder}"/>
+		<antcall target="build.jars"/>
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${temp.folder}/"/>
+		</antcall>
+		<jar destfile="${plugin.destination}/StarPU_1.0.0.202105060849.jar" basedir="${temp.folder}/StarPU_1.0.0.202105060849" filesetmanifest="merge"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+
+	<target name="@dot.nestedJars">
+	</target>
+	<target name="@dot" depends="init,@dot.nestedJars" unless="@dot" description="Create jar: StarPU @dot.">
+		<mkdir dir="${build.result.folder}"/>
+		<delete dir="${build.result.folder}/@dot"/>
+		<mkdir dir="${build.result.folder}/@dot"/>
+		<path id="@dot.classpath">
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.ui_3.119.0.v20210111-1350.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.runtime_3.20.100.v20210111-0815.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.osgi_3.16.200.v20210226-1447.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.osgi.compatibility.state_1.2.300.v20210212-1137.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.equinox.common_3.14.100.v20210212-1143.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.jobs_3.10.1100.v20210111-0815.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.equinox.registry_3.10.100.v20210212-1143.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.equinox.preferences_3.8.200.v20210212-1143.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.contenttype_3.7.900.v20210111-0918.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.equinox.app_1.5.100.v20210212-1143.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.osgi.services_3.10.0.v20210212-1137.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.osgi.util_3.6.0.v20210212-1137.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/javax.servlet_3.1.0.v201410161800.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.swt_3.116.0.v20210302-1107.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.swt.browser.chromium.gtk.linux.x86_64_3.116.0.v20210302-1107.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.116.0.v20210302-1107.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.jface_3.22.100.v20210126-0831.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.commands_3.9.800.v20201021-1339.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.equinox.bidi_1.3.100.v20210212-1143.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.ui.workbench_3.122.100.v20210215-1525.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/com.ibm.icu_67.1.0.v20200706-1749.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/javax.annotation_1.3.5.v20200909-1856.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/javax.inject_1.0.0.v20091030.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.commands_0.13.0.v20201119-1132.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.expressions_3.7.100.v20210203-1000.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.contexts_1.8.400.v20191217-1710.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.di_1.7.700.v20210128-2123.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.di.annotations_1.6.600.v20191216-2352.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.services_2.2.600.v20210110-1654.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.workbench_1.12.100.v20210122-1731.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.commons.jxpath_1.3.0.v200911051830.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.model.workbench_2.1.1000.v20210111-0958.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.emf.ecore_2.23.0.v20200630-0516.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.emf.common_2.22.0.v20210114-1734.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.resources_3.14.0.v20210215-0934.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.ant.core_3.5.800.v20200608-1251.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.variables_3.4.800.v20200120-1101.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.filesystem_1.7.700.v20200110-1734.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.filesystem.linux.x86_64_1.2.300.v20180828-0158.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.emf.xpath_0.2.800.v20200609-0849.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.services_1.5.0.v20210115-1333.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.di_1.3.0.v20210222-1018.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.di.extensions.supplier_0.15.800.v20210110-1654.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.core.di.extensions_0.16.0.v20200507-0938.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.emf.ecore.change_2.14.0.v20190528-0725.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.emf.ecore.xmi_2.16.0.v20190528-0725.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.jdt.annotation_2.2.600.v20200408-1511.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.15.0.v20201125-0918.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.workbench.swt_0.16.0.v20201230-1610.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.dialogs_1.2.100.v20201109-2317.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.databinding_1.10.100.v20200926-1123.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.databinding.observable_1.10.0.v20200730-0848.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.core.databinding.property_1.8.100.v20200619-0651.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.jface.databinding_1.12.200.v20210111-0911.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.css.core_0.13.0.v20201015-0653.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.w3c.css.sac_1.3.1.v200903091627.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.batik.css_1.13.0.v20200622-2037.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.batik.i18n_1.13.0.v20200622-2037.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.xmlgraphics_2.4.0.v20200622-2037.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.commons.io_2.6.0.v20190123-2029.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/javax.xml_1.3.4.v201005080400.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.w3c.dom.svg_1.1.0.v201011041433.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.w3c.dom.smil_1.0.1.v200903091627.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.batik.util_1.13.0.v20200622-2037.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.apache.batik.constants_1.13.0.v20200622-2037.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.css.swt_0.14.100.v20201217-1340.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.bindings_0.13.0.v20201119-1132.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.workbench3_0.15.500.v20201021-1339.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.css.swt.theme_0.13.0.v20201026-1147.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.swt.gtk_1.1.100.v20210108-1832.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.widgets_1.2.800.v20201021-1339.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.urischeme_1.1.300.v20210113-1544.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/com.sun.jna_4.5.1.v20190425-1842.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/com.sun.jna.platform_4.5.1.v20190425-1842.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.jface.notifications_0.3.0.v20210218-1820.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.help_3.8.800.v20200525-0755.jar"/>
+			<pathelement path="../../../../.p2/pool/plugins/org.eclipse.e4.ui.workbench.addons.swt_1.4.100.v20201221-2332.jar"/>
+		</path>
+		<!-- compile the source code -->
+		<javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" source="${bundleJavacSource}" target="${bundleJavacTarget}"		>
+			<compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
+			<classpath refid="@dot.classpath" />
+			<src path="src/"			/>
+			<compilerarg value="@${basedir}/src/deploy/javaCompilerArgs" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"			/>
+			<compilerarg line="-log &apos;${build.result.folder}/@dot${logExtension}&apos;" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"			/>
+		</javac>
+		<antcall target="checkCompilationResults"/>
+		<!-- Copy necessary resources -->
+		<copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
+			<fileset dir="src/">
+				<exclude name="**/*.java"/>
+				<exclude name="**/package.htm*"/>
+			</fileset>
+		</copy>
+	</target>
+
+	<target name="src.zip" depends="init" unless="src.zip">
+		<mkdir dir="${build.result.folder}"/>
+		<antcall target="zip.src.zip"/>
+	</target>
+	<target name="zip.src.zip">
+		<zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
+			<fileset dir="src/">
+				<include name="**/*.java"/>
+			</fileset>
+		</zip>
+	</target>
+	<target name="copy.src.zip">
+		<copy todir="${source.destination.folder}/" failonerror="true" overwrite="true">
+			<fileset dir="src/">
+				<include name="**/*.java"/>
+			</fileset>
+		</copy>
+	</target>
+
+	<target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: StarPU.">
+		<delete file="${compilation.problem.marker}" quiet="true"/>
+		<available property="@dot" file="${build.result.folder}/@dot"/>
+		<antcall target="@dot"/>
+	</target>
+
+	<target name="checkCompilationResults" if="compilation.error.occured">
+		<echo file="${compilation.problem.marker}" message="StarPU_1.0.0.202105060849${line.separator}compilation.error.occured=${compilation.error.occured}"/>
+		<eclipse.logCompileError log="${compilation.prereq.log}" bundle="StarPU_1.0.0.202105060849">
+		</eclipse.logCompileError>
+	</target>
+
+	<target name="build.sources" depends="init">
+		<available property="src.zip" file="${build.result.folder}/src.zip"/>
+		<antcall target="src.zip"/>
+	</target>
+
+	<target name="publish.bin.parts" depends="init" if="p2.publish.parts" unless="compilation.problem.marker.exists">
+		<mkdir dir="${build.result.folder}/StarPU_1.0.0.202105060849"/>
+		<copy todir="${build.result.folder}" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}">
+				<include name="META-INF/MANIFEST.MF"/>
+				<include name="plugin.xml"/>
+				<include name="fragment.xml"/>
+			</fileset>
+		</copy>
+		<eclipse.versionReplacer path="${build.result.folder}" version="1.0.0.202105060849"/>
+		<antcall target="apitools.generation">
+			<param name="projectLocation" value="${basedir}"/>
+			<param name="projectName" value="${bundleId}_${bundleVersion}"/>
+			<param name="target.folder" value="${build.result.folder}"/>
+		</antcall>
+		<eclipse.gatherBundle 
+		   metadataRepository="${p2.build.repo}"
+		   artifactRepository="${p2.build.repo}"
+		   buildResultFolder="${build.result.folder}"
+		   baseDirectory="${basedir}"
+		/>
+	</target>
+
+	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/StarPU_1.0.0.202105060849"/>
+		<copy todir="${destination.temp.folder}/StarPU_1.0.0.202105060849" failonerror="true" overwrite="false">
+			<fileset dir="${build.result.folder}/@dot">
+				<include name="**"/>
+			</fileset>
+		</copy>
+		<copy todir="${destination.temp.folder}/StarPU_1.0.0.202105060849" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}">
+				<include name="plugin.xml"/>
+				<include name="META-INF/"/>
+				<include name="icons/"/>
+				<include name=".classpath"/>
+				<include name="src.includes = .classpath"/>
+			</fileset>
+		</copy>
+		<eclipse.versionReplacer path="${destination.temp.folder}/StarPU_1.0.0.202105060849" version="1.0.0.202105060849"/>
+		<antcall target="apitools.generation">
+			<param name="projectLocation" value="${basedir}"/>
+			<param name="projectName" value="${bundleId}_${bundleVersion}"/>
+			<param name="target.folder" value="${destination.temp.folder}/StarPU_1.0.0.202105060849"/>
+		</antcall>
+	</target>
+
+	<target name="build.zips" depends="init">
+	</target>
+
+	<target name="gather.sources" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/StarPU_1.0.0.202105060849"/>
+		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/StarPU_1.0.0.202105060849" failonerror="false" overwrite="false"/>
+		<antcall target="copy.src.includes">
+			<param name="source.destination.folder" value="${destination.temp.folder}/StarPU_1.0.0.202105060849"/>
+		</antcall>
+	</target>
+
+	<target name="gather.individual.sources" depends="init">
+		<antcall target="copy.src.zip">
+			<param name="source.destination.folder" value="${destination.temp.folder}"/>
+		</antcall>
+		<antcall target="copy.src.includes">
+			<param name="source.destination.folder" value="${destination.temp.folder}"/>
+		</antcall>
+	</target>
+
+	<target name="copy.src.includes" depends="init">
+	</target>
+
+	<target name="gather.logs" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/StarPU_1.0.0.202105060849"/>
+		<copy todir="${destination.temp.folder}/StarPU_1.0.0.202105060849" failonerror="false" overwrite="false">
+			<fileset dir="${build.result.folder}">
+				<include name="@dot${logExtension}"/>
+			</fileset>
+		</copy>
+	</target>
+
+	<target name="clean" depends="init" description="Clean the plug-in: StarPU of all the zips, jars and logs created.">
+		<delete dir="${build.result.folder}/@dot"/>
+		<delete file="${build.result.folder}/src.zip"/>
+		<delete file="${plugin.destination}/StarPU_1.0.0.202105060849.jar"/>
+		<delete file="${plugin.destination}/StarPU_1.0.0.202105060849.zip"/>
+		<delete dir="${temp.folder}"/>
+		<delete file="${compilation.problem.marker}" quiet="true"/>
+	</target>
+
+	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
+		<eclipse.convertPath fileSystemPath="${env.PWD}" property="resourcePath"/>
+		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
+	</target>
+
+	<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: StarPU.">
+		<delete dir="${temp.folder}"/>
+		<mkdir dir="${temp.folder}"/>
+		<antcall target="build.jars"/>
+		<antcall target="build.sources"/>
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${temp.folder}/"/>
+		</antcall>
+		<antcall target="gather.sources">
+			<param name="destination.temp.folder" value="${temp.folder}/"/>
+		</antcall>
+		<delete>
+			<fileset dir="${temp.folder}">
+				<include name="**/*.bin${logExtension}"/>
+			</fileset>
+		</delete>
+		<zip destfile="${plugin.destination}/StarPU_1.0.0.202105060849.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+
+	<target name="apitools.generation" if="generateAPIDescription">
+		<apitooling.apigeneration  projectName="${projectName}" project="${projectLocation}" binary="${binary.folders}" target="${target.folder}" extramanifests="${extraManifests}" allownonapiproject="${allowNonApiProject}"		/>
+	</target>
+
+</project>

+ 35 - 0
eclipse-plugin/examples/Makefile.am

@@ -0,0 +1,35 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2021       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
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+include $(top_srcdir)/starpu.mk
+
+EXTRA_DIST =					\
+	./hello/hello.c				\
+	./hello/.settings/language.settings.xml	\
+	./hello/.project
+
+ECLIPSE_DIR		=	$(shell dirname @ECLIPSE@)
+ECLIPSE_WORKSPACE	=	$(abs_top_builddir)/eclipse-plugin/workspace
+
+txtdir   = $(libdir)/starpu/eclipse-plugin/examples/hello
+txt_DATA = hello/hello.c \
+	   hello/.cproject \
+	   hello/.project
+
+script=$(abs_top_srcdir)/eclipse-plugin/tools/install_workspace.sh
+install-data-hook:
+	$(INSTALL_DATA) $(abs_top_srcdir)/eclipse-plugin/examples/hello/.settings/language.settings.xml $(txtdir).settings
+	$(ECLIPSE_DIR)/eclipse -noSplash -data $(DESTDIR)$(txtdir)/../../workspace -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import $(txtdir)
+

+ 242 - 0
eclipse-plugin/examples/hello/.cproject.in

@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+
+    <storageModule moduleId="org.eclipse.cdt.core.settings">
+
+        <cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.2100624537">
+
+            <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.2100624537" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+
+                <externalSettings/>
+
+                <extensions>
+
+                    <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                </extensions>
+
+            </storageModule>
+
+            <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+
+                <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.2100624537" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+
+                    <folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2100624537." name="/" resourcePath="">
+
+                        <toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1383927705" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+
+                            <targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.389755606" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+
+                            <builder buildPath="${workspace_loc:/hello}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1695422602" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.archiver.base.1374780537" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1322180533" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+
+                                <option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1567219705" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+
+                                <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="gnu.cpp.compiler.exe.debug.option.debugging.level.832298241" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1028592348" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+
+                                <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1147430098" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                                <option defaultValue="gnu.c.debugging.level.max" id="gnu.c.compiler.exe.debug.option.debugging.level.1967259291" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                                <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.2064046424" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+
+                                    <listOptionValue builtIn="false" value="@STARPU_INCLUDE_PATH@"/>
+
+                                </option>
+
+                                <option id="gnu.c.compiler.option.dialect.std.1848438983" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
+
+                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.943383707" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.579137969" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
+
+                                <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.paths.1502847159" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
+
+                                    <listOptionValue builtIn="false" value="@STARPU_LIB_PATH@"/>
+
+                                </option>
+
+                                <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.libs.1021432973" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false" valueType="libs">
+
+				  @STARPU_OPTION_LIBS@
+
+                                </option>
+
+                                <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.398489076" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+
+                                    <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+
+                                    <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+
+                                </inputType>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1511995291" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1184081452" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+
+                                <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="gnu.both.asm.option.include.paths.1623769217" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath"/>
+
+                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1188762128" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+
+                            </tool>
+
+                        </toolChain>
+
+                    </folderInfo>
+
+                </configuration>
+
+            </storageModule>
+
+            <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
+
+                <externalSettings containerId="org.eclipse.cdt.managedbuilder.pkgconfig.extSettings" factoryId="org.eclipse.cdt.core.extension.container.factory"/>
+
+            </storageModule>
+
+            <storageModule moduleId="packages" @STARPU_MODULE_LIBS@ />
+
+        </cconfiguration>
+
+        <cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1533299051">
+
+            <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1533299051" moduleId="org.eclipse.cdt.core.settings" name="Release">
+
+                <externalSettings/>
+
+                <extensions>
+
+                    <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                    <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+
+                </extensions>
+
+            </storageModule>
+
+            <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+
+                <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1533299051" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+
+                    <folderInfo id="cdt.managedbuild.config.gnu.exe.release.1533299051." name="/" resourcePath="">
+
+                        <toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.348259542" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+
+                            <targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1056676762" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
+
+                            <builder buildPath="${workspace_loc:/hello}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.200714749" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.archiver.base.987737323" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.321396296" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+
+                                <option id="gnu.cpp.compiler.exe.release.option.optimization.level.2087144166" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+
+                                <option defaultValue="gnu.cpp.compiler.debugging.level.none" id="gnu.cpp.compiler.exe.release.option.debugging.level.118686227" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.412219185" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
+
+                                <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1797350145" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                                <option defaultValue="gnu.c.debugging.level.none" id="gnu.c.compiler.exe.release.option.debugging.level.1018649438" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" useByScannerDiscovery="false" valueType="enumerated"/>
+
+                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.414280418" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1278673895" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release">
+
+                                <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.454497736" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+
+                                    <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+
+                                    <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+
+                                </inputType>
+
+                            </tool>
+
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.530048548" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
+
+                            <tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.421625725" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
+
+                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.722225800" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+
+                            </tool>
+
+                        </toolChain>
+
+                    </folderInfo>
+
+                </configuration>
+
+            </storageModule>
+
+            <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+
+        </cconfiguration>
+
+    </storageModule>
+
+    <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+
+        <project id="hello.cdt.managedbuild.target.gnu.exe.1220242327" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
+
+    </storageModule>
+
+    <storageModule moduleId="scannerConfiguration">
+
+        <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+
+        <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1533299051;cdt.managedbuild.config.gnu.exe.release.1533299051.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.412219185;cdt.managedbuild.tool.gnu.c.compiler.input.414280418">
+
+            <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+
+        </scannerConfigBuildInfo>
+
+        <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.2100624537;cdt.managedbuild.config.gnu.exe.debug.2100624537.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1028592348;cdt.managedbuild.tool.gnu.c.compiler.input.943383707">
+
+            <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+
+        </scannerConfigBuildInfo>
+
+    </storageModule>
+
+    <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+
+    <storageModule moduleId="refreshScope"/>
+
+    <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
+
+</cproject>

+ 26 - 0
eclipse-plugin/examples/hello/.project

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>hello</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 48 - 0
eclipse-plugin/examples/hello/.settings/language.settings.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+    	
+    <configuration id="cdt.managedbuild.config.gnu.exe.debug.2100624537" name="Debug">
+        		
+        <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+            			
+            <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+            			
+            <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+            			
+            <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+            			
+            <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="325456944513131706" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+                				
+                <language-scope id="org.eclipse.cdt.core.gcc"/>
+                				
+                <language-scope id="org.eclipse.cdt.core.g++"/>
+                			
+            </provider>
+            		
+        </extension>
+        	
+    </configuration>
+    	
+    <configuration id="cdt.managedbuild.config.gnu.exe.release.1533299051" name="Release">
+        		
+        <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+            			
+            <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+            			
+            <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+            			
+            <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+            			
+            <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="325456944513131706" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+                				
+                <language-scope id="org.eclipse.cdt.core.gcc"/>
+                				
+                <language-scope id="org.eclipse.cdt.core.g++"/>
+                			
+            </provider>
+            		
+        </extension>
+        	
+    </configuration>
+    
+</project>

+ 133 - 0
eclipse-plugin/examples/hello/hello.c

@@ -0,0 +1,133 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2009-2021  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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <starpu.h>
+
+void display_cpu_func(void *buffers[], void *cl_arg)
+{
+	(void)cl_arg;
+	int nx, i;
+	struct starpu_vector_interface *vector;
+	int *val;
+
+	vector = (struct starpu_vector_interface *) buffers[0];
+	nx = STARPU_VECTOR_GET_NX(vector);
+	val = (int *)STARPU_VECTOR_GET_PTR(vector);
+
+	for (i = 0; i < nx; i++)
+		fprintf(stdout, "V[%d] = %d\n", i, val[i]);
+}
+
+void scal_cpu_func(void *buffers[], void *cl_arg)
+{
+	int factor, nx, i;
+	struct starpu_vector_interface *vector;
+	int *val;
+
+	vector = (struct starpu_vector_interface *) buffers[0];
+	nx = STARPU_VECTOR_GET_NX(vector);
+	val = (int *)STARPU_VECTOR_GET_PTR(vector);
+	starpu_codelet_unpack_args(cl_arg, &factor);
+
+	for (i = 0; i < nx; i++)
+		val[i] *= factor;
+}
+
+void hello_cpu_func(void *buffers[], void *cl_arg)
+{
+	(void)buffers;
+	int answer;
+
+	starpu_codelet_unpack_args(cl_arg, &answer);
+	fprintf(stdout, "Hello world, the answer is %d\n", answer);
+}
+
+struct starpu_codelet hello_codelet =
+{
+	.cpu_funcs = {hello_cpu_func},
+	.cpu_funcs_name = {"hello_cpu_func"},
+	.nbuffers = 0,
+	.name = "hello"
+};
+
+struct starpu_codelet scal_codelet =
+{
+	.cpu_funcs = {scal_cpu_func},
+	.cpu_funcs_name = {"scal_cpu_func"},
+	.nbuffers = 1,
+	.modes = {STARPU_RW},
+	.name = "scal"
+};
+
+struct starpu_codelet display_codelet =
+{
+	.cpu_funcs = {display_cpu_func},
+	.cpu_funcs_name = {"display_cpu_func"},
+	.nbuffers = 1,
+	.modes = {STARPU_R},
+	.name = "display"
+};
+
+#define NX 5
+
+int main(void)
+{
+	int answer = 42;
+	int ret;
+	int vector[NX];
+	unsigned i;
+	starpu_data_handle_t vector_handle;
+
+	setenv("STARPU_FXT_TRACE", "1", 1);
+
+	ret = starpu_init(NULL);
+	if (ret == -ENODEV) return 77;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
+
+	for (i = 0; i < NX; i++)
+                vector[i] = i+1;
+	starpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));
+
+	ret = starpu_task_insert(&hello_codelet,
+				 STARPU_VALUE, &answer, sizeof(answer),
+				 0);
+	if (ret == -ENODEV) goto enodev;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+
+	ret = starpu_task_insert(&scal_codelet,
+				 STARPU_RW, vector_handle,
+				 STARPU_VALUE, &answer, sizeof(answer),
+				 0);
+	if (ret == -ENODEV) goto enodev;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+
+	ret = starpu_task_insert(&display_codelet,
+				 STARPU_R, vector_handle,
+				 0);
+	if (ret == -ENODEV) goto enodev;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+
+	starpu_data_unregister(vector_handle);
+	starpu_shutdown();
+
+	return 0;
+
+enodev:
+	starpu_shutdown();
+	return 77;
+}

BIN
eclipse-plugin/icons/fxt.png


BIN
eclipse-plugin/icons/svg.png


BIN
eclipse-plugin/icons/taskGraph.png


BIN
eclipse-plugin/icons/vite.png


+ 159 - 0
eclipse-plugin/plugin.xml

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.commands">
+      <category
+            id="StarPU.commands.category"
+            name="StarPU Category">
+      </category>
+      <command
+            categoryId="StarPU.commands.category"
+            name="StarPU FxT tool"
+            id="StarPU.commands.traceGenCommand">
+      </command>
+      <command
+            categoryId="StarPU.commands.category"
+            id="StarPU.commands.traceVizCommand"
+            name="Visualize Paje trace">
+      </command>
+      <command
+            categoryId="StarPU.commands.category"
+            id="StarPU.commands.taskGraphCommand"
+            name="Run Task graph">
+      </command>
+      <command
+            categoryId="StarPU.commands.category"
+            id="StarPU.commands.svgCommand"
+            name="Generate SVG graph">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="starpu.handlers.TraceGenHandler"
+            commandId="StarPU.commands.traceGenCommand">
+      </handler>
+      <handler
+            class="starpu.handlers.TraceVizHandler"
+            commandId="StarPU.commands.traceVizCommand">
+      </handler>
+      <handler
+            class="starpu.handlers.TaskGraphHandler"
+            commandId="StarPU.commands.taskGraphCommand">
+      </handler>
+      <handler
+            class="starpu.handlers.SvgHandler"
+            commandId="StarPU.commands.svgCommand">
+      </handler>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="StarPU.commands.traceGenCommand"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            contextId="org.eclipse.ui.contexts.window"
+            sequence="M1+6">
+      </key>
+      <key
+            commandId="StarPU.commands.traceVizCommand"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+7">
+      </key>
+      <key
+            commandId="StarPU.commands.taskGraphCommand"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+8">
+      </key>
+      <key
+            commandId="StarPU.commands.svgCommand"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+9">
+      </key>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
+         <menu
+               id="StarPU.menus.sampleMenu"
+               label="StarPU"
+               mnemonic="M">
+            <command
+                  commandId="StarPU.commands.traceGenCommand"
+                  id="StarPU.menus.traceGenCommand"
+                  mnemonic="S">
+            </command>
+            <command
+                  commandId="StarPU.commands.traceVizCommand"
+                  id="StarPU.menus.traceVizCommand"
+                  mnemonic="S"
+                  style="push">
+            </command>
+            <command
+                  commandId="StarPU.commands.taskGraphCommand"
+                  id="StarPU.commands.taskGraphCommand"
+                  style="push">
+            </command>
+            <command
+                  commandId="StarPU.commands.svgCommand"
+                  id="StarPU.commands.svgCommand"
+                  style="push">
+            </command>
+         </menu>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+         <toolbar
+               id="StarPU.toolbars.sampleToolbar">
+            <command
+                  id="StarPU.toolbars.traceGenCommand"
+                  commandId="StarPU.commands.traceGenCommand"
+                  icon="icons/fxt.png"
+                  tooltip="StarPU FxT tool">
+            </command>
+         </toolbar>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+         <toolbar
+               id="StarPU.toolbars.sampleToolbar">
+            <command
+                  commandId="StarPU.commands.traceVizCommand"
+                  icon="icons/vite.png"
+                  id="StarPU.toolbars.traceVizCommand"
+                  tooltip="Vizualise Paje trace">
+            </command>
+         </toolbar>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+         <toolbar
+               id="StarPU.toolbars.sampleToolbar">
+            <command
+                  commandId="StarPU.commands.taskGraphCommand"
+                  icon="icons/taskGraph.png"
+                  id="StarPU.toolbars.taskGraphCommand"
+                  tooltip="Run Task graph">
+            </command>
+         </toolbar>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+         <toolbar
+               id="StarPU.toolbars.sampleToolbar">
+            <command
+                  commandId="StarPU.commands.svgCommand"
+                  icon="icons/svg.png"
+                  id="StarPU.toolbars.svgCommand"
+                  tooltip="Generate SVG graph">
+            </command>
+         </toolbar>
+      </menuContribution>
+   </extension>
+
+</plugin>

+ 54 - 0
eclipse-plugin/src/Makefile.am

@@ -0,0 +1,54 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2021       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
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+include $(top_srcdir)/starpu.mk
+
+EXTRA_DIST =					\
+	deploy/build.xml			\
+	deploy/javaCompilerArgs			\
+	starpu/handlers/SvgHandler.java		\
+	starpu/handlers/TraceVizHandler.java	\
+	starpu/handlers/TaskGraphHandler.java	\
+	starpu/handlers/TraceGenHandler.java	\
+	starpu/handlers/TraceUtils.java
+
+ECLIPSE_DIR		=	$(shell dirname @ECLIPSE@)
+ECLIPSE_WORKSPACE	=	$(abs_top_builddir)/eclipse-plugin/workspace
+
+all: package
+	cp $(abs_top_srcdir)/eclipse-plugin/build.xml $(abs_top_srcdir)/eclipse-plugin/plugin_build.xml
+	rm -f build/plugin/plugins/StarPU_*jar
+	$(ECLIPSE_DIR)/eclipse -noSplash -data $(ECLIPSE_WORKSPACE) -application org.eclipse.ant.core.antRunner -buildfile $(abs_top_srcdir)/eclipse-plugin/src/deploy/build.xml
+	rm -f $(ECLIPSE_DIR)/dropins/StarPU_*jar
+	cp build/plugin/plugins/*.jar $(ECLIPSE_DIR)/dropins/
+	mv $(abs_top_srcdir)/eclipse-plugin/plugin_build.xml $(abs_top_srcdir)/eclipse-plugin/build.xml
+
+package:
+	$(ECLIPSE_DIR)/eclipse -noSplash -data $(ECLIPSE_WORKSPACE) -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import $(abs_top_srcdir)/eclipse-plugin
+	rm -f $(ECLIPSE_DIR)/dropins/StarPU_*jar
+	$(ECLIPSE_DIR)/eclipse -noSplash -data $(ECLIPSE_WORKSPACE) -application org.eclipse.ant.core.antRunner -buildfile $(abs_top_srcdir)/eclipse-plugin/build.xml
+
+txtdir = $(libdir)/starpu/eclipse-plugin/workspace
+script = $(abs_top_srcdir)/eclipse-plugin/tools/install_workspace.sh
+
+install-data-hook:
+	(cd $(abs_top_builddir)/eclipse-plugin/workspace && $(PROG_FIND) . -type f -exec $(script) {} $(DESTDIR)$(txtdir) $(INSTALL_DATA) \;)
+
+clean-local:
+	rm -rf build
+
+distclean-local: clean-local
+	rm -f $(ECLIPSE_DIR)/dropins/StarPU_*jar
+	rm -rf $(ECLIPSE_WORKSPACE)

+ 7 - 0
eclipse-plugin/src/deploy/build.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="plugin_export" name="build">
+ 	<property environment="env"/>
+	<target name="plugin_export">
+		<pde.exportPlugins destination="${env.PWD}/build/plugin" exportSource="false" exportType="directory" plugins="StarPU" useJARFormat="true"/>
+	</target>
+</project>

File diff suppressed because it is too large
+ 79 - 0
eclipse-plugin/src/deploy/javaCompilerArgs


+ 82 - 0
eclipse-plugin/src/starpu/handlers/SvgHandler.java

@@ -0,0 +1,82 @@
+// StarPU --- Runtime system for heterogeneous multicore architectures.
+//
+// Copyright (C) 2021       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
+// the Free Software Foundation; either version 2.1 of the License, or (at
+// your option) any later version.
+//
+// StarPU is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+//
+// See the GNU Lesser General Public License in COPYING.LGPL for more details.
+//
+package starpu.handlers;
+
+import java.awt.EventQueue;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class SvgHandler extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		EventQueue.invokeLater(() -> {
+			try {
+				String workDir = System.getProperty("user.dir") + "/" + TraceUtils.getRandomDirectoryName();
+				String inputfilename = workDir + "/dag.dot";
+				File f = new File(inputfilename);
+				if (!f.isFile())
+					throw new Exception("File <" + inputfilename + "> does not exist. Have you run StarPU FxT tool?");
+
+				String[] cmd1 = { "dot", "-Tcmapx", inputfilename, "-o", workDir + "/output.map"};
+				TraceUtils.runCommand(cmd1);
+
+				String[] cmd2 = { "dot", "-Tsvg", inputfilename, "-o", workDir + "/output.svg" };
+				TraceUtils.runCommand(cmd2);
+
+				IEditorInput input = HandlerUtil.getActiveEditor(event).getEditorInput();
+
+				if (!(input instanceof IPathEditorInput)) {
+					System.out.println("There is no path");
+				}
+				else
+				{
+					String map = TraceUtils.readFileToString(workDir + "/output.map");
+					Pattern p = Pattern.compile("href=\"[a-zA-Z./]+#");
+					IPath ipath = ((IPathEditorInput) input).getPath().makeAbsolute();
+					String chemin = ipath.toString();
+					String replaceBy = "href=\"" + chemin + "#";
+					map = p.matcher(map).replaceAll(replaceBy);
+
+					PrintWriter pw = new PrintWriter(workDir + "/output.html");
+					pw.println(new String("<html>\n" + "<img src=\"output.svg\" usemap=\"#G\" />\n"));
+					pw.println(map);
+					pw.println(new String("</html>"));
+					pw.close();
+				}
+
+				String[] cmd8 = { "firefox", workDir + "/output.html" };
+				TraceUtils.runCommand(cmd8);
+			} catch (Exception e) {
+				TraceUtils.displayMessage("Error: " + e.toString());
+				e.printStackTrace();
+			}
+
+		});
+
+		return null;
+	}
+
+}

+ 68 - 0
eclipse-plugin/src/starpu/handlers/TaskGraphHandler.java

@@ -0,0 +1,68 @@
+// StarPU --- Runtime system for heterogeneous multicore architectures.
+//
+// Copyright (C) 2021       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
+// the Free Software Foundation; either version 2.1 of the License, or (at
+// your option) any later version.
+//
+// StarPU is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+//
+// See the GNU Lesser General Public License in COPYING.LGPL for more details.
+//
+package starpu.handlers;
+
+import java.awt.EventQueue;
+import java.awt.Image;
+import java.io.File;
+
+import javax.imageio.ImageIO;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class TaskGraphHandler extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		EventQueue.invokeLater(() -> {
+			try {
+				String workDir = System.getProperty("user.dir") + "/" + TraceUtils.getRandomDirectoryName();
+				String inputfilename = workDir + "/dag.dot";
+				File f = new File(inputfilename);
+				if (!f.isFile())
+					throw new Exception("File <" + inputfilename + "> does not exist. Have you run StarPU FxT tool?");
+
+				String[] cmd2 = { "dot", "-Tpng", inputfilename, "-o", workDir + "/" + "output.png" };
+				starpu.handlers.TraceUtils.runCommand(cmd2);
+				String[] cmd3 = { "starpu_tasks_rec_complete", workDir + "/" + "tasks.rec" };
+				starpu.handlers.TraceUtils.runCommand(cmd3);
+
+				JFrame frame = new JFrame();
+				File imageFile = new File(workDir + "/" + "output.png");
+				Image i = ImageIO.read(imageFile);
+				ImageIcon image = new ImageIcon(i);
+				JLabel imageLabel = new JLabel(image);
+				frame.add(imageLabel);
+				frame.pack();
+				imageLabel.setVisible(true);
+				frame.setVisible(true);
+				frame.setTitle("StarPU application: Task Graph.png");
+			} catch (Exception e) {
+				TraceUtils.displayMessage("Error: " + e.toString());
+				e.printStackTrace();
+			}
+
+		});
+
+		return null;
+	}
+
+}

+ 70 - 0
eclipse-plugin/src/starpu/handlers/TraceGenHandler.java

@@ -0,0 +1,70 @@
+// StarPU --- Runtime system for heterogeneous multicore architectures.
+//
+// Copyright (C) 2021       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
+// the Free Software Foundation; either version 2.1 of the License, or (at
+// your option) any later version.
+//
+// StarPU is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+//
+// See the GNU Lesser General Public License in COPYING.LGPL for more details.
+//
+package starpu.handlers;
+
+import java.awt.EventQueue;
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class TraceGenHandler extends AbstractHandler {
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+		MessageDialog.openInformation(window.getShell(), "StarPU FxT Tool",
+				"Running Starpu FxT Tool: generation of different trace formats");
+		EventQueue.invokeLater(() -> {
+			try {
+				String value = System.getenv("STARPU_FXT_PREFIX");
+				if (value != null) {
+					System.out.println("STARPU_FXT_PREFIX=" + value);
+				} else {
+					System.out.println("STARPU_FXT_PREFIX does not have a value");
+					value = "/tmp";
+				}
+
+				String value1 = System.getenv("STARPU_FXT_SUFFIX");
+				if (value1 != null) {
+					System.out.println("STARPU_FXT_SUFFIX=" + value1);
+				} else {
+					System.out.println("STARPU_FXT_SUFFIX does not have a value");
+					String value2 = System.getenv("USER");
+					value1 = "prof_file_" + value2 + "_0";
+				}
+
+				String inputfilename = value + "/" + value1;
+				File f = new File(inputfilename);
+				if (!f.isFile())
+					throw new Exception("File <" + inputfilename + "> does not exist. Have you run your application?");
+
+				String[] command = {"starpu_fxt_tool", "-i", inputfilename, "-d", TraceUtils.getRandomDirectoryName()};
+				TraceUtils.runCommand(command);
+			} catch (Exception e) {
+				TraceUtils.displayMessage("Error: " + e.toString());
+				e.printStackTrace();
+			}
+
+		});
+
+		return null;
+	}
+
+}

+ 95 - 0
eclipse-plugin/src/starpu/handlers/TraceUtils.java

@@ -0,0 +1,95 @@
+// StarPU --- Runtime system for heterogeneous multicore architectures.
+//
+// Copyright (C) 2021       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
+// the Free Software Foundation; either version 2.1 of the License, or (at
+// your option) any later version.
+//
+// StarPU is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+//
+// See the GNU Lesser General Public License in COPYING.LGPL for more details.
+//
+package starpu.handlers;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Random;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+public class TraceUtils {
+
+	private static int x = 1000 + new Random().nextInt(9999);
+
+	public static void runCommand(String[] command) throws Exception
+	{
+		System.out.println("Running command " + Arrays.toString(command));
+		Process p = Runtime.getRuntime().exec(command);
+
+		String line;
+		BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
+		while ((line = in.readLine()) != null) {
+			System.out.println(line);
+		}
+		in.close();
+	}
+
+	public static String getRandomDirectoryName()
+	{
+		return "traces_" + x;
+	}
+
+	public static void displayMessage(String message)
+	{
+		final JFrame f = new JFrame("StarPU Message");
+
+		JLabel l = new JLabel(message);
+		JButton b19 = new JButton("OK");
+
+		b19.addActionListener(new ActionListener()
+			{
+				public void actionPerformed(ActionEvent evt)
+				{
+					f.setVisible(false);
+				}
+			});
+
+		JPanel p = new JPanel();
+		p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+		p.add(l);
+		p.add(b19);
+
+		f.add(p);
+		f.pack();
+		f.setVisible(true);
+	}
+
+	public static String readFileToString(String filename) throws IOException
+	{
+		BufferedReader reader = new BufferedReader(new FileReader(filename));
+		StringBuilder stringBuilder = new StringBuilder();
+		char[] buffer = new char[10];
+		while (reader.read(buffer) != -1) {
+			stringBuilder.append(new String(buffer));
+			buffer = new char[10];
+		}
+		reader.close();
+
+		return stringBuilder.toString();
+	}
+
+
+}

+ 49 - 0
eclipse-plugin/src/starpu/handlers/TraceVizHandler.java

@@ -0,0 +1,49 @@
+// StarPU --- Runtime system for heterogeneous multicore architectures.
+//
+// Copyright (C) 2021       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
+// the Free Software Foundation; either version 2.1 of the License, or (at
+// your option) any later version.
+//
+// StarPU is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+//
+// See the GNU Lesser General Public License in COPYING.LGPL for more details.
+//
+package starpu.handlers;
+
+import java.awt.EventQueue;
+import java.io.File;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class TraceVizHandler extends AbstractHandler {
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		EventQueue.invokeLater(() -> {
+			try {
+				String workDir = System.getProperty("user.dir") + "/" + TraceUtils.getRandomDirectoryName();
+				String inputfilename = workDir + "/paje.trace";
+
+				File f = new File(inputfilename);
+				if (!f.isFile())
+					throw new Exception("File <" + inputfilename + "> does not exist. Have you run StarPU FxT tool?");
+
+				String[] cmd1 = { "vite", inputfilename };
+				starpu.handlers.TraceUtils.runCommand(cmd1);
+			} catch (Exception e) {
+				TraceUtils.displayMessage("Error: " + e.toString());
+				e.printStackTrace();
+			}
+		});
+
+		return null;
+	}
+
+}

+ 36 - 0
eclipse-plugin/tools/cproject.sh

@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2021       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
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+
+type=$1
+shift
+
+if test "$type" == "module"
+then
+    input='@STARPU_LIB@="true"'
+elif test "$type" == "option"
+then
+     input='<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="@STARPU_LIB@"/>'
+else
+    echo Unknown type $type
+    exit 1
+fi
+
+for x in $*
+do
+    echo $input | sed -e 's/@STARPU_LIB@/'$x'/'
+done | tr '\012' ' '

+ 30 - 0
eclipse-plugin/tools/install_workspace.sh

@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2021       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
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+
+src=$1
+dst=$2
+shift
+shift
+
+if test ! -d $dst/$(dirname $src)
+then
+    echo mkdir -p $dst/$(dirname $src)
+    mkdir -p $dst/$(dirname $src)
+fi
+echo $* $src $dst/$(dirname $src)
+$* $src $dst/$(dirname $src)

+ 3 - 1
examples/Makefile.am

@@ -81,6 +81,9 @@ EXTRA_DIST = 					\
 
 CLEANFILES = *.gcno *.gcda *.linkinfo *.mod starpu_idle_microsec.log *.mps */*.mps */*/*.mps *.dot */*.dot */*/*.dot *.pl */*.pl */*/*.pl *.png *.output tasks.rec perfs.rec */perfs.rec */*/perfs.rec perfs2.rec fortran90/starpu_mod.f90 native_fortran/fstarpu_mod.f90
 
+clean-local:
+	-rm -rf mult/sgemm.traces lu/lu.traces
+
 if STARPU_USE_CUDA
 
 if STARPU_COVERITY
@@ -240,7 +243,6 @@ STARPU_EXAMPLES +=				\
 	filters/fmultiple_submit_readonly	\
 	filters/fmultiple_submit_implicit	\
 	filters/frecursive			\
-	filters/fplan_notautomatic		\
 	tag_example/tag_example			\
 	tag_example/tag_example2		\
 	tag_example/tag_example3		\

+ 2 - 2
examples/axpy/axpy.c

@@ -231,8 +231,8 @@ enodev:
 	if (exit_value != 77)
 		exit_value = check();
 
-	starpu_free((void *)_vec_x);
-	starpu_free((void *)_vec_y);
+	starpu_free_noflag((void *)_vec_x, N*sizeof(TYPE));
+	starpu_free_noflag((void *)_vec_y, N*sizeof(TYPE));
 
 #ifdef STARPU_USE_OPENCL
         ret = starpu_opencl_unload_opencl(&opencl_program);

+ 0 - 1
examples/basic_examples/task_insert_color.c

@@ -45,7 +45,6 @@ struct starpu_codelet mycodelet_color =
 
 int main(void)
 {
-	unsigned i;
 	int value=42;
 	starpu_data_handle_t handle;
 	int ret;

+ 6 - 6
examples/cg/cg.c

@@ -125,12 +125,12 @@ static void generate_random_problem(void)
 
 static void free_data(void)
 {
-	starpu_free(A);
-	starpu_free(b);
-	starpu_free(x);
-	starpu_free(r);
-	starpu_free(d);
-	starpu_free(q);
+	starpu_free_noflag(A, n*n*sizeof(TYPE));
+	starpu_free_noflag(b, n*sizeof(TYPE));
+	starpu_free_noflag(x, n*sizeof(TYPE));
+	starpu_free_noflag(r, n*sizeof(TYPE));
+	starpu_free_noflag(d, n*sizeof(TYPE));
+	starpu_free_noflag(q, n*sizeof(TYPE));
 }
 
 static void register_data(void)

+ 1 - 1
examples/cholesky/cholesky_kernels.c

@@ -218,8 +218,8 @@ static inline void chol_common_codelet_update_u11(void *descr[], int s, void *_a
 			{
 			int ret;
 			int info;
-			cudaStream_t stream = starpu_cuda_get_local_stream();
 #if (MAGMA_VERSION_MAJOR > 1) || (MAGMA_VERSION_MAJOR == 1 && MAGMA_VERSION_MINOR >= 4)
+			cudaStream_t stream = starpu_cuda_get_local_stream();
 			cublasSetKernelStream(stream);
 			magmablasSetKernelStream(stream);
 #else

+ 7 - 1
examples/filters/fmultiple_manual.c

@@ -117,9 +117,15 @@ void empty(void *buffers[], void *cl_arg)
 
 struct starpu_codelet cl_switch =
 {
+#if 1
+	/* Check for the values */
 	.cpu_funcs = {empty},
+#else
+	/* For production code: we do not need to actually execute anything */
+	.where = STARPU_NOWHERE,
+#endif
 	.nbuffers = STARPU_VARIABLE_NBUFFERS,
-	.name = "switch"
+	.name = "switch",
 };
 
 int main(void)

+ 1 - 1
examples/filters/fmultiple_submit_readonly.c

@@ -146,7 +146,7 @@ struct starpu_codelet cl_check =
 int main(void)
 {
 	int start, factor;
-	unsigned j, n=1;
+	unsigned n=1;
 	int matrix[NX][NY];
 	int ret, i;
 

+ 0 - 244
examples/filters/fplan_notautomatic.c

@@ -1,244 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2018-2021  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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * See the GNU Lesser General Public License in COPYING.LGPL for more details.
- */
-
-#include <starpu.h>
-
-#define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
-
-#define NX    9
-#define PARTS 3
-
-struct starpu_codelet task_codelet;
-
-// CPU implementations
-void task_cpu(void *descr[], void *args)
-{
-	int *values = (int*)STARPU_VECTOR_GET_PTR(descr[0]);
-	int nx = STARPU_VECTOR_GET_NX(descr[0]);
-	int i, add;
-	char message[10000];
-	int cur = 0;
-
-	starpu_codelet_unpack_args(args, &add);
-
-	cur += snprintf(&message[cur], 10000-cur, "Values ");
-	for(i=0 ; i<nx ; i++)
-	{
-		values[i] += add;
-		cur += snprintf(&message[cur], 10000-cur, "%d ", values[i]);
-	}
-	FPRINTF(stderr, "%s\n", message);
-}
-
-void split_callback(void *arg)
-{
-	(void)arg;
-	struct starpu_task *task = starpu_task_get_current();
-	starpu_data_handle_t value_handle, sub_handles[PARTS];
-
-	starpu_codelet_unpack_args(task->cl_arg, &value_handle, &sub_handles);
-
-	FPRINTF(stderr, "[callback] Partition for handle %p into handles %p %p and %p\n", value_handle, sub_handles[0], sub_handles[1], sub_handles[2]);
-
-	starpu_data_partition_submit_sequential_consistency(value_handle, PARTS, sub_handles, 0);
-}
-
-void supertask_callback(void *arg)
-{
-	(arg);
-	starpu_data_handle_t sub_handles[PARTS];
-	int add;
-	struct starpu_task *task = starpu_task_get_current();
-
-	starpu_codelet_unpack_args(task->cl_arg, &sub_handles, &add);
-
-	FPRINTF(stderr, "Submitting tasks on %d subdata (add %d)\n", PARTS, add);
-
-	int i;
-	for(i=0 ; i<PARTS ; i++)
-	{
-		int ret = starpu_task_insert(&task_codelet,
-					     STARPU_RW, sub_handles[i],
-					     STARPU_VALUE, &add, sizeof(add),
-					     0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-	}
-}
-
-void release(void *arg)
-{
-	struct starpu_task *task = (struct starpu_task *)arg;
-	starpu_task_end_dep_release(task);
-}
-
-void merge_callback(void *arg)
-{
-	(void)arg;
-	struct starpu_task *task = starpu_task_get_current();
-
-	starpu_data_handle_t value_handle, sub_handles[PARTS];
-	starpu_codelet_unpack_args(task->cl_arg, &value_handle, &sub_handles);
-
-	FPRINTF(stderr, "Unpartition for handle %p from handles %p %p and %p\n", value_handle, sub_handles[0], sub_handles[1], sub_handles[2]);
-
-	starpu_data_unpartition_submit_sequential_consistency_cb(value_handle, PARTS, sub_handles, STARPU_MAIN_RAM, 0, release, task);
-}
-
-// Codelets
-struct starpu_codelet task_codelet =
-{
-	.cpu_funcs = {task_cpu},
-	.nbuffers = 1,
-	.modes = {STARPU_RW},
-	.name = "task_codelet"
-};
-
-struct starpu_codelet supertask_codelet =
-{
-	.where= STARPU_NOWHERE,
-	.nbuffers = 1,
-	.modes = {STARPU_RW},
-	.name = "supertask_codelet"
-};
-
-struct starpu_codelet split_codelet =
-{
-	.where= STARPU_NOWHERE,
-	.nbuffers = 1,
-	.modes = {STARPU_RW},
-	.name = "split_codelet"
-};
-
-struct starpu_codelet merge_codelet =
-{
-	.where= STARPU_NOWHERE,
-	.nbuffers = 1,
-	.modes = {STARPU_RW},
-	.name = "merge_codelet"
-};
-
-int main(void)
-{
-	int ret, i;
-	int values[NX];
-	int check[NX];
-	int add1=1;
-	int add2=2;
-	starpu_data_handle_t value_handle;
-	starpu_data_handle_t sub_handles[PARTS];
-
-	ret = starpu_init(NULL);
-	if (ret == -ENODEV)
-		exit(77);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
-
-	if (starpu_cpu_worker_get_count() == 0)
-	{
-		FPRINTF(stderr, "We need at least 1 CPU worker.\n");
-		starpu_shutdown();
-		return 77;
-	}
-
-	struct starpu_data_filter f =
-	{
-		.filter_func = starpu_vector_filter_block,
-		.nchildren = PARTS
-	};
-
-	values[NX-1] = 2;
-	for(i=NX-2 ; i>= 0 ; i--) values[i] = values[i+1] * 2;
-	for(i=0 ; i<NX ; i++) check[i] = values[i] + (2 * add1) + (2 * add2);
-
-	starpu_vector_data_register(&value_handle, STARPU_MAIN_RAM, (uintptr_t)&values[0], NX, sizeof(values[0]));
-	starpu_data_partition_plan(value_handle, &f, sub_handles);
-
-	// tell StarPU not to partition data, the application will decide itself when to do it
-	starpu_data_partition_not_automatic(value_handle);
-	for(i=0 ; i<PARTS ; i++)
-		starpu_data_partition_not_automatic(sub_handles[i]);
-
-	// insert a task on the whole data
-	ret = starpu_task_insert(&task_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, &add1, sizeof(add1),
-				 STARPU_NAME, "task_1", 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	// insert a task to split the data
-	ret = starpu_task_insert(&split_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, &value_handle, sizeof(starpu_data_handle_t),
-				 STARPU_VALUE, sub_handles, PARTS*sizeof(starpu_data_handle_t),
-				 STARPU_NAME, "split",
-				 STARPU_PROLOGUE_CALLBACK, split_callback,
-				 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	// insert a task that will work on the subdata
-	ret = starpu_task_insert(&supertask_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, sub_handles, PARTS*sizeof(starpu_data_handle_t),
-				 STARPU_VALUE, &add1, sizeof(add1),
-				 STARPU_NAME, "supertask_1",
-				 STARPU_PROLOGUE_CALLBACK, supertask_callback,
-				 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	// insert another task that will work on the subdata
-	ret = starpu_task_insert(&supertask_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, sub_handles, PARTS*sizeof(starpu_data_handle_t),
-				 STARPU_VALUE, &add2, sizeof(add2),
-				 STARPU_NAME, "supertask_2",
-				 STARPU_PROLOGUE_CALLBACK, supertask_callback,
-				 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	// insert a task to merge the data
-	ret = starpu_task_insert(&merge_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, &value_handle, sizeof(starpu_data_handle_t),
-				 STARPU_VALUE, sub_handles, PARTS*sizeof(starpu_data_handle_t),
-				 STARPU_NAME, "merge",
-				 STARPU_PROLOGUE_CALLBACK, merge_callback,
-				 STARPU_TASK_END_DEP, 1,
-				 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	// insert a task that will work on the whole data
-	ret = starpu_task_insert(&task_codelet, STARPU_RW, value_handle,
-				 STARPU_VALUE, &add2, sizeof(add2),
-				 STARPU_NAME, "task_2", 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
-
-	starpu_task_wait_for_all();
-	starpu_data_partition_clean(value_handle, PARTS, sub_handles);
-	starpu_data_unregister(value_handle);
-
-	FPRINTF(stderr, "Values : ");
-	for(i=0 ; i<NX ; i++)
-	{
-		FPRINTF(stderr, "%d ", values[i]);
-	}
-	FPRINTF(stderr, "\n");
-	for(i=0 ; i<NX ; i++)
-	{
-		if (values[i] != check[i])
-		{
-			FPRINTF(stderr, "Incorrect value for %d. %d != %d\n", i, values[i], check[i]);
-			ret = 1;
-		}
-	}
-
-	starpu_shutdown();
-
-	return ret;
-}

+ 1 - 1
examples/filters/fread.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2020-2021  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

+ 4 - 0
examples/filters/frecursive.c

@@ -114,6 +114,7 @@ int main(void)
 	ret = starpu_task_insert(&cl,
 				 STARPU_RW, subhandle_l1[0],
 				 STARPU_VALUE, &factor, sizeof(factor),
+				 STARPU_NAME, "sub-matrix1",
 				 0);
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	for (i=1; i<PARTS; i++)
@@ -121,6 +122,8 @@ int main(void)
 		ret = starpu_task_insert(&cl,
 					 STARPU_RW, subhandle_l2[i][0],
 					 STARPU_VALUE, &factor, sizeof(factor),
+					 STARPU_NAME, "sub-matrix2",
+
 					 0);
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 		for (j=1; j<PARTS; j++)
@@ -130,6 +133,7 @@ int main(void)
 				ret = starpu_task_insert(&cl,
 							 STARPU_RW, subhandle_l3[i][j][k],
 							 STARPU_VALUE, &factor, sizeof(factor),
+							 STARPU_NAME, "sub-matrix3",
 							 0);
 				STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 			}

+ 3 - 3
examples/heat/dw_factolu.c

@@ -797,12 +797,12 @@ void initialize_system(float **A, float **B, unsigned dim, unsigned pinned)
 	}
 }
 
-void free_system(float *A, float *B, unsigned pinned)
+void free_system(float *A, float *B, unsigned dim, unsigned pinned)
 {
 	if (pinned)
 	{
-		starpu_free(A);
-		starpu_free(B);
+		starpu_free_noflag(A, (size_t)dim*dim*sizeof(float));
+		starpu_free_noflag(B, (size_t)dim*sizeof(float));
 	}
 	else
 	{

+ 0 - 2
examples/heat/dw_factolu_kernels.c

@@ -338,7 +338,6 @@ static inline void dw_common_codelet_update_u11(void *descr[], int s, void *_arg
 
 #ifdef STARPU_USE_CUDA
 	cudaStream_t stream;
-	cublasHandle_t handle;
 	cublasStatus_t status;
 #endif
 
@@ -372,7 +371,6 @@ static inline void dw_common_codelet_update_u11(void *descr[], int s, void *_arg
 #ifdef STARPU_USE_CUDA
 		case 1:
 			stream = starpu_cuda_get_local_stream();
-			handle = starpu_cublas_get_local_handle();
 			for (z = 0; z < nx; z++)
 			{
 				float pivot;

+ 1 - 1
examples/heat/heat.c

@@ -799,7 +799,7 @@ int main(int argc, char **argv)
 
 		starpu_cublas_shutdown();
 		starpu_shutdown();
-		free_system(A, B, pinned);
+		free_system(A, B, newsize, pinned);
 	}
 
 #ifdef STARPU_OPENGL_RENDER

+ 1 - 1
examples/heat/heat.h

@@ -61,7 +61,7 @@ extern void dw_factoLU(float *matA, unsigned size, unsigned ld, unsigned nblocks
 extern void dw_factoLU_tag(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned no_prio);
 extern void dw_factoLU_grain(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned nbigblocks);
 extern void initialize_system(float **A, float **B, unsigned dim, unsigned pinned);
-extern void free_system(float *A, float *B, unsigned pinned);
+extern void free_system(float *A, float *B, unsigned dim, unsigned pinned);
 
 void display_stat_heat(void);
 

+ 1 - 0
examples/lu/lu.sh

@@ -23,6 +23,7 @@ rm -rf $PREFIX/lu.traces
 mkdir -p $PREFIX/lu.traces
 
 export STARPU_FXT_PREFIX=$PREFIX/lu.traces
+export STARPU_FXT_TRACE=1
 
 $STARPU_LAUNCH $PREFIX/lu_implicit_example_float -size $((160 * 4)) -nblocks 4 -piv
 $STARPU_LAUNCH $PREFIX/lu_implicit_example_float -size $((160 * 4)) -nblocks 4 -no-stride

+ 1 - 1
examples/lu/lu_example.c

@@ -154,7 +154,7 @@ void copy_blocks_into_matrix(void)
 				A_blocks[bi+nblocks*bj][i + j * blocksize];
 		}
 
-		starpu_free(A_blocks[bi+nblocks*bj]);
+		starpu_free_noflag(A_blocks[bi+nblocks*bj], (size_t)blocksize*blocksize*sizeof(TYPE));
 	}
 }
 

+ 0 - 2
examples/lu/xlu_kernels.c

@@ -55,7 +55,6 @@ static inline void STARPU_LU(common_u22)(void *descr[], int s, void *_args)
 
 #ifdef STARPU_USE_CUDA
 	cublasStatus status;
-	cudaError_t cures;
 #endif
 
 	switch (s)
@@ -181,7 +180,6 @@ static inline void STARPU_LU(common_u12)(void *descr[], int s, void *_args)
 
 #ifdef STARPU_USE_CUDA
 	cublasStatus status;
-	cudaError_t cures;
 #endif
 
 	/* solve L11 U12 = A12 (find U12) */

+ 1 - 1
examples/mult/sgemm.sh

@@ -30,7 +30,7 @@ mkdir -p $PREFIX/sgemm.traces
 
 export STARPU_FXT_PREFIX=$PREFIX/sgemm.traces
 
-STARPU_SCHED=dmdas $PREFIX/sgemm -check
+STARPU_FXT_TRACE=1 STARPU_SCHED=dmdas $PREFIX/sgemm -check
 if [ -x $PREFIX/../../tools/starpu_fxt_tool ];
 then
 	$STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_plot -o $STARPU_FXT_PREFIX -s starpu_sgemm_gemm -i $STARPU_FXT_PREFIX/prof_file_${USER}_0

+ 43 - 6
examples/mult/xgemm.c

@@ -186,6 +186,12 @@ static void partition_mult_data(void)
 		starpu_data_partition(A_handle, &horiz);
 
 		starpu_data_map_filters(C_handle, 2, &vert, &horiz);
+
+		for (y = 0; y < nslicesy; y++)
+			starpu_data_set_coordinates(starpu_data_get_sub_data(A_handle, 1, y), 2, 0, y);
+
+		for (x = 0; x < nslicesx; x++)
+			starpu_data_set_coordinates(starpu_data_get_sub_data(B_handle, 1, x), 2, x, 0);
 	}
 
 	for (x = 0; x < nslicesx; x++)
@@ -345,11 +351,6 @@ static void parse_args(int argc, char **argv)
 				fprintf(stderr, "the number of blocks in X cannot be 0!\n");
 				exit(EXIT_FAILURE);
 			}
-			if (nslicesy == 0)
-			{
-				fprintf(stderr, "the number of blocks in Y cannot be 0!\n");
-				exit(EXIT_FAILURE);
-			}
 		}
 
 		else if (strcmp(argv[i], "-nblocksx") == 0)
@@ -389,36 +390,72 @@ static void parse_args(int argc, char **argv)
 		{
 			char *argptr;
 			xdim = strtol(argv[++i], &argptr, 10);
+			if (xdim == 0)
+			{
+				fprintf(stderr, "the X dimension cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-xy") == 0)
 		{
 			char *argptr;
 			xdim = ydim = strtol(argv[++i], &argptr, 10);
+			if (xdim == 0)
+			{
+				fprintf(stderr, "the XY dimensions cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
+		}
+		
+		else if (strcmp(argv[i], "-xyz") == 0)
+		{
+			char *argptr;
+			xdim = ydim = zdim = strtol(argv[++i], &argptr, 10);
 		}
 
 		else if (strcmp(argv[i], "-y") == 0)
 		{
 			char *argptr;
 			ydim = strtol(argv[++i], &argptr, 10);
+			if (ydim == 0)
+			{
+				fprintf(stderr, "the Y dimension cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-z") == 0)
 		{
 			char *argptr;
 			zdim = strtol(argv[++i], &argptr, 10);
+			if (zdim == 0)
+			{
+				fprintf(stderr, "the Z dimension cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-size") == 0)
 		{
 			char *argptr;
 			xdim = ydim = zdim = strtol(argv[++i], &argptr, 10);
+			if (xdim == 0)
+			{
+				fprintf(stderr, "the size cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-iter") == 0)
 		{
 			char *argptr;
 			niter = strtol(argv[++i], &argptr, 10);
+			if (niter == 0)
+			{
+				fprintf(stderr, "the number of iterations cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-nsleeps") == 0)
@@ -449,7 +486,7 @@ static void parse_args(int argc, char **argv)
 
 		else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0)
 		{
-			fprintf(stderr,"Usage: %s [-3d] [-nblocks n] [-nblocksx x] [-nblocksy y] [-nblocksz z] [-x x] [-y y] [-xy n] [-z z] [-size size] [-iter iter] [-bound] [-check] [-spmd] [-hostname] [-nsleeps nsleeps]\n", argv[0]);
+			fprintf(stderr,"Usage: %s [-3d] [-nblocks n] [-nblocksx x] [-nblocksy y] [-nblocksz z] [-x x] [-y y] [-xy n] [-z z] [-xyz n] [-size size] [-iter iter] [-bound] [-check] [-spmd] [-hostname] [-nsleeps nsleeps]\n", argv[0]);
 			if (tiled)
 				fprintf(stderr,"Currently selected: %ux%u * %ux%u and %ux%ux%u blocks (size %ux%u length %u), %u iterations, %u sleeps\n", zdim, ydim, xdim, zdim, nslicesx, nslicesy, nslicesz, xdim / nslicesx, ydim / nslicesy, zdim / nslicesz, niter, nsleeps);
 			else

+ 1 - 1
examples/pi/SobolQRNG/sobol_gold.c

@@ -70,7 +70,7 @@ void initSobolDirectionVectors(int n_dimensions, unsigned int *directions)
             for (i = 0 ; i < n_directions ; i++)
             {
                 /* All m's are 1 */
-                v[i] = 1 << (31 - i);
+                v[i] = 1U << (31 - i);
             }
         }
         else

+ 4 - 2
examples/sched_ctx/gpu_partition.c

@@ -103,8 +103,10 @@ int main(void)
 {
 	int ret, exit_value = 0;
 	int iter;
+#ifdef STARPU_USE_CUDA
 	int ncuda = 0;
 	int gpu_devid = -1;
+#endif
 
 #ifdef STARPU_DEVEL
 #warning temporary fix: skip test as cuda computation fails
@@ -242,8 +244,8 @@ enodev:
 
 	for(iter = 0; iter < NITER; iter++)
 	{
-		starpu_free((void *)_vec_x[iter]);
-		starpu_free((void *)_vec_y[iter]);
+		starpu_free_noflag((void *)_vec_x[iter], N*sizeof(float));
+		starpu_free_noflag((void *)_vec_y[iter], N*sizeof(float));
 	}
 
 	/* Stop StarPU */

+ 1 - 2
examples/sched_ctx/sched_ctx.c

@@ -82,7 +82,6 @@ int main(void)
 {
 	int ntasks = NTASKS;
 	int ret;
-	unsigned ncuda = 0;
 	int nprocs1 = 0;
 	int nprocs2 = 0;
 	int procs1[STARPU_NMAXWORKERS], procs2[STARPU_NMAXWORKERS];
@@ -105,7 +104,7 @@ int main(void)
 	if (nprocs1 == 0) goto enodev;
 
 #ifdef STARPU_USE_CUDA
-	ncuda = nprocs2 = starpu_cuda_worker_get_count();
+	nprocs2 = starpu_cuda_worker_get_count();
 	starpu_worker_get_ids_by_type(STARPU_CUDA_WORKER, procs2, nprocs2);
 #endif
 	if (nprocs2 == 0)

+ 3 - 2
examples/sched_ctx/sched_ctx_without_sched_policy.c

@@ -79,10 +79,11 @@ int main(void)
 
 	int nprocs1 = 1;
 	int nprocs2 = 1;
-	int ncuda = 0;
-	int *procs1, *procs2, *procscuda;
+	int *procs1, *procs2;
 
 #ifdef STARPU_USE_CUDA
+	int ncuda = 0;
+	int *procscuda;
 	ncuda = starpu_cuda_worker_get_count();
 	procscuda = (int*)malloc(ncuda*sizeof(int));
 	starpu_worker_get_ids_by_type(STARPU_CUDA_WORKER, procscuda, ncuda);

+ 1 - 2
examples/spmv/matrix_market/mm_to_bcsr.c

@@ -315,7 +315,6 @@ bcsr_t *mm_file_to_bcsr(char *filename, unsigned c, unsigned r)
 {
 	FILE *f;
 	MM_typecode matcode;
-	int ret_code;
 	int M, N;
 	int nz;
 	int i;
@@ -348,7 +347,7 @@ bcsr_t *mm_file_to_bcsr(char *filename, unsigned c, unsigned r)
 
 	/* find out size of sparse matrix .... */
 
-	if ((ret_code = mm_read_mtx_crd_size(f, &M, &N, &nz)) !=0)
+	if ((mm_read_mtx_crd_size(f, &M, &N, &nz)) !=0)
 		exit(1);
 
 

+ 6 - 6
examples/spmv/spmv.c

@@ -253,12 +253,12 @@ int main(int argc, char **argv)
 		}
 	}
 
-	starpu_free(nzval);
-	starpu_free(colind);
-	starpu_free(rowptr);
-	starpu_free(vector_in_ptr);
-	starpu_free(vector_out_ptr);
-	starpu_free(vector_exp_out_ptr);
+	starpu_free_noflag(nzval, nnz*sizeof(float));
+	starpu_free_noflag(colind, nnz*sizeof(uint32_t));
+	starpu_free_noflag(rowptr, (size+1)*sizeof(uint32_t));
+	starpu_free_noflag(vector_in_ptr, size*sizeof(float));
+	starpu_free_noflag(vector_out_ptr, size*sizeof(float));
+	starpu_free_noflag(vector_exp_out_ptr, size*sizeof(float));
 
 	/*
 	 *	Stop StarPU

+ 84 - 2
include/schedulers/starpu_heteroprio.h

@@ -24,13 +24,86 @@ extern "C"
 {
 #endif
 
-#define STARPU_HETEROPRIO_MAX_PRIO 100
+/**
+   @defgroup API_HeteroPrio Heteroprio Scheduler
+   @brief This is the interface for the heteroprio scheduler
+   @{
+ */
 
 #define STARPU_HETEROPRIO_MAX_PREFETCH 2
 #if STARPU_HETEROPRIO_MAX_PREFETCH <= 0
 #error STARPU_HETEROPRIO_MAX_PREFETCH == 1 means no prefetch so STARPU_HETEROPRIO_MAX_PREFETCH must >= 1
 #endif
 
+#define STARPU_AUTOHETEROPRIO_PRIORITY_ORDERING_POLICY_COUNT 28
+
+enum starpu_autoheteroprio_priority_ordering_policy
+{
+	STARPU_HETEROPRIO_NOD_TIME_COMBINATION, // 0
+	STARPU_HETEROPRIO_BEST_NODS_SCORE,
+	STARPU_HETEROPRIO_BEST_NODS,
+	STARPU_HETEROPRIO_URT_PURE,
+	STARPU_HETEROPRIO_URT,
+	STARPU_HETEROPRIO_URT_2, // 5
+	STARPU_HETEROPRIO_URT_DOT_DIFF_PURE,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_PURE_2,
+	STARPU_HETEROPRIO_URT_DOT_REL_DIFF_PURE,
+	STARPU_HETEROPRIO_URT_DOT_REL_DIFF_PURE_2,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_2, // 10
+	STARPU_HETEROPRIO_URT_DOT_DIFF_3,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_4,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_5,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_6,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_7, // 15
+	STARPU_HETEROPRIO_URT_DOT_DIFF_8,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_9,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_10,
+	STARPU_HETEROPRIO_URT_DOT_DIFF_11,
+	STARPU_HETEROPRIO_URTS_PER_SECONDS, // 20
+	STARPU_HETEROPRIO_URTS_PER_SECONDS_2,
+	STARPU_HETEROPRIO_URTS_PER_SECONDS_DIFF,
+	STARPU_HETEROPRIO_URTS_TIME_RELEASED_DIFF,
+	STARPU_HETEROPRIO_URTS_TIME_COMBINATION,
+	STARPU_HETEROPRIO_NODS_PER_SECOND,
+	STARPU_HETEROPRIO_NODS_TIME_RELEASED,
+	STARPU_HETEROPRIO_NODS_TIME_RELEASED_DIFF
+};
+
+static const char starpu_autoheteroprio_priority_ordering_policy_names[STARPU_AUTOHETEROPRIO_PRIORITY_ORDERING_POLICY_COUNT][64] = 
+{
+	"STARPU_HETEROPRIO_NOD_TIME_COMBINATION",
+	"STARPU_HETEROPRIO_BEST_NODS_SCORE",
+	"STARPU_HETEROPRIO_BEST_NODS",
+	"STARPU_HETEROPRIO_URT_PURE",
+	"STARPU_HETEROPRIO_URT",
+	"STARPU_HETEROPRIO_URT_2",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_PURE",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_PURE_2",
+	"STARPU_HETEROPRIO_URT_DOT_REL_DIFF_PURE",
+	"STARPU_HETEROPRIO_URT_DOT_REL_DIFF_PURE_2",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_2",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_3",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_4",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_5",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_6",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_7",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_8",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_9",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_10",
+	"STARPU_HETEROPRIO_URT_DOT_DIFF_11",
+	"STARPU_HETEROPRIO_URTS_PER_SECONDS",
+	"STARPU_HETEROPRIO_URTS_PER_SECONDS_2",
+	"STARPU_HETEROPRIO_URTS_PER_SECONDS_DIFF",
+	"STARPU_HETEROPRIO_URTS_TIME_RELEASED_DIFF",
+	"STARPU_HETEROPRIO_URTS_TIME_COMBINATION",
+	"STARPU_HETEROPRIO_NODS_PER_SECOND",
+	"STARPU_HETEROPRIO_NODS_TIME_RELEASED",
+	"STARPU_HETEROPRIO_NODS_TIME_RELEASED_DIFF"
+};
+
+/** Set if heteroprio should use data locality or not */
+void starpu_heteroprio_set_use_locality(unsigned sched_ctx_id, unsigned use_locality);
+
 /** Tell how many prio there are for a given arch */
 void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned max_prio);
 
@@ -40,11 +113,20 @@ void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_worker_arc
 /** Tell which arch is the faster for the tasks of a bucket (optional) */
 void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id);
 
-/** Tell how slow is a arch for the tasks of a bucket (optional) */ 
+/** Tell how slow is a arch for the tasks of a bucket (optional) */
 void starpu_heteroprio_set_arch_slow_factor(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id, float slow_factor);
 
+/** One memory node will be one wgroup */
+void starpu_heteroprio_map_wgroup_memory_nodes(unsigned sched_ctx_id);
+
+/** Print the current setup groups */
+void starpu_heteroprio_print_wgroups(FILE *stream, unsigned sched_ctx_id);
+
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* __STARPU_SCHEDULER_HETEROPRIO_H__ */
+

+ 1 - 0
include/starpu.h

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2021  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2021       Federal University of Rio Grande do Sul (UFRGS)
  *
  * 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

+ 25 - 1
include/starpu_data.h

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2021  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2021       Federal University of Rio Grande do Sul (UFRGS)
  *
  * 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
@@ -117,7 +118,9 @@ enum starpu_data_access_mode
 			            When inserting these tasks through the
 				    MPI layer however, the access mode needs
 				    to be ::STARPU_MPI_REDUX. */
-	STARPU_ACCESS_MODE_MAX=(1<<8) /**< The purpose of ::STARPU_ACCESS_MODE_MAX is to
+	STARPU_NOPLAN=(1<<8),	/**< Disable automatic submission of asynchronous
+				    partitioning/unpartitioning */
+	STARPU_ACCESS_MODE_MAX=(1<<9) /**< The purpose of ::STARPU_ACCESS_MODE_MAX is to
 					be the maximum of this enum. */
 };
 
@@ -492,6 +495,15 @@ unsigned starpu_data_is_on_node(starpu_data_handle_t handle, unsigned node);
 void starpu_data_wont_use(starpu_data_handle_t handle);
 
 /**
+   Advise StarPU to evict \p handle from the memory node \p node
+   StarPU will thus write its value back to its home node, before evicting it.
+   This may however fail if e.g. some task is still working on it.
+
+   If the eviction was successful, 0 is returned ; -1 is returned otherwise.
+*/
+int starpu_data_evict_from_node(starpu_data_handle_t handle, unsigned node);
+
+/**
    Set the write-through mask of the data \p handle (and
    its children), i.e. a bitmask of nodes where the data should be always
    replicated after modification. It also prevents the data from being
@@ -606,6 +618,18 @@ void starpu_data_set_user_data(starpu_data_handle_t handle, void* user_data);
 void *starpu_data_get_user_data(starpu_data_handle_t handle);
 
 /**
+   Set the field \c sched_data for the \p handle to \p sched_data . It can
+   then be retrieved with starpu_data_get_sched_data(). \p sched_data can be any
+   scheduler-defined value.
+*/
+void starpu_data_set_sched_data(starpu_data_handle_t handle, void* sched_data);
+
+/**
+   Retrieve the field \c sched_data previously set for the \p handle.
+*/
+void *starpu_data_get_sched_data(starpu_data_handle_t handle);
+
+/**
   Check whether data \p handle can be evicted now from node \p node
 */
 int starpu_data_can_evict(starpu_data_handle_t handle, unsigned node, enum starpu_is_prefetch is_prefetch);

+ 8 - 8
include/starpu_data_filters.h

@@ -240,6 +240,12 @@ void starpu_data_partition_submit(starpu_data_handle_t initial_handle, unsigned
 void starpu_data_partition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
 
 /**
+ * Similar to starpu_data_partition_readonly_submit(), but allow to
+ * specify the the coherency to be used for the main data \p initial_handle
+ */
+void starpu_data_partition_readonly_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int sequential_consistency);
+
+/**
    Assume that a partitioning of \p initial_handle has already been submited
    in readonly mode through starpu_data_partition_readonly_submit(), and will upgrade
    that partitioning into read-write mode for the \p children, by invalidating \p
@@ -295,12 +301,6 @@ void starpu_data_partition_submit_sequential_consistency(starpu_data_handle_t in
 */
 void starpu_data_unpartition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node, int sequential_consistency);
 
-/**
-   Disable the automatic partitioning of the data \p handle for which
-   a asynchronous plan has previously been submitted
-*/
-void starpu_data_partition_not_automatic(starpu_data_handle_t handle);
-
 /** @} */
 
 /**
@@ -531,12 +531,12 @@ void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_
    Given an integer \p n, \p n the number of parts it must be divided in, \p id the
    part currently considered, determines the \p chunk_size and the \p offset, taking
    into account the size of the elements stored in the data structure \p elemsize
-   and \p ld, the leading dimension, which is most often 1.
+   and \p blocksize, which is most often 1.
  */
 void
 starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
 					     size_t elemsize, unsigned id,
-					     unsigned ld, unsigned *chunk_size,
+					     unsigned blocksize, unsigned *chunk_size,
 					     size_t *offset);
 
 /** @} */

+ 24 - 0
include/starpu_data_interfaces.h

@@ -1963,6 +1963,11 @@ size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
  */
 #define STARPU_BCSR_GET_NNZ(interface)        (((struct starpu_bcsr_interface *)(interface))->nnz)
 /**
+   Return the number of block rows in the matrix designated
+   by \p interface.
+ */
+#define STARPU_BCSR_GET_NROW(interface)        (((struct starpu_bcsr_interface *)(interface))->nrow)
+/**
    Return a pointer to the non-zero values of the matrix
    designated by \p interface.
  */
@@ -1996,6 +2001,25 @@ size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
  */
 #define STARPU_BCSR_GET_ROWPTR_DEV_HANDLE(interface) (((struct starpu_bcsr_interface *)(interface))->rowptr)
 /**
+   Return the base of the indexing (0 or 1 usually) in the matrix designated
+   by \p interface.
+ */
+#define STARPU_BCSR_GET_FIRSTENTRY(interface)        (((struct starpu_bcsr_interface *)(interface))->firstentry)
+/**
+   Return the height of blocks in the matrix designated
+   by \p interface.
+ */
+#define STARPU_BCSR_GET_R(interface)        (((struct starpu_bcsr_interface *)(interface))->r)
+/**
+   Return the width of blocks in the matrix designated
+   by \p interface.
+ */
+#define STARPU_BCSR_GET_C(interface)        (((struct starpu_bcsr_interface *)(interface))->c)
+/**
+   Return the size of elements in the matrix designated by \p interface.
+ */
+#define STARPU_BCSR_GET_ELEMSIZE(interface)        (((struct starpu_bcsr_interface *)(interface))->elemsize)
+/**
    Return the offset in the arrays (coling, rowptr, nzval) of the
    matrix designated by \p interface, to be used with the device handles.
  */

+ 0 - 0
include/starpu_stdlib.h


Some files were not shown because too many files changed in this diff