Selaa lähdekoodia

Merge branch 'fpga' of gitlab.inria.fr:starpu/starpu into fpga

Samuel Thibault 4 vuotta sitten
vanhempi
commit
a66f548d0c
100 muutettua tiedostoa jossa 2416 lisäystä ja 360 poistoa
  1. 12 2
      ChangeLog
  2. 4 0
      Makefile.am
  3. 7 0
      README.dev
  4. 140 79
      configure.ac
  5. 10 3
      doc/doxygen/Makefile.am
  6. 3 0
      doc/doxygen/chapters/000_introduction.doxy
  7. 3 0
      doc/doxygen/chapters/310_data_management.doxy
  8. 10 7
      doc/doxygen/chapters/380_offline_performance_tools.doxy
  9. 127 0
      doc/doxygen/chapters/497_eclipse_plugin.doxy
  10. 25 1
      doc/doxygen/chapters/501_environment_variables.doxy
  11. 5 0
      doc/doxygen/chapters/510_configure_options.doxy
  12. 1 1
      doc/doxygen/chapters/code/disk_compute.c
  13. BIN
      doc/doxygen/chapters/images/eclipse_hello_build.png
  14. BIN
      doc/doxygen/chapters/images/eclipse_hello_fxt.png
  15. BIN
      doc/doxygen/chapters/images/eclipse_hello_graph.png
  16. BIN
      doc/doxygen/chapters/images/eclipse_hello_run.png
  17. BIN
      doc/doxygen/chapters/images/eclipse_install_cdt.png
  18. BIN
      doc/doxygen/chapters/images/eclipse_install_pde.png
  19. BIN
      doc/doxygen/chapters/images/eclipse_installer.png
  20. 5 0
      doc/doxygen/refman.tex
  21. 11 0
      eclipse-plugin/.classpath
  22. 1 0
      eclipse-plugin/.gitignore
  23. 28 0
      eclipse-plugin/.project
  24. 9 0
      eclipse-plugin/.settings/org.eclipse.jdt.core.prefs
  25. 12 0
      eclipse-plugin/META-INF/MANIFEST.MF
  26. 34 0
      eclipse-plugin/Makefile.am
  27. 8 0
      eclipse-plugin/build.properties
  28. 343 0
      eclipse-plugin/build.xml
  29. 35 0
      eclipse-plugin/examples/Makefile.am
  30. 242 0
      eclipse-plugin/examples/hello/.cproject.in
  31. 26 0
      eclipse-plugin/examples/hello/.project
  32. 48 0
      eclipse-plugin/examples/hello/.settings/language.settings.xml
  33. 133 0
      eclipse-plugin/examples/hello/hello.c
  34. BIN
      eclipse-plugin/icons/fxt.png
  35. BIN
      eclipse-plugin/icons/svg.png
  36. BIN
      eclipse-plugin/icons/taskGraph.png
  37. BIN
      eclipse-plugin/icons/vite.png
  38. 159 0
      eclipse-plugin/plugin.xml
  39. 54 0
      eclipse-plugin/src/Makefile.am
  40. 7 0
      eclipse-plugin/src/deploy/build.xml
  41. 79 0
      eclipse-plugin/src/deploy/javaCompilerArgs
  42. 82 0
      eclipse-plugin/src/starpu/handlers/SvgHandler.java
  43. 68 0
      eclipse-plugin/src/starpu/handlers/TaskGraphHandler.java
  44. 70 0
      eclipse-plugin/src/starpu/handlers/TraceGenHandler.java
  45. 95 0
      eclipse-plugin/src/starpu/handlers/TraceUtils.java
  46. 49 0
      eclipse-plugin/src/starpu/handlers/TraceVizHandler.java
  47. 36 0
      eclipse-plugin/tools/cproject.sh
  48. 30 0
      eclipse-plugin/tools/install_workspace.sh
  49. 18 6
      examples/Makefile.am
  50. 2 2
      examples/axpy/axpy.c
  51. 0 1
      examples/basic_examples/task_insert_color.c
  52. 13 13
      examples/cg/cg.c
  53. 50 50
      examples/cg/cg_kernels.c
  54. 1 1
      examples/cholesky/cholesky_kernels.c
  55. 2 0
      examples/cpp/add_vectors_interface.cpp
  56. 1 1
      examples/filters/fmultiple_submit_readonly.c
  57. 1 1
      examples/filters/fplan_notautomatic.c
  58. 3 3
      examples/heat/dw_factolu.c
  59. 0 2
      examples/heat/dw_factolu_kernels.c
  60. 1 1
      examples/heat/heat.c
  61. 1 1
      examples/heat/heat.h
  62. 3 3
      examples/interface/complex.c
  63. 3 3
      examples/interface/complex_codelet.h
  64. 1 0
      examples/lu/lu.sh
  65. 1 1
      examples/lu/lu_example.c
  66. 0 2
      examples/lu/xlu_kernels.c
  67. 1 1
      examples/mult/sgemm.sh
  68. 77 3
      examples/mult/xgemm.c
  69. 1 1
      examples/pi/SobolQRNG/sobol_gold.c
  70. 4 2
      examples/sched_ctx/gpu_partition.c
  71. 1 2
      examples/sched_ctx/sched_ctx.c
  72. 3 2
      examples/sched_ctx/sched_ctx_without_sched_policy.c
  73. 1 2
      examples/spmv/matrix_market/mm_to_bcsr.c
  74. 6 6
      examples/spmv/spmv.c
  75. 1 1
      examples/tag_example/tag_example4.c
  76. 1 0
      include/starpu_config.h.in
  77. 35 0
      include/starpu_data_interfaces.h
  78. 10 0
      include/starpu_sched_component.h
  79. 11 3
      include/starpu_stdlib.h
  80. 16 10
      include/starpu_task.h
  81. 20 14
      include/starpu_util.h
  82. 2 2
      julia/examples/execute.sh.in
  83. 0 1
      julia/examples/task_insert_color/task_insert_color.c
  84. 3 4
      mpi/examples/benchs/abstract_sendrecv_bench.c
  85. 4 7
      mpi/examples/benchs/sendrecv_parallel_tasks_bench.c
  86. 88 86
      mpi/examples/cg/cg.c
  87. 1 1
      mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c
  88. 0 3
      mpi/examples/matrix_decomposition/mpi_cholesky_distributed.c
  89. 1 1
      mpi/examples/matrix_decomposition/mpi_cholesky_kernels.c
  90. 1 1
      mpi/examples/matrix_decomposition/mpi_decomposition_matrix.c
  91. 3 3
      mpi/examples/matrix_mult/mm.c
  92. 8 7
      mpi/examples/mpi_lu/plu_example.c
  93. 2 2
      mpi/examples/mpi_lu/plu_implicit_example.c
  94. 0 3
      mpi/examples/mpi_lu/pxlu.c
  95. 0 2
      mpi/examples/mpi_lu/pxlu_kernels.c
  96. 0 1
      mpi/examples/mpi_redux/mpi_redux.c
  97. 0 1
      mpi/src/mpi/starpu_mpi_early_data.c
  98. 2 3
      mpi/tests/block_interface_pinned.c
  99. 1 1
      mpi/tests/early_stuff.c
  100. 0 0
      mpi/tests/helper.h

+ 12 - 2
ChangeLog

@@ -53,10 +53,16 @@ New features:
   * Add peek_data interface method.
   * Add STARPU_MPI_REDUX
   * Add starpu_data_query_status2 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.
 
 Small changes:
   * Add a synthetic energy efficiency testcase.
@@ -65,8 +71,11 @@ 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.
 
 StarPU 1.3.8
 ====================================================================
@@ -87,6 +96,7 @@ Small features:
     variables.
   * Add STARPU_SCHED_SIMPLE_PRE_DECISION.
   * Add starpu_bcsr_filter_canonical_block_get_nchildren.
+  * Add unregister_data_handle handle ops.
 
 StarPU 1.3.7
 ====================================================================

+ 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.

+ 140 - 79
configure.ac

@@ -1158,7 +1158,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])
 
@@ -1947,94 +1955,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])
+	    PKG_CHECK_MODULES([FXT],  [fxt], [have_valid_fxt=yes], [have_valid_fxt=no])
 	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"
-	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])],
@@ -2049,7 +2067,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],
@@ -2380,13 +2397,16 @@ if test x$enable_perf_debug = xyes; then
 	IS_SUPPORTED_FLAG(-fno-pie)
 fi
 
+IS_SUPPORTED_FLAG(-Wextra)
+IS_SUPPORTED_FLAG(-Wunused)
+IS_SUPPORTED_CFLAG(-Wundef)
+IS_SUPPORTED_CXXFLAG(-Wundef)
+IS_SUPPORTED_FLAG(-Wshadow)
+IS_SUPPORTED_CFLAG(-Wpointer-arith)
+IS_SUPPORTED_CXXFLAG(-Wpointer-arith)
+
 if test "x$STARPU_DEVEL" != x; then
 	AC_DEFINE(STARPU_DEVEL, [1], [enable developer warnings])
-	IS_SUPPORTED_FLAG(-Wextra)
-	IS_SUPPORTED_FLAG(-Wunused)
-	IS_SUPPORTED_CFLAG(-Wundef)
-	IS_SUPPORTED_CXXFLAG(-Wundef)
-	IS_SUPPORTED_FLAG(-Wshadow)
 	IS_SUPPORTED_CFLAG(-Werror=pointer-arith)
 	IS_SUPPORTED_CXXFLAG(-Werror=pointer-arith)
 	IS_SUPPORTED_FLAG(-fno-common)
@@ -2900,6 +2920,14 @@ AM_CONDITIONAL(STARPU_HAVE_CBLAS_H, test x$have_cblas_h = xyes)
 if test x$have_cblas_h = xyes; then
     AC_DEFINE(STARPU_HAVE_CBLAS_H, [1], [The blas library has blas.h])
 fi
+if test x$blas_lib != xnone; then
+    AC_DEFINE(STARPU_HAVE_BLAS, [1], [The blas library is available])
+    SAVED_LIBS="$LIBS"
+    LIBS="$LIBS -lblas"
+    AC_CHECK_FUNCS([cblas_sgemv])
+    LIBS="$SAVED_LIBS"
+fi
+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)
@@ -3429,8 +3457,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
@@ -3439,6 +3467,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                               #
 #                                                                             #
 ###############################################################################
@@ -3635,6 +3692,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([
@@ -3664,7 +3725,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

+ 10 - 3
doc/doxygen/Makefile.am

@@ -88,6 +88,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		\
@@ -142,7 +143,13 @@ 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
 
 if STARPU_BUILD_DOC
 EXTRA_DIST += \
@@ -171,7 +178,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
@@ -271,7 +278,7 @@ $(DOX_TAG): $(dox_inputs)
 
 $(DOX_HTML_DIR): $(DOX_TAG)
 
-$(DOX_PDF): $(DOX_TAG) refman.tex
+$(DOX_PDF): $(DOX_TAG) refman.tex $(images)
 	@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>

+ 3 - 0
doc/doxygen/chapters/310_data_management.doxy

@@ -959,6 +959,9 @@ static void complex_register_data_handle(starpu_data_handle_t handle, unsigned h
 
 If the application provided a home node, the corresponding pointers will be
 recorded for that node. Others have no buffer allocated yet.
+Possibly the interface needs some dynamic allocation (e.g. to store an array of
+dimensions that can have variable size). The corresponding deallocation will then be
+done in starpu_data_interface_ops::unregister_data_handle.
 
 Different operations need to be defined for a data interface through
 the type starpu_data_interface_ops. We only define here the basic

+ 10 - 7
doc/doxygen/chapters/380_offline_performance_tools.doxy

@@ -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:
 

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

@@ -0,0 +1,127 @@
+/* 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
+
+\section PluginUsage Using The StarPU Eclipse Plugin
+
+You first need to set up your environment for StarPU.
+
+\verbatim
+cd $HOME/usr/local/starpu
+source ./bin/starpu_env
+\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=10cm
+
+The application can now be executed.
+
+\image html eclipse_hello_run.png
+\image latex eclipse_hello_run.png "" width=10cm
+
+The StarPU plugin eclipse is either available through the icons in the upper toolbar, or from the dropdown menu \c StarPU.
+
+You first need to run the StarPU FxT tool, either through the \c FxT icon, or from the menu \c StarPU / \c StarPU Fxt Tool.
+This will call the tool \c starpu_fxt_tool to generate traces for your application execution.
+
+\image html eclipse_hello_fxt.png
+\image latex eclipse_hello_fxt.png "" width=10cm
+
+You can then visualise the Paje trace with the tool \c vite, or display the graph task directly from eclipse.
+
+\image html eclipse_hello_graph.png
+\image latex eclipse_hello_graph.png "" width=10cm
+
+or through a web browser. 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").
+
+*/

+ 25 - 1
doc/doxygen/chapters/501_environment_variables.doxy

@@ -416,6 +416,30 @@ STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.
 </dd>
 </dl>
 
+\subsection fpgaWorkers FPGA Workers
+<dl>
+<dt>STARPU_NFPGA</dt>
+<dd>
+\anchor STARPU_NFPGA
+\addindex __env__STARPU_NFPGA
+Specify the number of FPGA devices that StarPU can use. If
+\ref STARPU_NFPGA is lower than the number of physical devices, it is
+possible to select which FPGA devices should be used by the means of the
+environment variable \ref STARPU_WORKERS_FPGAID. By default, StarPU will
+create as many FPGA workers as there are GPU devices.
+</dd>
+
+<dt>STARPU_WORKERS_FPGAID</dt>
+<dd>
+\anchor STARPU_WORKERS_FPGAID
+\addindex __env__STARPU_WORKERS_FPGAID
+Similarly to the \ref STARPU_WORKERS_CPUID environment variable, it is
+possible to select which FPGA devices should be used by StarPU. On a machine
+equipped with 4 FPGAs, setting <c>STARPU_WORKERS_FPGAID = "1 3"</c> and
+<c>STARPU_NFPGA=2</c> specifies that 2 FPGA workers should be created, and that
+they should use FPGA devices #1 and #3 (the logical ordering of the devices is
+the one reported by FPGA).
+
 
 \subsection mpimsWorkers MPI Master Slave Workers
 <dl>
@@ -1016,7 +1040,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>

+ 5 - 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>

+ 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_run.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


+ 5 - 0
doc/doxygen/refman.tex

@@ -198,6 +198,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}

+ 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>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 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)

+ 18 - 6
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
@@ -309,6 +312,12 @@ endif
 endif
 endif
 
+if STARPU_USE_CUDA
+STARPU_EXAMPLES +=				\
+	mult/sgemm 				\
+	mult/dgemm
+endif
+
 if !STARPU_NO_BLAS_LIB
 STARPU_EXAMPLES +=				\
 	mult/sgemm 				\
@@ -358,9 +367,11 @@ STARPU_EXAMPLES +=				\
 endif
 
 if STARPU_HAVE_CBLAS_H
+if STARPU_HAVE_CBLAS_SGEMV
 STARPU_EXAMPLES +=				\
 	spmv/dw_block_spmv
 endif
+endif
 
 if !STARPU_SIMGRID
 if STARPU_HAVE_F77
@@ -670,22 +681,23 @@ endif
 # Mult example #
 ################
 
-if !STARPU_NO_BLAS_LIB
-
 mult_sgemm_SOURCES = 				\
-	mult/sgemm.c				\
-	common/blas.c
+	mult/sgemm.c
 
 mult_sgemm_LDADD =				\
 	$(STARPU_BLAS_LDFLAGS)
 
 mult_dgemm_SOURCES = 				\
-	mult/dgemm.c				\
-	common/blas.c
+	mult/dgemm.c
 
 mult_dgemm_LDADD =				\
 	$(STARPU_BLAS_LDFLAGS)
 
+if !STARPU_NO_BLAS_LIB
+mult_sgemm_SOURCES += 				\
+	common/blas.c
+mult_dgemm_SOURCES += 				\
+	common/blas.c
 endif
 
 ####################

+ 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;

+ 13 - 13
examples/cg/cg.c

@@ -79,12 +79,12 @@ static int copy_handle(starpu_data_handle_t dst, starpu_data_handle_t src, unsig
 static TYPE *A, *b, *x;
 static TYPE *r, *d, *q;
 
-static int copy_handle(starpu_data_handle_t dst, starpu_data_handle_t src, unsigned nblocks)
+static int copy_handle(starpu_data_handle_t dst, starpu_data_handle_t src, unsigned nb)
 {
-	unsigned b;
+	unsigned block;
 
-	for (b = 0; b < nblocks; b++)
-		starpu_data_cpy(starpu_data_get_sub_data(dst, 1, b), starpu_data_get_sub_data(src, 1, b), 1, NULL, NULL);
+	for (block = 0; block < nb; block++)
+		starpu_data_cpy(starpu_data_get_sub_data(dst, 1, block), starpu_data_get_sub_data(src, 1, block), 1, NULL, NULL);
 	return 0;
 }
 
@@ -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)
@@ -258,12 +258,12 @@ static void display_matrix(void)
 
 static void display_x_result(void)
 {
-	int j, i;
+	unsigned j, i;
 	starpu_data_handle_t sub;
 
 	FPRINTF(stderr, "Computed X vector:\n");
 
-	int block_size = n / nblocks;
+	unsigned block_size = n / nblocks;
 
 	for (j = 0; j < nblocks; j++)
 	{
@@ -320,7 +320,7 @@ int main(int argc, char **argv)
 	FPRINTF(stderr, "************** PARAMETERS ***************\n");
 	FPRINTF(stderr, "Problem size (-n): %lld\n", n);
 	FPRINTF(stderr, "Maximum number of iterations (-maxiter): %d\n", i_max);
-	FPRINTF(stderr, "Number of blocks (-nblocks): %d\n", nblocks);
+	FPRINTF(stderr, "Number of blocks (-nblocks): %u\n", nblocks);
 	FPRINTF(stderr, "Reduction (-no-reduction): %s\n", use_reduction ? "enabled" : "disabled");
 
 	start = starpu_timing_now();

+ 50 - 50
examples/cg/cg_kernels.c

@@ -31,7 +31,7 @@ static const TYPE gm1 = -1.0;
 
 #define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
 
-static int nblocks = 8;
+static unsigned nblocks = 8;
 
 #ifdef STARPU_QUICK_CHECK
 static int i_max = 5;
@@ -164,9 +164,9 @@ static void accumulate_vector_cuda(void *descr[], void *cl_arg)
 	(void)cl_arg;
 	TYPE *v_dst = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
 	TYPE *v_src = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
-	cublasStatus_t status = cublasaxpy(starpu_cublas_get_local_handle(), n, &gp1, v_src, 1, v_dst, 1);
+	cublasStatus_t status = cublasaxpy(starpu_cublas_get_local_handle(), nx, &gp1, v_src, 1, v_dst, 1);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
 }
@@ -177,9 +177,9 @@ void accumulate_vector_cpu(void *descr[], void *cl_arg)
 	(void)cl_arg;
 	TYPE *v_dst = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
 	TYPE *v_src = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
-	AXPY(n, (TYPE)1.0, v_src, 1, v_dst, 1);
+	AXPY(nx, (TYPE)1.0, v_src, 1, v_dst, 1);
 }
 
 static struct starpu_perfmodel accumulate_vector_model =
@@ -253,10 +253,10 @@ static void bzero_vector_cuda(void *descr[], void *cl_arg)
 {
 	(void)cl_arg;
 	TYPE *v = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 	size_t elemsize = STARPU_VECTOR_GET_ELEMSIZE(descr[0]);
 
-	cudaMemsetAsync(v, 0, n * elemsize, starpu_cuda_get_local_stream());
+	cudaMemsetAsync(v, 0, nx * elemsize, starpu_cuda_get_local_stream());
 }
 #endif
 
@@ -264,9 +264,9 @@ void bzero_vector_cpu(void *descr[], void *cl_arg)
 {
 	(void)cl_arg;
 	TYPE *v = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
-	memset(v, 0, n*sizeof(TYPE));
+	memset(v, 0, nx*sizeof(TYPE));
 }
 
 static struct starpu_perfmodel bzero_vector_model =
@@ -302,12 +302,12 @@ static void dot_kernel_cuda(void *descr[], void *cl_arg)
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
 	TYPE *v2 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[2]);
 
-	unsigned n = STARPU_VECTOR_GET_NX(descr[1]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[1]);
 
 	cublasHandle_t handle = starpu_cublas_get_local_handle();
 	cublasSetPointerMode(handle, CUBLAS_POINTER_MODE_DEVICE);
 	cublasStatus_t status = cublasdot(handle,
-		n, v1, 1, v2, 1, dot);
+		nx, v1, 1, v2, 1, dot);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
 	cublasSetPointerMode(handle, CUBLAS_POINTER_MODE_HOST);
@@ -321,12 +321,12 @@ void dot_kernel_cpu(void *descr[], void *cl_arg)
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
 	TYPE *v2 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[2]);
 
-	unsigned n = STARPU_VECTOR_GET_NX(descr[1]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[1]);
 
 	TYPE local_dot;
 	/* Note that we explicitely cast the result of the DOT kernel because
 	 * some BLAS library will return a double for sdot for instance. */
-	local_dot = (TYPE)DOT(n, v1, 1, v2, 1);
+	local_dot = (TYPE)DOT(nx, v1, 1, v2, 1);
 
 	*dot = *dot + local_dot;
 }
@@ -354,7 +354,7 @@ static struct starpu_codelet dot_kernel_cl =
 int dot_kernel(HANDLE_TYPE_VECTOR v1,
 	       HANDLE_TYPE_VECTOR v2,
 	       starpu_data_handle_t s,
-	       unsigned nblocks)
+	       unsigned nb)
 {
 	int ret;
 
@@ -368,14 +368,14 @@ int dot_kernel(HANDLE_TYPE_VECTOR v1,
 		STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");
 	}
 
-	unsigned b;
-	for (b = 0; b < nblocks; b++)
+	unsigned block;
+	for (block = 0; block < nb; block++)
 	{
 		ret = TASK_INSERT(&dot_kernel_cl,
 					 use_reduction?STARPU_REDUX:STARPU_RW, s,
-					 STARPU_R, GET_VECTOR_BLOCK(v1, b),
-					 STARPU_R, GET_VECTOR_BLOCK(v2, b),
-					 STARPU_TAG_ONLY, (starpu_tag_t) b,
+					 STARPU_R, GET_VECTOR_BLOCK(v1, block),
+					 STARPU_R, GET_VECTOR_BLOCK(v2, block),
+					 STARPU_TAG_ONLY, (starpu_tag_t) block,
 					 0);
 		STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");
 	}
@@ -393,11 +393,11 @@ static void scal_kernel_cuda(void *descr[], void *cl_arg)
 	starpu_codelet_unpack_args(cl_arg, &p1);
 
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
 	/* v1 = p1 v1 */
 	TYPE alpha = p1;
-	cublasStatus_t status = cublasscal(starpu_cublas_get_local_handle(), n, &alpha, v1, 1);
+	cublasStatus_t status = cublasscal(starpu_cublas_get_local_handle(), nx, &alpha, v1, 1);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
 }
@@ -409,10 +409,10 @@ void scal_kernel_cpu(void *descr[], void *cl_arg)
 	starpu_codelet_unpack_args(cl_arg, &alpha);
 
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
 	/* v1 = alpha v1 */
-	SCAL(n, alpha, v1, 1);
+	SCAL(nx, alpha, v1, 1);
 }
 
 static struct starpu_perfmodel scal_kernel_model =
@@ -479,14 +479,14 @@ void gemv_kernel_cpu(void *descr[], void *cl_arg)
 	if (worker_size > 1)
 	{
 		/* Parallel CPU task */
-		unsigned rank = starpu_combined_worker_get_rank();
+		unsigned i = starpu_combined_worker_get_rank();
 
-		unsigned block_size = (ny + worker_size - 1)/worker_size;
-		unsigned new_nx = STARPU_MIN(nx, block_size*(rank+1)) - block_size*rank;
+		unsigned bs = (ny + worker_size - 1)/worker_size;
+		unsigned new_nx = STARPU_MIN(nx, bs*(i+1)) - bs*i;
 
 		nx = new_nx;
-		v1 = &v1[block_size*rank];
-		M = &M[block_size*rank];
+		v1 = &v1[bs*i];
+		M = &M[bs*i];
 	}
 
 	/* Compute v1 = alpha M v2 + beta v1 */
@@ -519,12 +519,12 @@ int gemv_kernel(HANDLE_TYPE_VECTOR v1,
 		HANDLE_TYPE_MATRIX matrix,
 		HANDLE_TYPE_VECTOR v2,
 		TYPE p1, TYPE p2,
-		unsigned nblocks)
+		unsigned nb)
 {
 	unsigned b1, b2;
 	int ret;
 
-	for (b2 = 0; b2 < nblocks; b2++)
+	for (b2 = 0; b2 < nb; b2++)
 	{
 		ret = TASK_INSERT(&scal_kernel_cl,
 					 STARPU_RW, GET_VECTOR_BLOCK(v1, b2),
@@ -535,9 +535,9 @@ int gemv_kernel(HANDLE_TYPE_VECTOR v1,
 		STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");
 	}
 
-	for (b2 = 0; b2 < nblocks; b2++)
+	for (b2 = 0; b2 < nb; b2++)
 	{
-		for (b1 = 0; b1 < nblocks; b1++)
+		for (b1 = 0; b1 < nb; b1++)
 		{
 			TYPE one = 1.0;
 			ret = TASK_INSERT(&gemv_kernel_cl,
@@ -546,7 +546,7 @@ int gemv_kernel(HANDLE_TYPE_VECTOR v1,
 						 STARPU_R,	GET_VECTOR_BLOCK(v2, b1),
 						 STARPU_VALUE,	&one,	sizeof(one),
 						 STARPU_VALUE,	&p2,	sizeof(p2),
-						 STARPU_TAG_ONLY, ((starpu_tag_t)b2) * nblocks + b1,
+						 STARPU_TAG_ONLY, ((starpu_tag_t)b2) * nb + b1,
 						 0);
 			STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");
 		}
@@ -566,17 +566,17 @@ static void scal_axpy_kernel_cuda(void *descr[], void *cl_arg)
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
 	TYPE *v2 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
 
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
 	/* Compute v1 = p1 * v1 + p2 * v2.
 	 *	v1 = p1 v1
 	 *	v1 = v1 + p2 v2
 	 */
 	cublasStatus_t status;
-	status = cublasscal(starpu_cublas_get_local_handle(), n, &p1, v1, 1);
+	status = cublasscal(starpu_cublas_get_local_handle(), nx, &p1, v1, 1);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
-	status = cublasaxpy(starpu_cublas_get_local_handle(), n, &p2, v2, 1, v1, 1);
+	status = cublasaxpy(starpu_cublas_get_local_handle(), nx, &p2, v2, 1, v1, 1);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
 }
@@ -622,18 +622,18 @@ static struct starpu_codelet scal_axpy_kernel_cl =
 
 int scal_axpy_kernel(HANDLE_TYPE_VECTOR v1, TYPE p1,
 		     HANDLE_TYPE_VECTOR v2, TYPE p2,
-		     unsigned nblocks)
+		     unsigned nb)
 {
-	unsigned b;
-	for (b = 0; b < nblocks; b++)
+	unsigned block;
+	for (block = 0; block < nb; block++)
 	{
 		int ret;
 		ret = TASK_INSERT(&scal_axpy_kernel_cl,
-					 STARPU_RW, GET_VECTOR_BLOCK(v1, b),
-					 STARPU_R,  GET_VECTOR_BLOCK(v2, b),
+					 STARPU_RW, GET_VECTOR_BLOCK(v1, block),
+					 STARPU_R,  GET_VECTOR_BLOCK(v2, block),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 STARPU_VALUE, &p2, sizeof(p2),
-					 STARPU_TAG_ONLY, (starpu_tag_t) b,
+					 STARPU_TAG_ONLY, (starpu_tag_t) block,
 					 0);
 		if (ret == -ENODEV) return ret;
 		STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");
@@ -654,12 +654,12 @@ static void axpy_kernel_cuda(void *descr[], void *cl_arg)
 	TYPE *v1 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[0]);
 	TYPE *v2 = (TYPE *)STARPU_VECTOR_GET_PTR(descr[1]);
 
-	unsigned n = STARPU_VECTOR_GET_NX(descr[0]);
+	unsigned nx = STARPU_VECTOR_GET_NX(descr[0]);
 
 	/* Compute v1 = v1 + p1 * v2.
 	 */
 	cublasStatus_t status = cublasaxpy(starpu_cublas_get_local_handle(),
-			n, &p1, v2, 1, v1, 1);
+			nx, &p1, v2, 1, v1, 1);
 	if (status != CUBLAS_STATUS_SUCCESS)
 		STARPU_CUBLAS_REPORT_ERROR(status);
 }
@@ -702,17 +702,17 @@ static struct starpu_codelet axpy_kernel_cl =
 
 int axpy_kernel(HANDLE_TYPE_VECTOR v1,
 		HANDLE_TYPE_VECTOR v2, TYPE p1,
-		unsigned nblocks)
+		unsigned nb)
 {
-	unsigned b;
-	for (b = 0; b < nblocks; b++)
+	unsigned block;
+	for (block = 0; block < nb; block++)
 	{
 		int ret;
 		ret = TASK_INSERT(&axpy_kernel_cl,
-					 STARPU_RW, GET_VECTOR_BLOCK(v1, b),
-					 STARPU_R,  GET_VECTOR_BLOCK(v2, b),
+					 STARPU_RW, GET_VECTOR_BLOCK(v1, block),
+					 STARPU_R,  GET_VECTOR_BLOCK(v2, block),
 					 STARPU_VALUE, &p1, sizeof(p1),
-					 STARPU_TAG_ONLY, (starpu_tag_t) b,
+					 STARPU_TAG_ONLY, (starpu_tag_t) block,
 					 0);
 		if (ret == -ENODEV) return ret;
 		STARPU_CHECK_RETURN_VALUE(ret, "TASK_INSERT");

+ 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

+ 2 - 0
examples/cpp/add_vectors_interface.cpp

@@ -263,6 +263,7 @@ static starpu_ssize_t vector_cpp_describe(void *data_interface, char *buf, size_
 static struct starpu_data_interface_ops interface_vector_cpp_ops =
 {
 	.register_data_handle = register_vector_cpp_handle,
+	.unregister_data_handle = NULL,
 	.allocate_data_on_node = allocate_vector_cpp_buffer_on_node,
 	.free_data_on_node = free_vector_cpp_buffer_on_node,
 	.init = NULL,
@@ -293,6 +294,7 @@ static struct starpu_data_interface_ops interface_vector_cpp_ops =
 static struct starpu_data_interface_ops interface_vector_cpp_ops =
 {
 	register_vector_cpp_handle,
+	NULL,
 	allocate_vector_cpp_buffer_on_node,
 	free_vector_cpp_buffer_on_node,
 	NULL,

+ 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;
 

+ 1 - 1
examples/filters/fplan_notautomatic.c

@@ -58,7 +58,7 @@ void split_callback(void *arg)
 
 void supertask_callback(void *arg)
 {
-	(arg);
+	(void)arg;
 	starpu_data_handle_t sub_handles[PARTS];
 	int add;
 	struct starpu_task *task = starpu_task_get_current();

+ 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);
 

+ 3 - 3
examples/interface/complex.c

@@ -150,7 +150,7 @@ int main(void)
 	starpu_task_wait_for_all();
 	if (compare != 0)
 	{
-	     FPRINTF(stderr, "Complex numbers should NOT be similar\n");
+	     _FPRINTF(stderr, "Complex numbers should NOT be similar\n");
 	     goto end;
 	}
 
@@ -183,7 +183,7 @@ int main(void)
 
 	if (compare != 1)
 	{
-	     FPRINTF(stderr, "Complex numbers should be similar\n");
+	     _FPRINTF(stderr, "Complex numbers should be similar\n");
 	}
 
 	/* Put another value again */
@@ -267,7 +267,7 @@ int main(void)
 	starpu_task_wait_for_all();
 	if (compare != 1)
 	{
-	     FPRINTF(stderr, "Complex numbers should be similar\n");
+	     _FPRINTF(stderr, "Complex numbers should be similar\n");
 	     goto end;
 	}
 

+ 3 - 3
examples/interface/complex_codelet.h

@@ -20,7 +20,7 @@
 #ifndef __COMPLEX_CODELET_H
 #define __COMPLEX_CODELET_H
 
-#define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
+#define _FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
 
 /* Dumb performance model for simgrid */
 static double complex_cost_function(struct starpu_task *task, unsigned nimpl)
@@ -87,10 +87,10 @@ void display_complex_codelet(void *descr[], void *_args)
 	if (_args)
 		starpu_codelet_unpack_args(_args, &msg);
 
-	FPRINTF(stderr, "[%s]\n", _args?msg:NULL);
+	_FPRINTF(stderr, "[%s]\n", _args?msg:NULL);
 	for(i=0 ; i<nx ; i++)
 	{
-		FPRINTF(stderr, "\tComplex[%d] = %3.2f + %3.2f i\n", i, real[i], imaginary[i]);
+		_FPRINTF(stderr, "\tComplex[%d] = %3.2f + %3.2f i\n", i, real[i], imaginary[i]);
 	}
 	fflush(stderr);
 }

+ 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

+ 77 - 3
examples/mult/xgemm.c

@@ -33,7 +33,9 @@
 #include <starpu.h>
 #include <starpu_fxt.h>
 
+#ifdef STARPU_HAVE_BLAS
 #include <common/blas.h>
+#endif
 
 #ifdef STARPU_USE_CUDA
 #include <cuda.h>
@@ -68,6 +70,7 @@ static starpu_data_handle_t A_handle, B_handle, C_handle;
 #define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
 #define PRINTF(fmt, ...) do { if (!getenv("STARPU_SSILENT")) {printf(fmt, ## __VA_ARGS__); fflush(stdout); }} while(0)
 
+#ifdef STARPU_HAVE_BLAS
 static int check_output(void)
 {
 	/* compute C = C - AB */
@@ -92,6 +95,7 @@ static int check_output(void)
 		return 1;
 	}
 }
+#endif
 
 static void init_problem_data(void)
 {
@@ -182,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++)
@@ -225,6 +235,7 @@ static void cublas_gemm(void *descr[], void *arg)
 }
 #endif
 
+#ifdef STARPU_HAVE_BLAS
 void cpu_mult(void *descr[], void *arg, TYPE beta)
 {
 	(void)arg;
@@ -273,6 +284,7 @@ void cpu_gemm(void *descr[], void *arg)
 {
 	cpu_mult(descr, arg, 1.);
 }
+#endif
 
 static struct starpu_perfmodel starpu_gemm_model =
 {
@@ -282,10 +294,12 @@ static struct starpu_perfmodel starpu_gemm_model =
 
 static struct starpu_codelet cl_gemm0 =
 {
+#ifdef STARPU_HAVE_BLAS
 	.type = STARPU_SEQ, /* changed to STARPU_SPMD if -spmd is passed */
 	.max_parallelism = INT_MAX,
 	.cpu_funcs = {cpu_gemm0},
 	.cpu_funcs_name = {"cpu_gemm0"},
+#endif
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = {cublas_gemm0},
 #elif defined(STARPU_SIMGRID)
@@ -299,10 +313,12 @@ static struct starpu_codelet cl_gemm0 =
 
 static struct starpu_codelet cl_gemm =
 {
+#ifdef STARPU_HAVE_BLAS
 	.type = STARPU_SEQ, /* changed to STARPU_SPMD if -spmd is passed */
 	.max_parallelism = INT_MAX,
 	.cpu_funcs = {cpu_gemm},
 	.cpu_funcs_name = {"cpu_gemm"},
+#endif
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = {cublas_gemm},
 #elif defined(STARPU_SIMGRID)
@@ -330,60 +346,116 @@ static void parse_args(int argc, char **argv)
 			nslicesx = strtol(argv[++i], &argptr, 10);
 			nslicesy = nslicesx;
 			nslicesz = nslicesx;
+			if (nslicesx == 0)
+			{
+				fprintf(stderr, "the number of blocks in X cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-nblocksx") == 0)
 		{
 			char *argptr;
 			nslicesx = strtol(argv[++i], &argptr, 10);
+			if (nslicesx == 0)
+			{
+				fprintf(stderr, "the number of blocks in X cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-nblocksy") == 0)
 		{
 			char *argptr;
 			nslicesy = strtol(argv[++i], &argptr, 10);
+			if (nslicesy == 0)
+			{
+				fprintf(stderr, "the number of blocks in Y cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-nblocksz") == 0)
 		{
 			char *argptr;
 			nslicesz = strtol(argv[++i], &argptr, 10);
+			if (nslicesz == 0)
+			{
+				fprintf(stderr, "the number of blocks in Z cannot be 0!\n");
+				exit(EXIT_FAILURE);
+			}
 		}
 
 		else if (strcmp(argv[i], "-x") == 0)
 		{
 			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)
@@ -414,11 +486,11 @@ 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, %u iterations, %u sleeps\n", zdim, ydim, xdim, zdim, nslicesx, nslicesy, nslicesz, niter, nsleeps);
+				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
-				fprintf(stderr,"Currently selected: %ux%u * %ux%u and %ux%u blocks, %u iterations, %u sleeps\n", zdim, ydim, xdim, zdim, nslicesx, nslicesy, niter, nsleeps);
+				fprintf(stderr,"Currently selected: %ux%u * %ux%u and %ux%u blocks (size %ux%u length %u), %u iterations, %u sleeps\n", zdim, ydim, xdim, zdim, nslicesx, nslicesy, xdim / nslicesx, ydim / nslicesy, zdim, niter, nsleeps);
 			exit(EXIT_SUCCESS);
 		}
 		else
@@ -574,10 +646,12 @@ enodev:
 	starpu_data_unregister(B_handle);
 	starpu_data_unregister(C_handle);
 
+#ifdef STARPU_HAVE_BLAS
 #ifndef STARPU_SIMGRID
 	if (check)
 		ret = check_output();
 #endif
+#endif
 
 	starpu_free_flags(A, zdim*ydim*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);
 	starpu_free_flags(B, xdim*zdim*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);

+ 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

+ 1 - 1
examples/tag_example/tag_example4.c

@@ -36,7 +36,7 @@ void cpu_codelet_A(void *descr[], void *_args)
 {
 	(void)descr;
 	int *arg = _args;
-	*arg = 1;
+	STARPU_ATOMIC_OR(arg, 1);
 	fprintf(stderr,"A");
 }
 

+ 1 - 0
include/starpu_config.h.in

@@ -134,6 +134,7 @@
 #undef STARPU_ARMPL
 #undef STARPU_SYSTEM_BLAS
 #undef STARPU_HAVE_CBLAS_H
+#undef STARPU_HAVE_BLAS
 
 /**
    Define the directory in which the OpenCL codelets of the

+ 35 - 0
include/starpu_data_interfaces.h

@@ -365,6 +365,17 @@ struct starpu_data_interface_ops
 	void		 (*register_data_handle)	(starpu_data_handle_t handle, unsigned home_node, void *data_interface);
 
 	/**
+	   Unregister a data handle.
+
+	   This iterates over all memory nodes to free any pointer in the data
+	   interface on each of them.
+
+	   At this point, free_data_on_node has been already called on each of them.
+	   This just clears anything that would still be left.
+	*/
+	void		 (*unregister_data_handle)	(starpu_data_handle_t handle);
+
+	/**
 	   Allocate data for the interface on a given node. This should use
 	   starpu_malloc_on_node() to perform the allocation(s), and fill the pointers
 	   in the data interface. It should return the size of the allocated memory, or
@@ -1986,6 +1997,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.
  */
@@ -2019,6 +2035,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.
  */

+ 10 - 0
include/starpu_sched_component.h

@@ -138,6 +138,11 @@ struct starpu_sched_component
 	*/
 	int (*can_pull)(struct starpu_sched_component *component);
 
+	/**
+	   This function is called when starpu_do_schedule() is called by the application.
+	*/
+	void (*do_schedule)(struct starpu_sched_component *component);
+
 	int (*notify)(struct starpu_sched_component* component, int message_ID, void* arg);
 
 	/**
@@ -260,6 +265,11 @@ void starpu_sched_tree_add_workers(unsigned sched_ctx_id, int *workerids, unsign
 void starpu_sched_tree_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned nworkers);
 
 /**
+   Run the do_schedule method of the components. This is a helper for starpu_sched_policy::do_schedule.
+*/
+void starpu_sched_tree_do_schedule(unsigned sched_ctx_id);
+
+/**
    Attach component \p child to parent \p parent. Some component may accept only one child, others accept several (e.g. MCT)
 */
 void starpu_sched_component_connect(struct starpu_sched_component *parent, struct starpu_sched_component *child);

+ 11 - 3
include/starpu_stdlib.h

@@ -117,15 +117,17 @@ void starpu_malloc_set_align(size_t align);
    pin it in CUDA or OpenCL, so that data transfers from this buffer
    can be asynchronous, and thus permit data transfer and computation
    overlapping. The allocated buffer must be freed thanks to the
-   starpu_free() function.
+   starpu_free_noflag() function.
 */
 int starpu_malloc(void **A, size_t dim);
 
 /**
+   @deprecated
    Free memory which has previously been allocated with
-   starpu_malloc().
+   starpu_malloc(). This function is deprecated, one should use
+   starpu_free_noflag().
 */
-int starpu_free(void *A);
+int starpu_free(void *A) STARPU_DEPRECATED;
 
 /**
    Perform a memory allocation based on the constraints defined by the
@@ -140,6 +142,12 @@ int starpu_malloc_flags(void **A, size_t dim, int flags);
 */
 int starpu_free_flags(void *A, size_t dim, int flags);
 
+/**
+   Free memory by specifying its size. Should be used for memory
+   allocated with starpu_malloc().
+*/
+int starpu_free_noflag(void *A, size_t dim);
+
 typedef int (*starpu_malloc_hook)(unsigned dst_node, void **A, size_t dim, int flags);
 typedef int (*starpu_free_hook)(unsigned dst_node, void *A, size_t dim, int flags);
 

+ 16 - 10
include/starpu_task.h

@@ -1075,13 +1075,6 @@ struct starpu_task
 	unsigned regenerate:1;
 
 	/**
-	   @private
-	   This is only used for tasks that use multiformat handle.
-	   This should only be used by StarPU.
-	*/
-	unsigned mf_skip:1;
-
-	/**
 	   do not allocate a submitorder id for this task
 
 	   With starpu_task_insert() and alike this can be specified
@@ -1091,19 +1084,32 @@ struct starpu_task
 	unsigned no_submitorder:1;
 
 	/**
+	   @private
+	   This is only used for tasks that use multiformat handle.
+	   This should only be used by StarPU.
+	*/
+	unsigned char mf_skip;
+
+	/**
 	   Whether this task has failed and will thus have to be retried
 
 	   Set by StarPU.
 	*/
-	unsigned failed:1;
+	unsigned char failed;
 
 	/**
 	   Whether the scheduler has pushed the task on some queue
 
 	   Set by StarPU.
 	*/
-	unsigned scheduled:1;
-	unsigned prefetched:1;
+	unsigned char scheduled;
+
+	/**
+	   Whether the scheduler has prefetched the task's data
+
+	   Set by StarPU.
+	*/
+	unsigned char prefetched;
 
 	/**
 	   Optional field. If the field

+ 20 - 14
include/starpu_util.h

@@ -517,6 +517,7 @@ STARPU_ATOMIC_SOMETHING64(or, old | value)
 #endif
 #endif
 
+/* Try to replace `old' with `value' at `ptr'. Returns true iff the swap was successful. */
 #ifdef STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP
 #define STARPU_BOOL_COMPARE_AND_SWAP(ptr, old, value)  (__sync_bool_compare_and_swap ((ptr), (old), (value)))
 #define STARPU_BOOL_COMPARE_AND_SWAP32(ptr, old, value) STARPU_BOOL_COMPARE_AND_SWAP(ptr, old, value)
@@ -533,6 +534,13 @@ STARPU_ATOMIC_SOMETHING64(or, old | value)
 #endif
 #endif
 
+#if UINTPTR_MAX == UINT64_MAX
+#define STARPU_BOOL_COMPARE_AND_SWAP_PTR(ptr, old, value) STARPU_BOOL_COMPARE_AND_SWAP64(ptr, old, value)
+#else
+#define STARPU_BOOL_COMPARE_AND_SWAP_PTR(ptr, old, value) STARPU_BOOL_COMPARE_AND_SWAP32(ptr, old, value)
+#endif
+
+/* Try to replace `old' with `value' at `ptr'. Returns the value actually seen at `ptr'. */
 #ifdef STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP
 #define STARPU_VAL_COMPARE_AND_SWAP(ptr, old, value)  (__sync_val_compare_and_swap ((ptr), (old), (value)))
 #define STARPU_VAL_COMPARE_AND_SWAP32(ptr, old, value) STARPU_VAL_COMPARE_AND_SWAP(ptr, old, value)
@@ -549,6 +557,12 @@ STARPU_ATOMIC_SOMETHING64(or, old | value)
 #endif
 #endif
 
+#if UINTPTR_MAX == UINT64_MAX
+#define STARPU_VAL_COMPARE_AND_SWAP_PTR(ptr, old, value) STARPU_VAL_COMPARE_AND_SWAP64(ptr, old, value)
+#else
+#define STARPU_VAL_COMPARE_AND_SWAP_PTR(ptr, old, value) STARPU_VAL_COMPARE_AND_SWAP32(ptr, old, value)
+#endif
+
 #ifdef STARPU_HAVE_ATOMIC_EXCHANGE_N
 #define STARPU_VAL_EXCHANGE(ptr, value) (__atomic_exchange_n((ptr), (value), __ATOMIC_SEQ_CST))
 #define STARPU_VAL_EXCHANGEL(ptr, value) STARPU_VAL_EXCHANGE((ptr) (value))
@@ -593,14 +607,10 @@ STARPU_ATOMIC_SOMETHING64(or, old | value)
 /**
    This macro can be used to do a synchronization.
 */
-#if defined(__i386__)
-#define STARPU_RMB() __asm__ __volatile__("lock; addl $0,0(%%esp)" ::: "memory")
-#elif defined(__KNC__) || defined(__KNF__)
-#define STARPU_RMB() __asm__ __volatile__("lock; addl $0,0(%%rsp)" ::: "memory")
-#elif defined(__x86_64__)
+#if defined(__x86_64__)
 #define STARPU_RMB() __asm__ __volatile__("lfence" ::: "memory")
-#elif defined(__ppc__) || defined(__ppc64__)
-#define STARPU_RMB() __asm__ __volatile__("sync" ::: "memory")
+#elif defined(__aarch64__)
+#define STARPU_RMB() __asm__ __volatile__("dsb ld" ::: "memory")
 #else
 #define STARPU_RMB() STARPU_SYNCHRONIZE()
 #endif
@@ -608,14 +618,10 @@ STARPU_ATOMIC_SOMETHING64(or, old | value)
 /**
    This macro can be used to do a synchronization.
 */
-#if defined(__i386__)
-#define STARPU_WMB() __asm__ __volatile__("lock; addl $0,0(%%esp)" ::: "memory")
-#elif defined(__KNC__) || defined(__KNF__)
-#define STARPU_WMB() __asm__ __volatile__("lock; addl $0,0(%%rsp)" ::: "memory")
-#elif defined(__x86_64__)
+#if defined(__x86_64__)
 #define STARPU_WMB() __asm__ __volatile__("sfence" ::: "memory")
-#elif defined(__ppc__) || defined(__ppc64__)
-#define STARPU_WMB() __asm__ __volatile__("sync" ::: "memory")
+#elif defined(__aarch64__)
+#define STARPU_WMB() __asm__ __volatile__("dsb st" ::: "memory")
 #else
 #define STARPU_WMB() STARPU_SYNCHRONIZE()
 #endif

+ 2 - 2
julia/examples/execute.sh.in

@@ -48,6 +48,6 @@ then
 fi
 shift
 #cd $srcdir/$(dirname $srcfile)
-#@JULIA@ $(basename $srcfile) $*
-@JULIA@ $srcdir/$srcfile $*
+#exec @JULIA@ $(basename $srcfile) $*
+exec @JULIA@ $srcdir/$srcfile $*
 

+ 0 - 1
julia/examples/task_insert_color/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;

+ 3 - 4
mpi/examples/benchs/abstract_sendrecv_bench.c

@@ -20,9 +20,9 @@
 void sendrecv_bench(int mpi_rank, starpu_pthread_barrier_t* thread_barrier, int bidir)
 {
 	uint64_t iterations = LOOPS_DEFAULT;
-	uint64_t s = 0;
-	uint64_t j = 0;
-	uint64_t k = 0;
+	uint64_t s;
+	uint64_t j;
+	uint64_t k;
 
 	if (mpi_rank >= 2)
 	{
@@ -54,7 +54,6 @@ void sendrecv_bench(int mpi_rank, starpu_pthread_barrier_t* thread_barrier, int
 		printf("# size  (Bytes)\t|  latency \t| 10^6 B/s \t| MB/s   \t| d1    \t|median  \t| avg    \t| d9    \t| max\n");
 	}
 
-	int array_size = 0;
 	starpu_data_handle_t handle_send, handle_recv;
 	float* vector_send = NULL;
 	float* vector_recv = NULL;

+ 4 - 7
mpi/examples/benchs/sendrecv_parallel_tasks_bench.c

@@ -60,8 +60,8 @@ void cpu_task(void* descr[], void* args)
 	double t1, t2;
 	int asked_worker;
 	int current_worker = starpu_worker_get_id();
-	uint64_t j = 0;
-	uint64_t k = 0;
+	uint64_t j;
+	uint64_t k;
 
 	starpu_codelet_unpack_args(args, &mpi_rank, &asked_worker, &s, &handle_send, &handle_recv);
 
@@ -171,10 +171,8 @@ int main(int argc, char **argv)
 
 
 	unsigned cpu_count = starpu_cpu_worker_get_count();
-	unsigned* mpi_tags = malloc(cpu_count * sizeof(unsigned));
-	unsigned tag = 0;
-	uint64_t s = 0;
-	unsigned i = 0;
+	uint64_t s;
+	unsigned i;
 
 	int* workers = malloc(cpu_count * sizeof(int));
 	float** vectors_send = malloc(cpu_count * sizeof(float*));
@@ -223,7 +221,6 @@ int main(int argc, char **argv)
 	free(vectors_recv);
 	free(handles_send);
 	free(handles_recv);
-	free(mpi_tags);
 
 	starpu_mpi_shutdown();
 

+ 88 - 86
mpi/examples/cg/cg.c

@@ -39,7 +39,7 @@ static int copy_handle(starpu_data_handle_t* dst, starpu_data_handle_t* src, uns
 #define BARRIER() starpu_mpi_barrier(MPI_COMM_WORLD);
 #define GET_DATA_HANDLE(handle) starpu_mpi_get_data_on_all_nodes_detached(MPI_COMM_WORLD, handle)
 
-static int block_size;
+static unsigned block_size;
 
 static int rank;
 static int nodes_p = 2;
@@ -57,20 +57,20 @@ static TYPE **q;
 
 #include "../../../examples/cg/cg_kernels.c"
 
-static int my_distrib(const int y, const int x)
+static int my_distrib(const int yy, const int xx)
 {
-	return (y%nodes_q)*nodes_p + (x%nodes_p);
+	return (yy%nodes_q)*nodes_p + (xx%nodes_p);
 }
 
-static int copy_handle(starpu_data_handle_t* dst, starpu_data_handle_t* src, unsigned nblocks)
+static int copy_handle(starpu_data_handle_t* dst, starpu_data_handle_t* src, unsigned nb)
 {
-	unsigned b;
+	unsigned block;
 
-	for (b = 0; b < nblocks; b++)
+	for (block = 0; block < nb; block++)
 	{
-		if (rank == my_distrib(b, 0))
+		if (rank == my_distrib(block, 0))
 		{
-			starpu_data_cpy(dst[b], src[b], /* asynchronous */ 1, /* without callback */ NULL, NULL);
+			starpu_data_cpy(dst[block], src[block], /* asynchronous */ 1, /* without callback */ NULL, NULL);
 		}
 	}
 
@@ -82,7 +82,8 @@ static int copy_handle(starpu_data_handle_t* dst, starpu_data_handle_t* src, uns
  */
 static void generate_random_problem(void)
 {
-	unsigned nn, mm, m, n, mpi_rank;
+	unsigned ii, jj, j, i;
+	int mpi_rank;
 
 	A = malloc(nblocks * sizeof(TYPE **));
 	x = malloc(nblocks * sizeof(TYPE *));
@@ -92,47 +93,47 @@ static void generate_random_problem(void)
 	d = malloc(nblocks * sizeof(TYPE *));
 	q = malloc(nblocks * sizeof(TYPE *));
 
-	for (m = 0; m < nblocks; m++)
+	for (j = 0; j < nblocks; j++)
 	{
-		A[m] = malloc(nblocks * sizeof(TYPE*));
+		A[j] = malloc(nblocks * sizeof(TYPE*));
 
-		mpi_rank = my_distrib(m, 0);
+		mpi_rank = my_distrib(j, 0);
 
 		if (mpi_rank == rank || display_result)
 		{
-			starpu_malloc((void**) &x[m], block_size*sizeof(TYPE));
+			starpu_malloc((void**) &x[j], block_size*sizeof(TYPE));
 		}
 
 		if (mpi_rank == rank)
 		{
-			starpu_malloc((void**) &b[m], block_size*sizeof(TYPE));
-			starpu_malloc((void**) &r[m], block_size*sizeof(TYPE));
-			starpu_malloc((void**) &d[m], block_size*sizeof(TYPE));
-			starpu_malloc((void**) &q[m], block_size*sizeof(TYPE));
+			starpu_malloc((void**) &b[j], block_size*sizeof(TYPE));
+			starpu_malloc((void**) &r[j], block_size*sizeof(TYPE));
+			starpu_malloc((void**) &d[j], block_size*sizeof(TYPE));
+			starpu_malloc((void**) &q[j], block_size*sizeof(TYPE));
 
-			for (mm = 0; mm < block_size; mm++)
+			for (jj = 0; jj < block_size; jj++)
 			{
-				x[m][mm] = (TYPE) 0.0;
-				b[m][mm] = (TYPE) 1.0;
-				r[m][mm] = (TYPE) 0.0;
-				d[m][mm] = (TYPE) 0.0;
-				q[m][mm] = (TYPE) 0.0;
+				x[j][jj] = (TYPE) 0.0;
+				b[j][jj] = (TYPE) 1.0;
+				r[j][jj] = (TYPE) 0.0;
+				d[j][jj] = (TYPE) 0.0;
+				q[j][jj] = (TYPE) 0.0;
 			}
 		}
 
-		for (n = 0; n < nblocks; n++)
+		for (i = 0; i < nblocks; i++)
 		{
-			mpi_rank = my_distrib(m, n);
+			mpi_rank = my_distrib(j, i);
 			if (mpi_rank == rank)
 			{
-				starpu_malloc((void**) &A[m][n], block_size*block_size*sizeof(TYPE));
+				starpu_malloc((void**) &A[j][i], block_size*block_size*sizeof(TYPE));
 
-				for (nn = 0; nn < block_size; nn++)
+				for (ii = 0; ii < block_size; ii++)
 				{
-					for (mm = 0; mm < block_size; mm++)
+					for (jj = 0; jj < block_size; jj++)
 					{
 						/* We take Hilbert matrix that is not well conditionned but definite positive: H(i,j) = 1/(1+i+j) */
-						A[m][n][mm + nn*block_size] = (TYPE) (1.0/(1.0+(nn+(m*block_size)+mm+(n*block_size))));
+						A[j][i][jj + ii*block_size] = (TYPE) (1.0/(1.0+(ii+(j*block_size)+jj+(i*block_size))));
 					}
 				}
 			}
@@ -142,35 +143,36 @@ static void generate_random_problem(void)
 
 static void free_data(void)
 {
-	unsigned nn, mm, m, n, mpi_rank;
+	unsigned j, i;
+	int mpi_rank;
 
-	for (m = 0; m < nblocks; m++)
+	for (j = 0; j < nblocks; j++)
 	{
-		mpi_rank = my_distrib(m, 0);
+		mpi_rank = my_distrib(j, 0);
 
 		if (mpi_rank == rank || display_result)
 		{
-			starpu_free((void*) x[m]);
+			starpu_free_noflag((void*) x[j], block_size*sizeof(TYPE));
 		}
 
 		if (mpi_rank == rank)
 		{
-			starpu_free((void*) b[m]);
-			starpu_free((void*) r[m]);
-			starpu_free((void*) d[m]);
-			starpu_free((void*) q[m]);
+			starpu_free_noflag((void*) b[j], block_size*sizeof(TYPE));
+			starpu_free_noflag((void*) r[j], block_size*sizeof(TYPE));
+			starpu_free_noflag((void*) d[j], block_size*sizeof(TYPE));
+			starpu_free_noflag((void*) q[j], block_size*sizeof(TYPE));
 		}
 
-		for (n = 0; n < nblocks; n++)
+		for (i = 0; i < nblocks; i++)
 		{
-			mpi_rank = my_distrib(m, n);
+			mpi_rank = my_distrib(j, i);
 			if (mpi_rank == rank)
 			{
-				starpu_free((void*) A[m][n]);
+				starpu_free_noflag((void*) A[j][i], block_size*block_size*sizeof(TYPE));
 			}
 		}
 
-		free(A[m]);
+		free(A[j]);
 	}
 
 	free(A);
@@ -183,7 +185,7 @@ static void free_data(void)
 
 static void register_data(void)
 {
-	unsigned m, n;
+	unsigned j, i;
 	int mpi_rank;
 	starpu_mpi_tag_t mpi_tag = 0;
 
@@ -194,68 +196,68 @@ static void register_data(void)
 	d_handle = malloc(nblocks*sizeof(starpu_data_handle_t));
 	q_handle = malloc(nblocks*sizeof(starpu_data_handle_t));
 
-	for (m = 0; m < nblocks; m++)
+	for (j = 0; j < nblocks; j++)
 	{
-		mpi_rank = my_distrib(m, 0);
-		A_handle[m] = malloc(nblocks*sizeof(starpu_data_handle_t));
+		mpi_rank = my_distrib(j, 0);
+		A_handle[j] = malloc(nblocks*sizeof(starpu_data_handle_t));
 
 		if (mpi_rank == rank || display_result)
 		{
-			starpu_vector_data_register(&x_handle[m], STARPU_MAIN_RAM, (uintptr_t) x[m], block_size, sizeof(TYPE));
+			starpu_vector_data_register(&x_handle[j], STARPU_MAIN_RAM, (uintptr_t) x[j], block_size, sizeof(TYPE));
 		}
 		else if (!display_result)
 		{
 			assert(mpi_rank != rank);
-			starpu_vector_data_register(&x_handle[m], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
+			starpu_vector_data_register(&x_handle[j], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
 		}
 
 		if (mpi_rank == rank)
 		{
-			starpu_vector_data_register(&b_handle[m], STARPU_MAIN_RAM, (uintptr_t) b[m], block_size, sizeof(TYPE));
-			starpu_vector_data_register(&r_handle[m], STARPU_MAIN_RAM, (uintptr_t) r[m], block_size, sizeof(TYPE));
-			starpu_vector_data_register(&d_handle[m], STARPU_MAIN_RAM, (uintptr_t) d[m], block_size, sizeof(TYPE));
-			starpu_vector_data_register(&q_handle[m], STARPU_MAIN_RAM, (uintptr_t) q[m], block_size, sizeof(TYPE));
+			starpu_vector_data_register(&b_handle[j], STARPU_MAIN_RAM, (uintptr_t) b[j], block_size, sizeof(TYPE));
+			starpu_vector_data_register(&r_handle[j], STARPU_MAIN_RAM, (uintptr_t) r[j], block_size, sizeof(TYPE));
+			starpu_vector_data_register(&d_handle[j], STARPU_MAIN_RAM, (uintptr_t) d[j], block_size, sizeof(TYPE));
+			starpu_vector_data_register(&q_handle[j], STARPU_MAIN_RAM, (uintptr_t) q[j], block_size, sizeof(TYPE));
 		}
 		else
 		{
-			starpu_vector_data_register(&b_handle[m], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
-			starpu_vector_data_register(&r_handle[m], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
-			starpu_vector_data_register(&d_handle[m], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
-			starpu_vector_data_register(&q_handle[m], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
+			starpu_vector_data_register(&b_handle[j], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
+			starpu_vector_data_register(&r_handle[j], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
+			starpu_vector_data_register(&d_handle[j], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
+			starpu_vector_data_register(&q_handle[j], -1, (uintptr_t) NULL, block_size, sizeof(TYPE));
 		}
 
-		starpu_data_set_coordinates(x_handle[m], 1, m);
-		starpu_mpi_data_register(x_handle[m], ++mpi_tag, mpi_rank);
-		starpu_data_set_coordinates(b_handle[m], 1, m);
-		starpu_mpi_data_register(b_handle[m], ++mpi_tag, mpi_rank);
-		starpu_data_set_coordinates(r_handle[m], 1, m);
-		starpu_mpi_data_register(r_handle[m], ++mpi_tag, mpi_rank);
-		starpu_data_set_coordinates(d_handle[m], 1, m);
-		starpu_mpi_data_register(d_handle[m], ++mpi_tag, mpi_rank);
-		starpu_data_set_coordinates(q_handle[m], 1, m);
-		starpu_mpi_data_register(q_handle[m], ++mpi_tag, mpi_rank);
+		starpu_data_set_coordinates(x_handle[j], 1, j);
+		starpu_mpi_data_register(x_handle[j], ++mpi_tag, mpi_rank);
+		starpu_data_set_coordinates(b_handle[j], 1, j);
+		starpu_mpi_data_register(b_handle[j], ++mpi_tag, mpi_rank);
+		starpu_data_set_coordinates(r_handle[j], 1, j);
+		starpu_mpi_data_register(r_handle[j], ++mpi_tag, mpi_rank);
+		starpu_data_set_coordinates(d_handle[j], 1, j);
+		starpu_mpi_data_register(d_handle[j], ++mpi_tag, mpi_rank);
+		starpu_data_set_coordinates(q_handle[j], 1, j);
+		starpu_mpi_data_register(q_handle[j], ++mpi_tag, mpi_rank);
 
 		if (use_reduction)
 		{
-			starpu_data_set_reduction_methods(q_handle[m], &accumulate_vector_cl, &bzero_vector_cl);
-			starpu_data_set_reduction_methods(r_handle[m], &accumulate_vector_cl, &bzero_vector_cl);
+			starpu_data_set_reduction_methods(q_handle[j], &accumulate_vector_cl, &bzero_vector_cl);
+			starpu_data_set_reduction_methods(r_handle[j], &accumulate_vector_cl, &bzero_vector_cl);
 		}
 
-		for (n = 0; n < nblocks; n++)
+		for (i = 0; i < nblocks; i++)
 		{
-			mpi_rank = my_distrib(m, n);
+			mpi_rank = my_distrib(j, i);
 
 			if (mpi_rank == rank)
 			{
-				starpu_matrix_data_register(&A_handle[m][n], STARPU_MAIN_RAM, (uintptr_t) A[m][n], block_size, block_size, block_size, sizeof(TYPE));
+				starpu_matrix_data_register(&A_handle[j][i], STARPU_MAIN_RAM, (uintptr_t) A[j][i], block_size, block_size, block_size, sizeof(TYPE));
 			}
 			else
 			{
-				starpu_matrix_data_register(&A_handle[m][n], -1, (uintptr_t) NULL, block_size, block_size, block_size, sizeof(TYPE));
+				starpu_matrix_data_register(&A_handle[j][i], -1, (uintptr_t) NULL, block_size, block_size, block_size, sizeof(TYPE));
 			}
 
-			starpu_data_set_coordinates(A_handle[m][n], 2, n, m);
-			starpu_mpi_data_register(A_handle[m][n], ++mpi_tag, mpi_rank);
+			starpu_data_set_coordinates(A_handle[j][i], 2, i, j);
+			starpu_mpi_data_register(A_handle[j][i], ++mpi_tag, mpi_rank);
 		}
 	}
 
@@ -273,22 +275,22 @@ static void register_data(void)
 
 static void unregister_data(void)
 {
-	unsigned m, n;
+	unsigned j, i;
 
-	for (m = 0; m < nblocks; m++)
+	for (j = 0; j < nblocks; j++)
 	{
-		starpu_data_unregister(x_handle[m]);
-		starpu_data_unregister(b_handle[m]);
-		starpu_data_unregister(r_handle[m]);
-		starpu_data_unregister(d_handle[m]);
-		starpu_data_unregister(q_handle[m]);
+		starpu_data_unregister(x_handle[j]);
+		starpu_data_unregister(b_handle[j]);
+		starpu_data_unregister(r_handle[j]);
+		starpu_data_unregister(d_handle[j]);
+		starpu_data_unregister(q_handle[j]);
 
-		for (n = 0; n < nblocks; n++)
+		for (i = 0; i < nblocks; i++)
 		{
-			starpu_data_unregister(A_handle[m][n]);
+			starpu_data_unregister(A_handle[j][i]);
 		}
 
-		free(A_handle[m]);
+		free(A_handle[j]);
 	}
 
 	starpu_data_unregister(dtq_handle);
@@ -304,7 +306,7 @@ static void unregister_data(void)
 
 static void display_x_result(void)
 {
-	int j, i;
+	unsigned j, i;
 
 	for (j = 0; j < nblocks; j++)
 	{
@@ -375,7 +377,7 @@ int main(int argc, char **argv)
 
 	if (n % nblocks != 0)
 	{
-		FPRINTF_SERVER(stderr, "The number of blocks (%d) must divide the matrix size (%lld).\n", nblocks, n);
+		FPRINTF_SERVER(stderr, "The number of blocks (%u) must divide the matrix size (%lld).\n", nblocks, n);
 		starpu_mpi_shutdown();
 		return 1;
 	}
@@ -387,7 +389,7 @@ int main(int argc, char **argv)
 	FPRINTF_SERVER(stderr, "%d nodes (%dx%d)\n", worldsize, nodes_p, nodes_q);
 	FPRINTF_SERVER(stderr, "Problem size (-n): %lld\n", n);
 	FPRINTF_SERVER(stderr, "Maximum number of iterations (-maxiter): %d\n", i_max);
-	FPRINTF_SERVER(stderr, "Number of blocks (-nblocks): %d\n", nblocks);
+	FPRINTF_SERVER(stderr, "Number of blocks (-nblocks): %u\n", nblocks);
 	FPRINTF_SERVER(stderr, "Reduction (-no-reduction): %s\n", use_reduction ? "enabled" : "disabled");
 
 	starpu_mpi_barrier(MPI_COMM_WORLD);

+ 1 - 1
mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c

@@ -469,7 +469,7 @@ void dw_cholesky(float ***matA, unsigned ld, int rank, int nodes, double *timing
 	double start;
 	double end;
 	starpu_data_handle_t **data_handles;
-	unsigned k, m, n;
+	unsigned m, n;
 
 	/* create all the DAG nodes */
 

+ 0 - 3
mpi/examples/matrix_decomposition/mpi_cholesky_distributed.c

@@ -31,9 +31,6 @@ int main(int argc, char **argv)
 	float ***bmat;
 	int rank, nodes, ret;
 	double timing, flops;
-#ifndef STARPU_SIMGRID
-	int correctness=1;
-#endif
 
 	ret = starpu_mpi_init_conf(&argc, &argv, 1, MPI_COMM_WORLD, NULL);
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_init_conf");

+ 1 - 1
mpi/examples/matrix_decomposition/mpi_cholesky_kernels.c

@@ -198,8 +198,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

+ 1 - 1
mpi/examples/matrix_decomposition/mpi_decomposition_matrix.c

@@ -120,7 +120,7 @@ void matrix_free(float ****bmat, int rank, int nodes, int alloc_everywhere)
 			int mpi_rank = my_distrib(m, n, nodes);
 			if (alloc_everywhere || (mpi_rank == rank))
 			{
-				starpu_free((void *)(*bmat)[m][n]);
+				starpu_free_noflag((void *)(*bmat)[m][n], BLOCKSIZE*BLOCKSIZE*sizeof(float));
 			}
 		}
 		free((*bmat)[m]);

+ 3 - 3
mpi/examples/matrix_mult/mm.c

@@ -59,9 +59,9 @@ static void alloc_matrices(void)
 
 static void free_matrices(void)
 {
-	starpu_free(A);
-	starpu_free(B);
-	starpu_free(C);
+	starpu_free_noflag(A, N*N*sizeof(double));
+	starpu_free_noflag(B, N*N*sizeof(double));
+	starpu_free_noflag(C, N*N*sizeof(double));
 }
 
 static void init_matrices(void)

+ 8 - 7
mpi/examples/mpi_lu/plu_example.c

@@ -606,6 +606,7 @@ int main(int argc, char **argv)
 	/*
 	 * 	Termination
 	 */
+	size_t blocksize = (size_t)(size/nblocks)*(size/nblocks)*sizeof(TYPE);
 	for (j = 0; j < nblocks; j++)
 	{
 		for (i = 0; i < nblocks; i++)
@@ -615,7 +616,7 @@ int main(int argc, char **argv)
 				starpu_data_unregister(handle);
 			TYPE *blockptr = dataA[j+i*nblocks];
 			if (blockptr != STARPU_POISON_PTR)
-				starpu_free(blockptr);
+				starpu_free_noflag(blockptr, blocksize);
 		}
 	}
 	free(dataA_handles);
@@ -623,14 +624,14 @@ int main(int argc, char **argv)
 
 #ifdef SINGLE_TMP11
 	starpu_data_unregister(tmp_11_block_handle);
-	starpu_free(tmp_11_block);
+	starpu_free_noflag(tmp_11_block, blocksize);
 #else
 	for (k = 0; k < nblocks; k++)
 	{
 		if (tmp_11_block_is_needed(rank, nblocks, k))
 		{
 			starpu_data_unregister(tmp_11_block_handles[k]);
-			starpu_free(tmp_11_block[k]);
+			starpu_free_noflag(tmp_11_block[k], blocksize);
 		}
 	}
 	free(tmp_11_block_handles);
@@ -643,13 +644,13 @@ int main(int argc, char **argv)
 		if (tmp_12_block_is_needed(rank, nblocks, k))
 		{
 			starpu_data_unregister(tmp_12_block_handles);
-			starpu_free(tmp_12_block[k]);
+			starpu_free_noflag(tmp_12_block[k], blocksize);
 		}
 
 		if (tmp_21_block_is_needed(rank, nblocks, k))
 		{
 			starpu_data_unregister(tmp_21_block_handles[k]);
-			starpu_free(tmp_21_block[k]);
+			starpu_free_noflag(tmp_21_block[k], blocksize);
 		}
 #else
 	for (i = 0; i < 2; i++)
@@ -657,13 +658,13 @@ int main(int argc, char **argv)
 		if (tmp_12_block_is_needed(rank, nblocks, k))
 		{
 			starpu_data_unregister(tmp_12_block_handles[i][k]);
-			starpu_free(tmp_12_block[i][k]);
+			starpu_free_noflag(tmp_12_block[i][k], blocksize);
 		}
 
 		if (tmp_21_block_is_needed(rank, nblocks, k))
 		{
 			starpu_data_unregister(tmp_21_block_handles[i][k]);
-			starpu_free(tmp_21_block[i][k]);
+			starpu_free_noflag(tmp_21_block[i][k], blocksize);
 		}
 	}
 #endif

+ 2 - 2
mpi/examples/mpi_lu/plu_implicit_example.c

@@ -253,7 +253,6 @@ int main(int argc, char **argv)
 	int world_size;
 	int ret;
 	unsigned i, j;
-
 	starpu_srand48((long int)time(NULL));
 
 	parse_args(argc, argv);
@@ -380,6 +379,7 @@ int main(int argc, char **argv)
 	/*
 	 * 	Termination
 	 */
+	size_t blocksize = (size_t)(size/nblocks)*(size/nblocks)*sizeof(TYPE);
 	for (j = 0; j < nblocks; j++)
 	{
 		for (i = 0; i < nblocks; i++)
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
 			starpu_data_unregister(dataA_handles[j+nblocks*i]);
 			TYPE *blockptr = dataA[j+i*nblocks];
 			if (blockptr != STARPU_POISON_PTR)
-				starpu_free(blockptr);
+				starpu_free_noflag(blockptr, blocksize);
 		}
 	}
 	free(dataA_handles);

+ 0 - 3
mpi/examples/mpi_lu/pxlu.c

@@ -199,10 +199,7 @@ static void create_task_11_recv(unsigned k)
 			if (rank == get_block_rank(i, k-1))
 				tag_array[ndeps++] = TAG21(k-1, i);
 		}
-	}
 
-	if (k > 0)
-	{
 		unsigned j;
 		for (j = (k-1)+1; j < nblocks; j++)
 		{

+ 0 - 2
mpi/examples/mpi_lu/pxlu_kernels.c

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

+ 0 - 1
mpi/examples/mpi_redux/mpi_redux.c

@@ -123,7 +123,6 @@ int main(int argc, char *argv[])
 	double a, b[comm_size];
 	starpu_data_handle_t a_h, b_h[comm_size];
 	double work_coef = 2;
-	enum starpu_data_access_mode codelet_mode;
 	enum starpu_data_access_mode task_mode;
 	int i,j,work_node;
     	starpu_mpi_tag_t tag = 0;

+ 0 - 1
mpi/src/mpi/starpu_mpi_early_data.c

@@ -95,7 +95,6 @@ struct _starpu_mpi_early_data_handle *_starpu_mpi_early_data_create(struct _star
 void _starpu_mpi_early_data_delete(struct _starpu_mpi_early_data_handle *early_data_handle)
 {
 	free(early_data_handle);
-	early_data_handle = NULL;
 }
 
 struct _starpu_mpi_early_data_handle *_starpu_mpi_early_data_find(struct _starpu_mpi_node_tag *node_tag)

+ 2 - 3
mpi/tests/block_interface_pinned.c

@@ -61,8 +61,7 @@ int main(int argc, char **argv)
 
 	if (rank == 0)
 	{
-		starpu_malloc((void **)&block,
-				BIGSIZE*BIGSIZE*BIGSIZE*sizeof(float));
+		starpu_malloc((void **)&block, BIGSIZE*BIGSIZE*BIGSIZE*sizeof(float));
 		memset(block, 0, BIGSIZE*BIGSIZE*BIGSIZE*sizeof(float));
 
 		/* fill the inner block */
@@ -140,7 +139,7 @@ int main(int argc, char **argv)
 	if (rank == 0 || rank == 1)
 	{
 		starpu_data_unregister(block_handle);
-		starpu_free(block);
+		starpu_free_noflag(block, BIGSIZE*BIGSIZE*BIGSIZE*sizeof(float));
 	}
 
 	FPRINTF(stdout, "Rank %d is done\n", rank);

+ 1 - 1
mpi/tests/early_stuff.c

@@ -108,7 +108,7 @@ void early_request()
 
 int main(int argc, char **argv)
 {
-	int ret, rank, size, i;
+	int ret;
 	starpu_data_handle_t tab_handle[4];
 	int mpi_init;
 

+ 0 - 0
mpi/tests/helper.h


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä