Просмотр исходного кода

Realign to master after merge fail

Romain LION лет назад: 5
Родитель
Сommit
8452a2c7e9
100 измененных файлов с 1703 добавлено и 475 удалено
  1. 8 4
      Makefile.am
  2. 4 0
      STARPU-VERSION
  3. 3 2
      contrib/ci.inria.fr/job-1-check.sh
  4. 4 0
      doc/doxygen/Makefile.am
  5. 10 4
      doc/doxygen/chapters/470_simgrid.doxy
  6. 14 0
      doc/doxygen/chapters/501_environment_variables.doxy
  7. 34 0
      doc/doxygen/dev/starpu_check_include.sh
  8. 4 6
      examples/Makefile.am
  9. 21 1
      examples/cholesky/cholesky.sh
  10. 10 3
      examples/common/blas.h
  11. 1 1
      examples/mult/sgemm.sh
  12. 13 3
      examples/mult/xgemm.c
  13. 2 4
      examples/stencil/Makefile.am
  14. 8 0
      examples/tag_example/tag_example.c
  15. 11 0
      include/starpu.h
  16. 246 15
      include/starpu_bitmap.h
  17. 0 1
      include/starpu_config.h.in
  18. 3 3
      include/starpu_sched_component.h
  19. 3 1
      include/starpu_task.h
  20. 0 8
      julia/Makefile
  21. 123 0
      julia/Manifest.toml
  22. 3 0
      julia/Project.toml
  23. 0 2
      julia/REQUIRE
  24. 19 0
      julia/examples/axpy/axpy.sh
  25. 1 0
      julia/examples/black_scholes/black_scholes.c
  26. 15 0
      julia/examples/black_scholes/black_scholes.jl
  27. 93 0
      julia/examples/callback/callback.c
  28. 19 0
      julia/examples/callback/callback.sh
  29. 20 0
      julia/examples/check_deps/check_deps.sh
  30. 18 0
      julia/examples/dependency/end_dep.sh
  31. 18 0
      julia/examples/dependency/tag_dep.sh
  32. 18 0
      julia/examples/dependency/task_dep.sh
  33. 4 6
      julia/examples/mandelbrot/Makefile
  34. 8 10
      julia/src/jlstarpu_simple_functions.c
  35. 78 56
      julia/examples/mandelbrot/mandelbrot.c
  36. 21 0
      julia/examples/mandelbrot/mandelbrot.sh
  37. 22 5
      julia/examples/mandelbrot/mandelbrot_native.jl
  38. 11 15
      julia/examples/mult/Makefile
  39. 2 1
      julia/examples/mult/gpu_mult.cu
  40. 50 59
      julia/examples/mult/mult.c
  41. 27 9
      julia/examples/mult/mult_native.jl
  42. 22 0
      julia/examples/mult/mult_starpu.sh
  43. 38 0
      julia/examples/mult/perf.sh
  44. 1 0
      julia/examples/old_examples/includes/display.c
  45. 1 0
      julia/examples/old_examples/includes/display.h
  46. 1 0
      julia/examples/old_examples/includes/sorting.c
  47. 1 0
      julia/examples/old_examples/includes/sorting.h
  48. 15 0
      julia/examples/old_examples/mandelbrot/cpu_cuda_mandelbrot.jl
  49. 1 0
      julia/examples/old_examples/mandelbrot/cpu_mandelbrot.c
  50. 1 0
      julia/examples/old_examples/mandelbrot/cpu_mandelbrot_between.c
  51. 2 1
      julia/examples/old_examples/mandelbrot/gpu_mandelbrot.cu
  52. 1 0
      julia/examples/old_examples/mandelbrot/gpu_mandelbrot_between.cu
  53. 1 0
      julia/examples/old_examples/mandelbrot/mandelbrot.c
  54. 15 0
      julia/examples/old_examples/mandelbrot/mandelbrot.jl
  55. 1 0
      julia/examples/old_examples/mandelbrot/mandelbrot_between.c
  56. 15 0
      julia/examples/old_examples/mandelbrot/mandelbrot_def.jl
  57. 15 0
      julia/examples/old_examples/mandelbrot/mandelbrot_generated.jl
  58. 15 0
      julia/examples/old_examples/mult/cpu_cuda_mult.jl
  59. 1 0
      julia/examples/old_examples/mult/cpu_mult.c
  60. 1 0
      julia/examples/old_examples/mult/gpu_mult.cu
  61. 15 0
      julia/examples/old_examples/mult/mult_def.jl
  62. 15 0
      julia/examples/old_examples/mult/mult_extern.jl
  63. 15 0
      julia/examples/old_examples/mult/mult_extern_graph.jl
  64. 15 0
      julia/examples/old_examples/mult/mult_generated.jl
  65. 15 0
      julia/examples/old_examples/mult/mult_generated_graph.jl
  66. 15 0
      julia/examples/old_examples/mult/mult_naive.jl
  67. 15 0
      julia/examples/old_examples/nbody/cpu_cuda_nbody.jl
  68. 1 0
      julia/examples/old_examples/nbody/cpu_nbody.c
  69. 1 0
      julia/examples/old_examples/nbody/cpu_nbody_between.c
  70. 2 1
      julia/examples/old_examples/nbody/gpu_nbody.cu
  71. 1 0
      julia/examples/old_examples/nbody/gpu_nbody_between.cu
  72. 1 0
      julia/examples/old_examples/nbody/nbody.c
  73. 15 0
      julia/examples/old_examples/nbody/nbody.jl
  74. 1 0
      julia/examples/old_examples/nbody/nbody_between.c
  75. 15 0
      julia/examples/old_examples/nbody/nbody_def.jl
  76. 15 0
      julia/examples/old_examples/nbody/nbody_display.jl
  77. 15 0
      julia/examples/old_examples/nbody/nbody_generated.jl
  78. 1 3
      julia/examples/task_insert_color/Makefile
  79. 19 0
      julia/examples/task_insert_color/task_insert_color.sh
  80. 3 5
      julia/examples/variable/Makefile
  81. 15 0
      julia/examples/variable/variable.jl
  82. 20 0
      julia/examples/variable/variable.sh
  83. 15 0
      julia/examples/variable/variable_native.jl
  84. 5 6
      julia/examples/vector_scal/Makefile
  85. 16 1
      julia/examples/vector_scal/cpu_vector_scal.c
  86. 20 0
      julia/examples/vector_scal/vector_scal.sh
  87. 15 0
      julia/setenv.sh
  88. 39 0
      julia/src/callback_wrapper.c
  89. 15 0
      julia/src/compiler/c.jl
  90. 15 0
      julia/src/compiler/cuda.jl
  91. 15 0
      julia/src/compiler/expression_manipulation.jl
  92. 15 12
      julia/src/compiler/expressions.jl
  93. 15 19
      julia/src/compiler/file_generation.jl
  94. 15 0
      julia/src/compiler/include.jl
  95. 15 0
      julia/src/compiler/parsing.jl
  96. 15 0
      julia/src/compiler/utils.jl
  97. 126 0
      julia/src/destructible.jl
  98. 0 133
      julia/src/jlstarpu_data_handles.c
  99. 0 75
      julia/src/jlstarpu_task.h
  100. 0 0
      julia/src/jlstarpu_task_submit.c

+ 8 - 4
Makefile.am

@@ -57,6 +57,10 @@ if STARPU_BUILD_SC_HYPERVISOR
 SUBDIRS += sc_hypervisor
 SUBDIRS += sc_hypervisor
 endif
 endif
 
 
+if STARPU_USE_JULIA
+SUBDIRS += julia
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
 pkgconfig_DATA = libstarpu.pc starpu-1.0.pc starpu-1.1.pc starpu-1.2.pc starpu-1.3.pc
 
 
@@ -159,28 +163,28 @@ DISTCLEANFILES = STARPU-REVISION
 recheck:
 recheck:
 	RET=0 ; \
 	RET=0 ; \
 	for i in $(SUBDIRS) ; do \
 	for i in $(SUBDIRS) ; do \
-		make -C $$i recheck || RET=1 ; \
+		$(MAKE) -C $$i recheck || RET=1 ; \
 	done ; \
 	done ; \
 	exit $$RET
 	exit $$RET
 
 
 showfailed:
 showfailed:
 	@RET=0 ; \
 	@RET=0 ; \
 	for i in $(SUBDIRS) ; do \
 	for i in $(SUBDIRS) ; do \
-		make -s -C $$i showfailed || RET=1 ; \
+		$(MAKE) -s -C $$i showfailed || RET=1 ; \
 	done ; \
 	done ; \
 	exit $$RET
 	exit $$RET
 
 
 showcheck:
 showcheck:
 	RET=0 ; \
 	RET=0 ; \
 	for i in $(SUBDIRS) ; do \
 	for i in $(SUBDIRS) ; do \
-		make -C $$i showcheck || RET=1 ; \
+		$(MAKE) -C $$i showcheck || RET=1 ; \
 	done ; \
 	done ; \
 	exit $$RET
 	exit $$RET
 
 
 showsuite:
 showsuite:
 	RET=0 ; \
 	RET=0 ; \
 	for i in $(SUBDIRS) ; do \
 	for i in $(SUBDIRS) ; do \
-		make -C $$i showsuite || RET=1 ; \
+		$(MAKE) -C $$i showsuite || RET=1 ; \
 	done ; \
 	done ; \
 	exit $$RET
 	exit $$RET
 
 

+ 4 - 0
STARPU-VERSION

@@ -60,3 +60,7 @@ LIBSOCL_INTERFACE_AGE=0		# set to CURRENT - PREVIOUS interface
 LIBSTARPURM_INTERFACE_CURRENT=0	# increment upon ABI change
 LIBSTARPURM_INTERFACE_CURRENT=0	# increment upon ABI change
 LIBSTARPURM_INTERFACE_REVISION=0	# increment upon implementation change
 LIBSTARPURM_INTERFACE_REVISION=0	# increment upon implementation change
 LIBSTARPURM_INTERFACE_AGE=0	# set to CURRENT - PREVIOUS interface
 LIBSTARPURM_INTERFACE_AGE=0	# set to CURRENT - PREVIOUS interface
+
+LIBSTARPUJULIA_INTERFACE_CURRENT=0	# increment upon ABI change
+LIBSTARPUJULIA_INTERFACE_REVISION=0	# increment upon implementation change
+LIBSTARPUJULIA_INTERFACE_AGE=0		# set to CURRENT - PREVIOUS interface

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

@@ -63,12 +63,13 @@ fi
 export CC=gcc
 export CC=gcc
 
 
 CONFIGURE_OPTIONS="--enable-debug --enable-verbose --enable-mpi-check --disable-build-doc"
 CONFIGURE_OPTIONS="--enable-debug --enable-verbose --enable-mpi-check --disable-build-doc"
+CONFIGURE_CHECK=""
 day=$(date +%u)
 day=$(date +%u)
 if test $day -le 5
 if test $day -le 5
 then
 then
     CONFIGURE_CHECK="--enable-quick-check"
     CONFIGURE_CHECK="--enable-quick-check"
-else
-    CONFIGURE_CHECK="--enable-long-check"
+#else
+    # we do a normal check, a long check takes too long on VM nodes
 fi
 fi
 ../configure $CONFIGURE_OPTIONS $CONFIGURE_CHECK  $STARPU_CONFIGURE_OPTIONS
 ../configure $CONFIGURE_OPTIONS $CONFIGURE_CHECK  $STARPU_CONFIGURE_OPTIONS
 
 

+ 4 - 0
doc/doxygen/Makefile.am

@@ -200,7 +200,9 @@ dox_inputs = $(DOX_CONFIG) 				\
 	$(top_srcdir)/include/starpu_expert.h		\
 	$(top_srcdir)/include/starpu_expert.h		\
 	$(top_srcdir)/include/starpu_fxt.h		\
 	$(top_srcdir)/include/starpu_fxt.h		\
 	$(top_srcdir)/include/starpu_hash.h		\
 	$(top_srcdir)/include/starpu_hash.h		\
+	$(top_srcdir)/include/starpu_helper.h		\
 	$(top_srcdir)/include/starpu_mic.h		\
 	$(top_srcdir)/include/starpu_mic.h		\
+	$(top_srcdir)/include/starpu_mpi_ms.h		\
 	$(top_srcdir)/include/starpu_mod.f90		\
 	$(top_srcdir)/include/starpu_mod.f90		\
 	$(top_srcdir)/include/starpu_opencl.h		\
 	$(top_srcdir)/include/starpu_opencl.h		\
 	$(top_srcdir)/include/starpu_openmp.h		\
 	$(top_srcdir)/include/starpu_openmp.h		\
@@ -227,6 +229,8 @@ dox_inputs = $(DOX_CONFIG) 				\
 	$(top_srcdir)/include/starpu_util.h		\
 	$(top_srcdir)/include/starpu_util.h		\
 	$(top_srcdir)/include/starpu_worker.h		\
 	$(top_srcdir)/include/starpu_worker.h		\
 	$(top_srcdir)/include/fstarpu_mod.f90		\
 	$(top_srcdir)/include/fstarpu_mod.f90		\
+	$(top_srcdir)/include/schedulers/starpu_heteroprio.h	\
+	$(top_srcdir)/starpufft/include/starpufft.h 	\
 	$(top_srcdir)/mpi/include/starpu_mpi.h 		\
 	$(top_srcdir)/mpi/include/starpu_mpi.h 		\
 	$(top_srcdir)/mpi/include/starpu_mpi_lb.h	\
 	$(top_srcdir)/mpi/include/starpu_mpi_lb.h	\
 	$(top_srcdir)/mpi/include/fstarpu_mpi_mod.f90		\
 	$(top_srcdir)/mpi/include/fstarpu_mpi_mod.f90		\

+ 10 - 4
doc/doxygen/chapters/470_simgrid.doxy

@@ -133,7 +133,10 @@ machine (the <c>$STARPU_HOME/.starpu</c> directory). One can then perform the
 Simulation step on the desktop machine, by setting the environment
 Simulation step on the desktop machine, by setting the environment
 variable \ref STARPU_HOSTNAME to the name of the actual machine, to
 variable \ref STARPU_HOSTNAME to the name of the actual machine, to
 make StarPU use the performance models of the simulated machine even
 make StarPU use the performance models of the simulated machine even
-on the desktop machine.
+on the desktop machine. To use multiple performance models in different ranks,
+in case of smpi executions in a heterogeneous platform, it is possible to use the
+option <c>-hostfile-platform</c> in <c>starpu_smpirun</c>, that will define
+\ref STARPU_MPI_HOSTNAMES with the hostnames of your hostfile.
 
 
 If the desktop machine does not have CUDA or OpenCL, StarPU is still able to
 If the desktop machine does not have CUDA or OpenCL, StarPU is still able to
 use SimGrid to simulate execution with CUDA/OpenCL devices, but the application
 use SimGrid to simulate execution with CUDA/OpenCL devices, but the application
@@ -172,9 +175,12 @@ $ STARPU_SCHED=dmda starpu_smpirun -platform cluster.xml -hostfile hostfile ./mp
 \endverbatim
 \endverbatim
 
 
 Where \c cluster.xml is a SimGrid-MPI platform description, and \c hostfile the
 Where \c cluster.xml is a SimGrid-MPI platform description, and \c hostfile the
-list of MPI nodes to be used. StarPU currently only supports homogeneous MPI
-clusters: for each MPI node it will just replicate the architecture referred by
-\ref STARPU_HOSTNAME.
+list of MPI nodes to be used. In homogeneous MPI clusters: for each MPI node it
+will just replicate the architecture referred by
+\ref STARPU_HOSTNAME. To use multiple performance models in different ranks,
+in case of a heterogeneous platform, it is possible to use the
+option <c>-hostfile-platform</c> in <c>starpu_smpirun</c>, that will define
+\ref STARPU_MPI_HOSTNAMES with the hostnames of your hostfile.
 
 
 \section SimulationDebuggingApplications Debugging Applications
 \section SimulationDebuggingApplications Debugging Applications
 
 

+ 14 - 0
doc/doxygen/chapters/501_environment_variables.doxy

@@ -881,6 +881,20 @@ a homogenenous cluster, it is possible to share the models between
 machines by setting <c>export STARPU_HOSTNAME=some_global_name</c>.
 machines by setting <c>export STARPU_HOSTNAME=some_global_name</c>.
 </dd>
 </dd>
 
 
+<dt>STARPU_MPI_HOSTNAMES</dt>
+<dd>
+\anchor STARPU_MPI_HOSTNAMES
+\addindex __env__STARPU_MPI_HOSTNAMES
+Similar to \ref STARPU_HOSTNAME but to define multiple nodes on a
+heterogeneous cluster. The variable is a list of hostnames that will be assigned
+to each StarPU-MPI rank considering their position and the value of
+\ref starpu_mpi_world_rank on each rank. When running, for example, on a
+heterogeneous cluster, it is possible to set individual models for each machine
+by setting <c>export STARPU_MPI_HOSTNAMES="name0 name1 name2"</c>. Where rank 0
+will receive name0, rank1 will receive name1, and so on.
+This variable has precedence over \ref STARPU_HOSTNAME.
+</dd>
+
 <dt>STARPU_OPENCL_PROGRAM_DIR</dt>
 <dt>STARPU_OPENCL_PROGRAM_DIR</dt>
 <dd>
 <dd>
 \anchor STARPU_OPENCL_PROGRAM_DIR
 \anchor STARPU_OPENCL_PROGRAM_DIR

+ 34 - 0
doc/doxygen/dev/starpu_check_include.sh

@@ -0,0 +1,34 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+dir=$(dirname $0)
+
+cd $dir/../../../
+for d in $(find . -name include -not -wholename "*/build/*")
+do
+    for f in $(find $d -name "*h")
+    do
+	for i in doxygen-config.cfg.in Makefile.am
+	do
+	    x=`grep $f $dir/../$i`
+	    if test -z "$x"
+	    then
+		echo $f missing in $i
+	    fi
+	done
+    done
+done

+ 4 - 6
examples/Makefile.am

@@ -158,11 +158,8 @@ SHELL_TESTS			+=	mult/sgemm.sh
 endif
 endif
 endif
 endif
 
 
-if STARPU_HAVE_WINDOWS
 check_PROGRAMS		=	$(STARPU_EXAMPLES)
 check_PROGRAMS		=	$(STARPU_EXAMPLES)
-else
-check_PROGRAMS		=	$(LOADER) $(STARPU_EXAMPLES)
-endif
+noinst_PROGRAMS		=
 
 
 if !STARPU_HAVE_WINDOWS
 if !STARPU_HAVE_WINDOWS
 ## test loader program
 ## test loader program
@@ -171,6 +168,7 @@ LOADER			=	loader
 loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 LOADER_BIN		=	$(abs_top_builddir)/examples/$(LOADER)
 LOADER_BIN		=	$(abs_top_builddir)/examples/$(LOADER)
 loader_SOURCES		=	../tests/loader.c
 loader_SOURCES		=	../tests/loader.c
+noinst_PROGRAMS		+=	loader
 else
 else
 LOADER			=
 LOADER			=
 LOADER_BIN		=	$(top_builddir)/examples/loader-cross.sh
 LOADER_BIN		=	$(top_builddir)/examples/loader-cross.sh
@@ -1118,10 +1116,10 @@ endif
 # - link over source file to build our own object
 # - link over source file to build our own object
 fortran90/starpu_mod.f90:
 fortran90/starpu_mod.f90:
 	@$(MKDIR_P) $(dir $@)
 	@$(MKDIR_P) $(dir $@)
-	$(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
+	$(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
 native_fortran/fstarpu_mod.f90:
 native_fortran/fstarpu_mod.f90:
 	@$(MKDIR_P) $(dir $@)
 	@$(MKDIR_P) $(dir $@)
-	$(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
+	$(V_ln) $(LN_S) $(abs_top_srcdir)/include/$(notdir $@) $@
 
 
 if STARPU_HAVE_FC
 if STARPU_HAVE_FC
 # Fortran90 example
 # Fortran90 example

+ 21 - 1
examples/cholesky/cholesky.sh

@@ -22,6 +22,26 @@ ROOT=${0%.sh}
 [ -n "$STARPU_HOSTNAME" ] || export STARPU_HOSTNAME=mirage
 [ -n "$STARPU_HOSTNAME" ] || export STARPU_HOSTNAME=mirage
 unset MALLOC_PERTURB_
 unset MALLOC_PERTURB_
 
 
+INCR=2
+STOP=32
+
+if [ -n "$STARPU_SIMGRID" ]
+then
+	INCR=4
+	STOP=14
+	# These use the thread factory, and are thus much longer
+	if [ -n "$STARPU_QUICK_CHECK" ]
+	then
+		INCR=8
+		STOP=10
+	fi
+	if [ -n "$STARPU_LONG_CHECK" ]
+	then
+		INCR=4
+		STOP=32
+	fi
+fi
+
 (
 (
 echo -n "#"
 echo -n "#"
 for STARPU_SCHED in $STARPU_SCHEDS ; do
 for STARPU_SCHED in $STARPU_SCHEDS ; do
@@ -29,7 +49,7 @@ for STARPU_SCHED in $STARPU_SCHEDS ; do
 done
 done
 echo
 echo
 
 
-for size in `seq 2 2 30` ; do
+for size in `seq 2 $INCR $STOP` ; do
 	echo -n "$((size * 960))"
 	echo -n "$((size * 960))"
 	for STARPU_SCHED in $STARPU_SCHEDS
 	for STARPU_SCHED in $STARPU_SCHEDS
 	do
 	do

+ 10 - 3
examples/common/blas.h

@@ -88,6 +88,14 @@ void STARPU_DPOTRF(const char*uplo, const int n, double *a, const int lda);
 
 
 #if defined(STARPU_GOTO) || defined(STARPU_OPENBLAS) || defined(STARPU_SYSTEM_BLAS) || defined(STARPU_MKL) || defined(STARPU_ARMPL)
 #if defined(STARPU_GOTO) || defined(STARPU_OPENBLAS) || defined(STARPU_SYSTEM_BLAS) || defined(STARPU_MKL) || defined(STARPU_ARMPL)
 
 
+#ifdef _STARPU_F2C_COMPATIBILITY
+/* for compatibility with F2C, FLOATRET may not be a float but a double in GOTOBLAS */
+/* Don't know how to detect this automatically */
+#define _STARPU_FLOATRET double
+#else
+#define _STARPU_FLOATRET float
+#endif
+
 extern void sgemm_ (const char *transa, const char *transb, const int *m,
 extern void sgemm_ (const char *transa, const char *transb, const int *m,
                    const int *n, const int *k, const float *alpha, 
                    const int *n, const int *k, const float *alpha, 
                    const float *A, const int *lda, const float *B, 
                    const float *A, const int *lda, const float *B, 
@@ -118,7 +126,7 @@ extern void dtrsm_ (const char *side, const char *uplo, const char *transa,
                    const char *diag, const int *m, const int *n,
                    const char *diag, const int *m, const int *n,
                    const double *alpha, const double *A, const int *lda,
                    const double *alpha, const double *A, const int *lda,
                    double *B, const int *ldb);
                    double *B, const int *ldb);
-extern double sasum_ (const int *n, const float *x, const int *incx);
+extern _STARPU_FLOATRET sasum_ (const int *n, const float *x, const int *incx);
 extern double dasum_ (const int *n, const double *x, const int *incx);
 extern double dasum_ (const int *n, const double *x, const int *incx);
 extern void sscal_ (const int *n, const float *alpha, float *x,
 extern void sscal_ (const int *n, const float *alpha, float *x,
                    const int *incx);
                    const int *incx);
@@ -150,8 +158,7 @@ extern void daxpy_(const int *n, const double *alpha, const double *X, const int
 		double *Y, const int *incy);
 		double *Y, const int *incy);
 extern int isamax_(const int *n, const float *X, const int *incX);
 extern int isamax_(const int *n, const float *X, const int *incX);
 extern int idamax_(const int *n, const double *X, const int *incX);
 extern int idamax_(const int *n, const double *X, const int *incX);
-/* for some reason, FLOATRET is not a float but a double in GOTOBLAS */
-extern double sdot_(const int *n, const float *x, const int *incx, const float *y, const int *incy);
+extern _STARPU_FLOATRET sdot_(const int *n, const float *x, const int *incx, const float *y, const int *incy);
 extern double ddot_(const int *n, const double *x, const int *incx, const double *y, const int *incy);
 extern double ddot_(const int *n, const double *x, const int *incx, const double *y, const int *incy);
 extern void sswap_(const int *n, float *x, const int *incx, float *y, const int *incy);
 extern void sswap_(const int *n, float *x, const int *incx, float *y, const int *incy);
 extern void dswap_(const int *n, double *x, const int *incx, double *y, const int *incy);
 extern void dswap_(const int *n, double *x, const int *incx, double *y, const int *incy);

+ 1 - 1
examples/mult/sgemm.sh

@@ -32,7 +32,7 @@ if [ -n "$STARPU_MIC_SINK_PROGRAM_PATH" ] ; then
 	[ -x "$STARPU_MIC_SINK_PROGRAM_PATH/.libs/sgemm" ] && STARPU_MIC_SINK_PROGRAM_NAME=$STARPU_MIC_SINK_PROGRAM_PATH/.libs/sgemm
 	[ -x "$STARPU_MIC_SINK_PROGRAM_PATH/.libs/sgemm" ] && STARPU_MIC_SINK_PROGRAM_NAME=$STARPU_MIC_SINK_PROGRAM_PATH/.libs/sgemm
 fi
 fi
 
 
-STARPU_SCHED=dmdas STARPU_FXT_PREFIX=$PREFIX/ $PREFIX/sgemm
+STARPU_SCHED=dmdas STARPU_FXT_PREFIX=$PREFIX/ $PREFIX/sgemm -check
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_display ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_display -s starpu_sgemm_gemm
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_display ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_display -s starpu_sgemm_gemm
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_display ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_display -x -s starpu_sgemm_gemm
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_display ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_display -x -s starpu_sgemm_gemm
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_recdump ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_recdump -o perfs.rec
 [ ! -x $PREFIX/../../tools/starpu_perfmodel_recdump ] || $STARPU_LAUNCH $PREFIX/../../tools/starpu_perfmodel_recdump -o perfs.rec

+ 13 - 3
examples/mult/xgemm.c

@@ -66,7 +66,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 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)
 #define PRINTF(fmt, ...) do { if (!getenv("STARPU_SSILENT")) {printf(fmt, ## __VA_ARGS__); fflush(stdout); }} while(0)
 
 
-static void check_output(void)
+static int check_output(void)
 {
 {
 	/* compute C = C - AB */
 	/* compute C = C - AB */
 	CPU_GEMM("N", "N", ydim, xdim, zdim, (TYPE)-1.0f, A, ydim, B, zdim, (TYPE)1.0f, C, ydim);
 	CPU_GEMM("N", "N", ydim, xdim, zdim, (TYPE)-1.0f, A, ydim, B, zdim, (TYPE)1.0f, C, ydim);
@@ -78,6 +78,7 @@ static void check_output(void)
 	if (err < xdim*ydim*0.001)
 	if (err < xdim*ydim*0.001)
 	{
 	{
 		FPRINTF(stderr, "Results are OK\n");
 		FPRINTF(stderr, "Results are OK\n");
+		return 0;
 	}
 	}
 	else
 	else
 	{
 	{
@@ -86,6 +87,7 @@ static void check_output(void)
 
 
 		FPRINTF(stderr, "There were errors ... err = %f\n", err);
 		FPRINTF(stderr, "There were errors ... err = %f\n", err);
 		FPRINTF(stderr, "Max error : %e\n", C[max]);
 		FPRINTF(stderr, "Max error : %e\n", C[max]);
+		return 1;
 	}
 	}
 }
 }
 
 
@@ -150,6 +152,11 @@ static void partition_mult_data(void)
 	starpu_data_partition(A_handle, &horiz);
 	starpu_data_partition(A_handle, &horiz);
 
 
 	starpu_data_map_filters(C_handle, 2, &vert, &horiz);
 	starpu_data_map_filters(C_handle, 2, &vert, &horiz);
+
+	unsigned x, y;
+	for (x = 0; x < nslicesx; x++)
+	for (y = 0; y < nslicesy; y++)
+		starpu_data_set_coordinates(starpu_data_get_sub_data(C_handle, 2, x, y), 2, x, y);
 }
 }
 
 
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
@@ -236,7 +243,7 @@ static struct starpu_codelet cl =
 #endif
 #endif
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	.nbuffers = 3,
 	.nbuffers = 3,
-	.modes = {STARPU_R, STARPU_R, STARPU_RW},
+	.modes = {STARPU_R, STARPU_R, STARPU_W},
 	.model = &starpu_gemm_model
 	.model = &starpu_gemm_model
 };
 };
 
 
@@ -398,6 +405,7 @@ int main(int argc, char **argv)
 				ret = starpu_task_submit(task);
 				ret = starpu_task_submit(task);
 				if (ret == -ENODEV)
 				if (ret == -ENODEV)
 				{
 				{
+				     check = 0;
 				     ret = 77;
 				     ret = 77;
 				     goto enodev;
 				     goto enodev;
 				}
 				}
@@ -448,8 +456,10 @@ enodev:
 	starpu_data_unregister(B_handle);
 	starpu_data_unregister(B_handle);
 	starpu_data_unregister(C_handle);
 	starpu_data_unregister(C_handle);
 
 
+#ifndef STARPU_SIMGRID
 	if (check)
 	if (check)
-		check_output();
+		ret = check_output();
+#endif
 
 
 	starpu_free_flags(A, zdim*ydim*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);
 	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);
 	starpu_free_flags(B, xdim*zdim*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);

+ 2 - 4
examples/stencil/Makefile.am

@@ -56,11 +56,8 @@ endif
 # What to install and what to check #
 # What to install and what to check #
 #####################################
 #####################################
 
 
-if STARPU_HAVE_WINDOWS
 check_PROGRAMS	=	$(STARPU_EXAMPLES)
 check_PROGRAMS	=	$(STARPU_EXAMPLES)
-else
-check_PROGRAMS	=	$(LOADER) $(STARPU_EXAMPLES)
-endif
+noinst_PROGRAMS	=
 
 
 if !STARPU_SIMGRID
 if !STARPU_SIMGRID
 if STARPU_USE_MPI
 if STARPU_USE_MPI
@@ -79,6 +76,7 @@ LOADER			=	loader
 loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
 LOADER_BIN		=	./$(LOADER)
 LOADER_BIN		=	./$(LOADER)
 loader_SOURCES		=	../../tests/loader.c
 loader_SOURCES		=	../../tests/loader.c
+noinst_PROGRAMS		+=	loader
 else
 else
 LOADER			=
 LOADER			=
 LOADER_BIN		=	$(top_builddir)/examples/stencil/loader-cross.sh
 LOADER_BIN		=	$(top_builddir)/examples/stencil/loader-cross.sh

+ 8 - 0
examples/tag_example/tag_example.c

@@ -222,6 +222,14 @@ int main(int argc, char **argv)
 {
 {
 	int ret;
 	int ret;
 
 
+#ifdef STARPU_HAVE_HELGRIND_H
+	if (RUNNING_ON_VALGRIND) {
+		ni /= 2;
+		nj /= 2;
+		nk /= 2;
+	}
+#endif
+
 	ret = starpu_init(NULL);
 	ret = starpu_init(NULL);
 	if (ret == -ENODEV)
 	if (ret == -ENODEV)
 		exit(77);
 		exit(77);

+ 11 - 0
include/starpu.h

@@ -126,6 +126,17 @@ struct starpu_conf
 	void (*sched_policy_init)(unsigned);
 	void (*sched_policy_init)(unsigned);
 
 
 	/**
 	/**
+	   For all parameters specified in this structure that can
+	   also be set with environment variables, by default,
+	   StarPU chooses the value of the environment variable
+	   against the value set in starpu_conf. Setting the parameter
+	   starpu_conf::precedence_over_environment_variables to 1 allows to give precedence
+	   to the value set in the structure over the environment
+	   variable.
+	 */
+	int precedence_over_environment_variables;
+
+	/**
 	   Number of CPU cores that StarPU can use. This can also be
 	   Number of CPU cores that StarPU can use. This can also be
 	   specified with the environment variable \ref STARPU_NCPU.
 	   specified with the environment variable \ref STARPU_NCPU.
 	   (default = -1)
 	   (default = -1)

+ 246 - 15
include/starpu_bitmap.h

@@ -18,6 +18,12 @@
 #ifndef __STARPU_BITMAP_H__
 #ifndef __STARPU_BITMAP_H__
 #define __STARPU_BITMAP_H__
 #define __STARPU_BITMAP_H__
 
 
+#include <starpu_util.h>
+#include <starpu_config.h>
+
+#include <string.h>
+#include <stdlib.h>
+
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C"
 extern "C"
 {
 {
@@ -28,43 +34,268 @@ extern "C"
    @brief This is the interface for the bitmap utilities provided by StarPU.
    @brief This is the interface for the bitmap utilities provided by StarPU.
    @{
    @{
  */
  */
+#ifndef _STARPU_LONG_BIT
+#define _STARPU_LONG_BIT ((int)(sizeof(unsigned long) * 8))
+#endif
+
+#define _STARPU_BITMAP_SIZE ((STARPU_NMAXWORKERS - 1)/_STARPU_LONG_BIT) + 1
 
 
 /** create a empty starpu_bitmap */
 /** create a empty starpu_bitmap */
-struct starpu_bitmap *starpu_bitmap_create(void) STARPU_ATTRIBUTE_MALLOC;
+static inline struct starpu_bitmap *starpu_bitmap_create(void) STARPU_ATTRIBUTE_MALLOC;
+/** zero a starpu_bitmap */
+static inline void starpu_bitmap_init(struct starpu_bitmap *b);
 /** free \p b */
 /** free \p b */
-void starpu_bitmap_destroy(struct starpu_bitmap *b);
+static inline void starpu_bitmap_destroy(struct starpu_bitmap *b);
 
 
 /** set bit \p e in \p b */
 /** set bit \p e in \p b */
-void starpu_bitmap_set(struct starpu_bitmap *b, int e);
+static inline void starpu_bitmap_set(struct starpu_bitmap *b, int e);
 /** unset bit \p e in \p b */
 /** unset bit \p e in \p b */
-void starpu_bitmap_unset(struct starpu_bitmap *b, int e);
+static inline void starpu_bitmap_unset(struct starpu_bitmap *b, int e);
 /** unset all bits in \p b */
 /** unset all bits in \p b */
-void starpu_bitmap_unset_all(struct starpu_bitmap *b);
+static inline void starpu_bitmap_unset_all(struct starpu_bitmap *b);
 
 
 /** return true iff bit \p e is set in \p b */
 /** return true iff bit \p e is set in \p b */
-int starpu_bitmap_get(struct starpu_bitmap *b, int e);
+static inline int starpu_bitmap_get(struct starpu_bitmap *b, int e);
 /** Basically compute \c starpu_bitmap_unset_all(\p a) ; \p a = \p b & \p c; */
 /** Basically compute \c starpu_bitmap_unset_all(\p a) ; \p a = \p b & \p c; */
-void starpu_bitmap_unset_and(struct starpu_bitmap *a, struct starpu_bitmap *b, struct starpu_bitmap *c);
+static inline void starpu_bitmap_unset_and(struct starpu_bitmap *a, struct starpu_bitmap *b, struct starpu_bitmap *c);
 /** Basically compute \p a |= \p b */
 /** Basically compute \p a |= \p b */
-void starpu_bitmap_or(struct starpu_bitmap *a, struct starpu_bitmap *b);
+static inline void starpu_bitmap_or(struct starpu_bitmap *a, struct starpu_bitmap *b);
 /** return 1 iff \p e is set in \p b1 AND \p e is set in \p b2 */
 /** return 1 iff \p e is set in \p b1 AND \p e is set in \p b2 */
-int starpu_bitmap_and_get(struct starpu_bitmap *b1, struct starpu_bitmap *b2, int e);
+static inline int starpu_bitmap_and_get(struct starpu_bitmap *b1, struct starpu_bitmap *b2, int e);
 /** return the number of set bits in \p b */
 /** return the number of set bits in \p b */
-int starpu_bitmap_cardinal(struct starpu_bitmap *b);
+static inline int starpu_bitmap_cardinal(struct starpu_bitmap *b);
 
 
 /** return the index of the first set bit of \p b, -1 if none */
 /** return the index of the first set bit of \p b, -1 if none */
-int starpu_bitmap_first(struct starpu_bitmap *b);
+static inline int starpu_bitmap_first(struct starpu_bitmap *b);
 /** return the position of the last set bit of \p b, -1 if none */
 /** return the position of the last set bit of \p b, -1 if none */
-int starpu_bitmap_last(struct starpu_bitmap *b);
+static inline int starpu_bitmap_last(struct starpu_bitmap *b);
 /** return the position of set bit right after \p e in \p b, -1 if none */
 /** return the position of set bit right after \p e in \p b, -1 if none */
-int starpu_bitmap_next(struct starpu_bitmap *b, int e);
+static inline int starpu_bitmap_next(struct starpu_bitmap *b, int e);
 /** todo */
 /** todo */
-int starpu_bitmap_has_next(struct starpu_bitmap *b, int e);
+static inline int starpu_bitmap_has_next(struct starpu_bitmap *b, int e);
 
 
 /** @} */
 /** @} */
 
 
-#ifdef __cplusplus
+struct starpu_bitmap
+{
+	unsigned long bits[_STARPU_BITMAP_SIZE];
+	int cardinal;
+};
+
+#ifdef _STARPU_DEBUG_BITMAP
+static int _starpu_check_bitmap(struct starpu_bitmap *b)
+{
+	int card = b->cardinal;
+	int i = starpu_bitmap_first(b);
+	int j;
+	for(j = 0; j < card; j++)
+	{
+		if(i == -1)
+			return 0;
+		int tmp = starpu_bitmap_next(b,i);
+		if(tmp == i)
+			return 0;
+		i = tmp;
+	}
+	if(i != -1)
+		return 0;
+	return 1;
 }
 }
+#else
+#define _starpu_check_bitmap(b) 1
 #endif
 #endif
 
 
+static int _starpu_count_bit_static(unsigned long e)
+{
+#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__) >= 4)
+	return __builtin_popcountl(e);
+#else
+	int c = 0;
+	while(e)
+	{
+		c += e&1;
+		e >>= 1;
+	}
+	return c;
 #endif
 #endif
+}
+
+static inline struct starpu_bitmap *starpu_bitmap_create()
+{
+	return (struct starpu_bitmap *) calloc(1, sizeof(struct starpu_bitmap));
+}
+
+static inline void starpu_bitmap_init(struct starpu_bitmap *b)
+{
+	memset(b, 0, sizeof(*b));
+}
+
+static inline void starpu_bitmap_destroy(struct starpu_bitmap * b)
+{
+	free(b);
+}
+
+static inline void starpu_bitmap_set(struct starpu_bitmap * b, int e)
+{
+	if(!starpu_bitmap_get(b, e))
+		b->cardinal++;
+	else
+		return;
+	STARPU_ASSERT(e/_STARPU_LONG_BIT < _STARPU_BITMAP_SIZE);
+	b->bits[e/_STARPU_LONG_BIT] |= (1ul << (e%_STARPU_LONG_BIT));
+	STARPU_ASSERT(_starpu_check_bitmap(b));
+}
+static inline void starpu_bitmap_unset(struct starpu_bitmap *b, int e)
+{
+	if(starpu_bitmap_get(b, e))
+		b->cardinal--;
+	else
+		return;
+	STARPU_ASSERT(e/_STARPU_LONG_BIT < _STARPU_BITMAP_SIZE);
+	if(e / _STARPU_LONG_BIT > _STARPU_BITMAP_SIZE)
+		return;
+	b->bits[e/_STARPU_LONG_BIT] &= ~(1ul << (e%_STARPU_LONG_BIT));
+	STARPU_ASSERT(_starpu_check_bitmap(b));
+}
+
+static inline void starpu_bitmap_unset_all(struct starpu_bitmap * b)
+{
+	memset(b->bits, 0, _STARPU_BITMAP_SIZE * sizeof(unsigned long));
+}
+
+static inline void starpu_bitmap_unset_and(struct starpu_bitmap * a, struct starpu_bitmap * b, struct starpu_bitmap * c)
+{
+	a->cardinal = 0;
+	int i;
+	for(i = 0; i < _STARPU_BITMAP_SIZE; i++)
+	{
+		a->bits[i] = b->bits[i] & c->bits[i];
+		a->cardinal += _starpu_count_bit_static(a->bits[i]);
+	}
+}
+
+static inline int starpu_bitmap_get(struct starpu_bitmap * b, int e)
+{
+	STARPU_ASSERT(e / _STARPU_LONG_BIT < _STARPU_BITMAP_SIZE);
+	if(e / _STARPU_LONG_BIT >= _STARPU_BITMAP_SIZE)
+		return 0;
+	return (b->bits[e/_STARPU_LONG_BIT] & (1ul << (e%_STARPU_LONG_BIT))) ?
+		1:
+		0;
+}
+
+static inline void starpu_bitmap_or(struct starpu_bitmap * a, struct starpu_bitmap * b)
+{
+	int i;
+	a->cardinal = 0;
+	for(i = 0; i < _STARPU_BITMAP_SIZE; i++)
+	{
+		a->bits[i] |= b->bits[i];
+		a->cardinal += _starpu_count_bit_static(a->bits[i]);
+	}
+}
+
+
+static inline int starpu_bitmap_and_get(struct starpu_bitmap * b1, struct starpu_bitmap * b2, int e)
+{
+	return starpu_bitmap_get(b1,e) && starpu_bitmap_get(b2,e);
+}
+
+static inline int starpu_bitmap_cardinal(struct starpu_bitmap * b)
+{
+	return b->cardinal;
+}
+
+
+static inline int _starpu_get_first_bit_rank(unsigned long ms)
+{
+	STARPU_ASSERT(ms != 0);
+#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
+	return __builtin_ffsl(ms) - 1;
+#else
+	unsigned long m = 1ul;
+	int i = 0;
+	while(!(m&ms))
+		i++,m<<=1;
+	return i;
+#endif
+}
+
+static inline int _starpu_get_last_bit_rank(unsigned long l)
+{
+	STARPU_ASSERT(l != 0);
+#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
+	return 8*sizeof(l) - __builtin_clzl(l);
+#else
+	int ibit = _STARPU_LONG_BIT - 1;
+	while((!(1ul << ibit)) & l)
+		ibit--;
+	STARPU_ASSERT(ibit >= 0);
+	return ibit;
+#endif
+}
+
+static inline int starpu_bitmap_first(struct starpu_bitmap * b)
+{
+	int i = 0;
+	while(i < _STARPU_BITMAP_SIZE && !b->bits[i])
+		i++;
+	if( i == _STARPU_BITMAP_SIZE)
+		return -1;
+	int nb_long = i;
+	unsigned long ms = b->bits[i];
+
+	return (nb_long * _STARPU_LONG_BIT) + _starpu_get_first_bit_rank(ms);
+}
+
+static inline int starpu_bitmap_has_next(struct starpu_bitmap * b, int e)
+{
+	int nb_long = (e+1) / _STARPU_LONG_BIT;
+	int nb_bit = (e+1) % _STARPU_LONG_BIT;
+	unsigned long mask = (~0ul) << nb_bit;
+	if(b->bits[nb_long] & mask)
+		return 1;
+	for(nb_long++; nb_long < _STARPU_BITMAP_SIZE; nb_long++)
+		if(b->bits[nb_long])
+			return 1;
+	return 0;
+}
+
+static inline int starpu_bitmap_last(struct starpu_bitmap * b)
+{
+	if(b->cardinal == 0)
+		return -1;
+	int ilong;
+	for(ilong = _STARPU_BITMAP_SIZE - 1; ilong >= 0; ilong--)
+	{
+		if(b->bits[ilong])
+			break;
+	}
+	STARPU_ASSERT(ilong >= 0);
+	unsigned long l = b->bits[ilong];
+	return ilong * _STARPU_LONG_BIT + _starpu_get_last_bit_rank(l);
+}
+
+static inline int starpu_bitmap_next(struct starpu_bitmap *b, int e)
+{
+	int nb_long = e / _STARPU_LONG_BIT;
+	int nb_bit = e % _STARPU_LONG_BIT;
+	unsigned long rest = nb_bit == _STARPU_LONG_BIT - 1 ? 0 : (~0ul << (nb_bit + 1)) & b->bits[nb_long];
+	if(nb_bit != (_STARPU_LONG_BIT - 1) && rest)
+	{
+		int i = _starpu_get_first_bit_rank(rest);
+		STARPU_ASSERT(i >= 0 && i < _STARPU_LONG_BIT);
+		return (nb_long * _STARPU_LONG_BIT) + i;
+	}
+
+	for(nb_long++;nb_long < _STARPU_BITMAP_SIZE; nb_long++)
+		if(b->bits[nb_long])
+			return nb_long * _STARPU_LONG_BIT + _starpu_get_first_bit_rank(b->bits[nb_long]);
+	return -1;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STARPU_BITMAP_H__ */

+ 0 - 1
include/starpu_config.h.in

@@ -118,7 +118,6 @@
 #undef STARPU_USE_MPI
 #undef STARPU_USE_MPI
 #undef STARPU_USE_MPI_MPI
 #undef STARPU_USE_MPI_MPI
 #undef STARPU_USE_MPI_NMAD
 #undef STARPU_USE_MPI_NMAD
-#undef STARPU_USE_MPI_FT
 
 
 #undef STARPU_ATLAS
 #undef STARPU_ATLAS
 #undef STARPU_GOTO
 #undef STARPU_GOTO

+ 3 - 3
include/starpu_sched_component.h

@@ -69,14 +69,14 @@ struct starpu_sched_component
 	/** The tree containing the component*/
 	/** The tree containing the component*/
 	struct starpu_sched_tree *tree;
 	struct starpu_sched_tree *tree;
 	/** set of underlying workers */
 	/** set of underlying workers */
-	struct starpu_bitmap *workers;
+	struct starpu_bitmap workers;
 	/**
 	/**
 	   subset of starpu_sched_component::workers that is currently available in the context
 	   subset of starpu_sched_component::workers that is currently available in the context
 	   The push method should take this value into account, it is set with:
 	   The push method should take this value into account, it is set with:
 	   component->workers UNION tree->workers UNION
 	   component->workers UNION tree->workers UNION
 	   component->child[i]->workers_in_ctx iff exist x such as component->children[i]->parents[x] == component
 	   component->child[i]->workers_in_ctx iff exist x such as component->children[i]->parents[x] == component
 	*/
 	*/
-	struct starpu_bitmap *workers_in_ctx;
+	struct starpu_bitmap workers_in_ctx;
 	/** private data */
 	/** private data */
 	void *data;
 	void *data;
 	char *name;
 	char *name;
@@ -188,7 +188,7 @@ struct starpu_sched_tree
 	/**
 	/**
 	   set of workers available in this context, this value is used to mask workers in modules
 	   set of workers available in this context, this value is used to mask workers in modules
 	*/
 	*/
-	struct starpu_bitmap *workers;
+	struct starpu_bitmap workers;
 	/**
 	/**
 	   context id of the scheduler
 	   context id of the scheduler
 	*/
 	*/

+ 3 - 1
include/starpu_task.h

@@ -538,7 +538,9 @@ struct starpu_codelet
 
 
 	/**
 	/**
 	   Optional color of the codelet. This can be useful for
 	   Optional color of the codelet. This can be useful for
-	   debugging purposes.
+	   debugging purposes. Value 0 acts like if this field wasn't specified.
+	   Color representation is hex triplet (for example: 0xff0000 is red,
+	   0x0000ff is blue, 0xffa500 is orange, ...).
 	*/
 	*/
 	unsigned color;
 	unsigned color;
 
 

+ 0 - 8
julia/Makefile

@@ -1,8 +0,0 @@
-SRCS=src/jlstarpu_task_submit.c src/jlstarpu_simple_functions.c src/jlstarpu_data_handles.c
-CC = gcc
-CFLAGS += $(shell pkg-config --cflags starpu-1.3)
-LDFLAGS += $(shell pkg-config --libs starpu-1.3)
-
-lib/libjlstarpu_c_wrapper.so: ${SRCS}
-	test -d lib || mkdir lib
-	$(CC) -O3 -shared -fPIC $(CFLAGS) $^ -o $@ $(LDFLAGS)

+ 123 - 0
julia/Manifest.toml

@@ -1,4 +1,127 @@
 # This file is machine-generated - editing it directly is not advised
 # This file is machine-generated - editing it directly is not advised
 
 
+[[Base64]]
+uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
+
+[[CBinding]]
+deps = ["Libdl", "Random", "Test"]
+git-tree-sha1 = "6f457df38ae2ba239d5e43b80493bb907de826b2"
+repo-rev = "655e9862947d17423f2fb91ea1014e1cb73c1be1"
+repo-url = "https://github.com/analytech-solutions/CBinding.jl.git"
+uuid = "d43a6710-96b8-4a2d-833c-c424785e5374"
+version = "0.8.1"
+
+[[CEnum]]
+git-tree-sha1 = "62847acab40e6855a9b5905ccb99c2b5cf6b3ebb"
+uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
+version = "0.2.0"
+
+[[Clang]]
+deps = ["CEnum", "DataStructures", "LLVM_jll", "Libdl"]
+git-tree-sha1 = "45013227beea038ecc17e8c07cd7c7b05ed26067"
+repo-rev = "master"
+repo-url = "https://github.com/phuchant/Clang.jl.git"
+uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31"
+version = "0.11.0"
+
+[[DataStructures]]
+deps = ["InteractiveUtils", "OrderedCollections"]
+git-tree-sha1 = "6166ecfaf2b8bbf2b68d791bc1d54501f345d314"
+uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
+version = "0.17.15"
+
+[[Dates]]
+deps = ["Printf"]
+uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
+
+[[Distributed]]
+deps = ["Random", "Serialization", "Sockets"]
+uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
+
+[[InteractiveUtils]]
+deps = ["Markdown"]
+uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
+
+[[LLVM_jll]]
+deps = ["Libdl", "Pkg"]
+git-tree-sha1 = "c037c15f36c185c613e5b2589d5833720dab3f76"
+uuid = "86de99a1-58d6-5da7-8064-bd56ce2e322c"
+version = "8.0.1+0"
+
+[[LibGit2]]
+deps = ["Printf"]
+uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
+
 [[Libdl]]
 [[Libdl]]
 uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
 uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
+
+[[LinearAlgebra]]
+deps = ["Libdl"]
+uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
+
+[[Logging]]
+uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
+
+[[Markdown]]
+deps = ["Base64"]
+uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
+
+[[OrderedCollections]]
+git-tree-sha1 = "12ce190210d278e12644bcadf5b21cbdcf225cd3"
+uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
+version = "1.2.0"
+
+[[Pkg]]
+deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
+uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
+
+[[Printf]]
+deps = ["Unicode"]
+uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
+
+[[REPL]]
+deps = ["InteractiveUtils", "Markdown", "Sockets"]
+uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
+
+[[Random]]
+deps = ["Serialization"]
+uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
+
+[[RecipesBase]]
+git-tree-sha1 = "54f8ceb165a0f6d083f0d12cb4996f5367c6edbc"
+uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
+version = "1.0.1"
+
+[[SHA]]
+uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
+
+[[Serialization]]
+uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
+
+[[Sockets]]
+uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
+
+[[SparseArrays]]
+deps = ["LinearAlgebra", "Random"]
+uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
+
+[[Statistics]]
+deps = ["LinearAlgebra", "SparseArrays"]
+uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
+
+[[Test]]
+deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
+uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
+
+[[ThreadPools]]
+deps = ["Printf", "RecipesBase", "Statistics"]
+git-tree-sha1 = "48e35097fdc6d1706a9b90c5eee62f54402aa62c"
+uuid = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
+version = "1.1.0"
+
+[[UUIDs]]
+deps = ["Random", "SHA"]
+uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
+
+[[Unicode]]
+uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

+ 3 - 0
julia/Project.toml

@@ -4,4 +4,7 @@ authors = ["barthou "]
 version = "0.1.0"
 version = "0.1.0"
 
 
 [deps]
 [deps]
+CBinding = "d43a6710-96b8-4a2d-833c-c424785e5374"
+Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
 Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
 Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
+ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"

+ 0 - 2
julia/REQUIRE

@@ -1,2 +0,0 @@
-julia 1.0
-Libdl

+ 19 - 0
julia/examples/axpy/axpy.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh axpy/axpy.jl
+

+ 1 - 0
julia/examples/black_scholes/black_scholes.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/black_scholes/black_scholes.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 import Libdl
 import Libdl
 using StarPU
 using StarPU
 
 

+ 93 - 0
julia/examples/callback/callback.c

@@ -0,0 +1,93 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2009-2020  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.
+ */
+
+/*
+ * This is an example of using a callback. We submit a task, whose callback
+ * submits another task (without any callback).
+ */
+
+#include <starpu.h>
+
+#define FPRINTF(ofile, fmt, ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ## __VA_ARGS__); }} while(0)
+
+starpu_data_handle_t handle;
+
+void cpu_codelet(void *descr[], void *_args)
+{
+	(void)_args;
+	int *val = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
+
+	*val += 1;
+}
+
+struct starpu_codelet cl =
+{
+	.modes = { STARPU_RW },
+	.cpu_funcs = {cpu_codelet},
+	.cpu_funcs_name = {"cpu_codelet"},
+	.nbuffers = 1,
+	.name = "callback"
+};
+
+void callback_func(void *callback_arg)
+{
+	int ret;
+
+	(void)callback_arg;
+
+	struct starpu_task *task = starpu_task_create();
+	task->cl = &cl;
+	task->handles[0] = handle;
+
+	ret = starpu_task_submit(task);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+}
+
+int main(void)
+{
+	int v=40;
+	int ret;
+
+	ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
+
+	starpu_variable_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)&v, sizeof(int));
+
+	struct starpu_task *task = starpu_task_create();
+	task->cl = &cl;
+	task->callback_func = callback_func;
+	task->callback_arg = NULL;
+	task->handles[0] = handle;
+
+	ret = starpu_task_submit(task);
+	if (ret == -ENODEV) goto enodev;
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
+
+	starpu_task_wait_for_all();
+	starpu_data_unregister(handle);
+
+	FPRINTF(stderr, "v -> %d\n", v);
+
+	starpu_shutdown();
+
+	return (v == 42) ? 0 : 1;
+
+enodev:
+	starpu_shutdown();
+	return 77;
+}

+ 19 - 0
julia/examples/callback/callback.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh callback/callback.jl
+

+ 20 - 0
julia/examples/check_deps/check_deps.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh check_deps/check_deps.jl
+
+

+ 18 - 0
julia/examples/dependency/end_dep.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh dependency/end_dep.jl

+ 18 - 0
julia/examples/dependency/tag_dep.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh dependency/tag_dep.jl

+ 18 - 0
julia/examples/dependency/task_dep.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh dependency/task_dep.jl

+ 4 - 6
julia/examples/mandelbrot/Makefile

@@ -21,8 +21,6 @@ ifneq ($(ENABLE_CUDA),yes)
 	CUDA_OBJECTS:=
 	CUDA_OBJECTS:=
 endif
 endif
 
 
-LIBPATH=${PWD}/../StarPU.jl/lib
-
 all: ${EXTERNLIB}
 all: ${EXTERNLIB}
 
 
 mandelbrot: mandelbrot.c cpu_mandelbrot.o #gpu_mandelbrot.o
 mandelbrot: mandelbrot.c cpu_mandelbrot.o #gpu_mandelbrot.o
@@ -47,12 +45,12 @@ clean:
 
 
 # Performance Tests
 # Performance Tests
 cstarpu.dat: mandelbrot
 cstarpu.dat: mandelbrot
-	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./mandelbrot -0.800671 -0.158392 32 32 4096 4 > $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./mandelbrot > $@
 julia_generatedc.dat:
 julia_generatedc.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot.jl $@
 julia_native.dat:
 julia_native.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot_native.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot_native.jl $@
 julia_calllib.dat: ${EXTERNLIB}
 julia_calllib.dat: ${EXTERNLIB}
-	LD_LIBRARY_PATH+=${LIBPATH} JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot.jl julia_calllib.dat
+	JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mandelbrot.jl julia_calllib.dat
 
 
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat

+ 8 - 10
julia/src/jlstarpu_simple_functions.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2018                                     Alexis Juven
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -13,14 +13,12 @@
  *
  *
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
-#include "jlstarpu.h"
-
-int jlstarpu_init(void)
+struct params
 {
 {
-	return starpu_init(NULL);
-}
+        double centerr;
+        double centeri;
+        long offset;
+        long dim;
+};
+
 
 
-void jlstarpu_set_to_zero(void * ptr, unsigned int size)
-{
-	memset(ptr, 0, size);
-}

+ 78 - 56
julia/examples/mandelbrot/mandelbrot.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -13,36 +14,35 @@
  *
  *
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
+
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <starpu.h>
 #include <starpu.h>
+#include "cpu_mandelbrot.h"
 
 
 void cpu_mandelbrot(void **, void *);
 void cpu_mandelbrot(void **, void *);
 void gpu_mandelbrot(void **, void *);
 void gpu_mandelbrot(void **, void *);
 
 
 static struct starpu_perfmodel model =
 static struct starpu_perfmodel model =
 {
 {
-		.type = STARPU_HISTORY_BASED,
-		.symbol = "history_perf"
+	.type = STARPU_HISTORY_BASED,
+	.symbol = "history_perf"
 };
 };
 
 
 static struct starpu_codelet cl =
 static struct starpu_codelet cl =
 {
 {
-	.cpu_funcs = {cpu_mandelbrot},
+ 	.cpu_funcs = {cpu_mandelbrot},
 	//.cuda_funcs = {gpu_mandelbrot},
 	//.cuda_funcs = {gpu_mandelbrot},
-	.nbuffers = 2,
-	.modes = {STARPU_W, STARPU_R},
+	.nbuffers = 1,
+	.modes = {STARPU_W},
 	.model = &model
 	.model = &model
 };
 };
 
 
-
-void mandelbrot_with_starpu(long long *pixels, float *params, long long dim, long long nslicesx)
+void mandelbrot_with_starpu(long long *pixels, struct params *p, long long dim, long long nslicesx)
 {
 {
 	starpu_data_handle_t pixels_handle;
 	starpu_data_handle_t pixels_handle;
-	starpu_data_handle_t params_handle;
 
 
 	starpu_matrix_data_register(&pixels_handle, STARPU_MAIN_RAM, (uintptr_t)pixels, dim, dim, dim, sizeof(long long));
 	starpu_matrix_data_register(&pixels_handle, STARPU_MAIN_RAM, (uintptr_t)pixels, dim, dim, dim, sizeof(long long));
-	starpu_matrix_data_register(&params_handle, STARPU_MAIN_RAM, (uintptr_t)params, 4*nslicesx, 4*nslicesx, 1, sizeof(float));
 
 
 	struct starpu_data_filter horiz =
 	struct starpu_data_filter horiz =
 	{
 	{
@@ -51,90 +51,95 @@ void mandelbrot_with_starpu(long long *pixels, float *params, long long dim, lon
 	};
 	};
 
 
 	starpu_data_partition(pixels_handle, &horiz);
 	starpu_data_partition(pixels_handle, &horiz);
-	starpu_data_partition(params_handle, &horiz);
 
 
 	long long taskx;
 	long long taskx;
 
 
-	for (taskx = 0; taskx < nslicesx; taskx++){
+	for (taskx = 0; taskx < nslicesx; taskx++)
+	{
 		struct starpu_task *task = starpu_task_create();
 		struct starpu_task *task = starpu_task_create();
 
 
 		task->cl = &cl;
 		task->cl = &cl;
 		task->handles[0] = starpu_data_get_child(pixels_handle, taskx);
 		task->handles[0] = starpu_data_get_child(pixels_handle, taskx);
-		task->handles[1] = starpu_data_get_child(params_handle, taskx);
+		task->cl_arg = p;
+		task->cl_arg_size = sizeof(*p);
 		if (starpu_task_submit(task)!=0) fprintf(stderr,"submit task error\n");
 		if (starpu_task_submit(task)!=0) fprintf(stderr,"submit task error\n");
 	}
 	}
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 
 
 	starpu_data_unpartition(pixels_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(pixels_handle, STARPU_MAIN_RAM);
-	starpu_data_unpartition(params_handle, STARPU_MAIN_RAM);
-
 	starpu_data_unregister(pixels_handle);
 	starpu_data_unregister(pixels_handle);
-	starpu_data_unregister(params_handle);
 }
 }
 
 
 void pixels2img(long long *pixels, long long width, long long height, const char *filename)
 void pixels2img(long long *pixels, long long width, long long height, const char *filename)
 {
 {
-  FILE *fp = fopen(filename, "w");
-  if (!fp)
-    return;
+	FILE *fp = fopen(filename, "w");
+	if (!fp)
+		return;
 
 
-  int MAPPING[16][3] = {{66,30,15},{25,7,26},{9,1,47},{4,4,73},{0,7,100},{12,44,138},{24,82,177},{57,125,209},{134,181,229},{211,236,248},{241,233,191},{248,201,95},{255,170,0},{204,128,0},{153,87,0},{106,52,3}};
+	int MAPPING[16][3] = {{66,30,15},{25,7,26},{9,1,47},{4,4,73},{0,7,100},{12,44,138},{24,82,177},{57,125,209},{134,181,229},{211,236,248},{241,233,191},{248,201,95},{255,170,0},{204,128,0},{153,87,0},{106,52,3}};
 
 
-  fprintf(fp, "P3\n%lld %lld\n255\n", width, height);
-  long long i, j;
-  for (i = 0; i < height; ++i) {
-    for (j = 0; j < width; ++j) {
-      fprintf(fp, "%d %d %d ", MAPPING[pixels[j*width+i]][0], MAPPING[pixels[j*width+i]][1], MAPPING[pixels[j*width+i]][2]);
-    }
-  }
+	fprintf(fp, "P3\n%lld %lld\n255\n", width, height);
+	long long i, j;
+	for (i = 0; i < height; ++i)
+	{
+		for (j = 0; j < width; ++j)
+		{
+			fprintf(fp, "%d %d %d ", MAPPING[pixels[j*width+i]][0], MAPPING[pixels[j*width+i]][1], MAPPING[pixels[j*width+i]][2]);
+		}
+	}
 
 
-  fclose(fp);
+	fclose(fp);
 }
 }
 
 
-double min_times(double cr, double ci, long long dim, long long nslices)
+double min_times(double cr, double ci, long long dim, long long nslices, int gen_images)
 {
 {
 	long long *pixels = calloc(dim*dim, sizeof(long long));
 	long long *pixels = calloc(dim*dim, sizeof(long long));
-	float *params = calloc(4*nslices, sizeof(float));
+	struct params *p = calloc(nslices, sizeof(struct params));
 
 
 	double t_min = 0;
 	double t_min = 0;
 	long long i;
 	long long i;
 
 
-	for (i=0; i<nslices; i++) {
-		params[4*i+0] = cr;
-		params[4*i+1] = ci;
-		params[4*i+2] = i*dim/nslices;
-		params[4*i+3] = dim;
+	for (i=0; i<nslices; i++)
+	{
+		p[i].centerr = cr;
+		p[i].centeri = ci;
+		p[i].offset = i*dim/nslices;
+		p[i].dim = dim;
 	}
 	}
 
 
 	double start, stop, exec_t;
 	double start, stop, exec_t;
-	for (i = 0; i < 10; i++){
+	for (i = 0; i < 10; i++)
+	{
 		start = starpu_timing_now(); // starpu_timing_now() gives the time in microseconds.
 		start = starpu_timing_now(); // starpu_timing_now() gives the time in microseconds.
-		mandelbrot_with_starpu(pixels, params, dim, nslices);
+		mandelbrot_with_starpu(pixels, &p[i], dim, nslices);
 		stop = starpu_timing_now();
 		stop = starpu_timing_now();
 		exec_t = (stop-start)*1.e3;
 		exec_t = (stop-start)*1.e3;
 		if (t_min==0 || t_min>exec_t)
 		if (t_min==0 || t_min>exec_t)
 		  t_min = exec_t;
 		  t_min = exec_t;
 	}
 	}
 
 
-	char filename[64];
-	snprintf(filename, 64, "out%lld.ppm", dim);
-	pixels2img(pixels,dim,dim,filename);
+	if (gen_images == 1)
+	{
+		char filename[64];
+		snprintf(filename, 64, "out%lld.ppm", dim);
+		pixels2img(pixels,dim,dim,filename);
+	}
 
 
 	free(pixels);
 	free(pixels);
-	free(params);
+	free(p);
 
 
 	return t_min;
 	return t_min;
 }
 }
 
 
-void display_times(double cr, double ci, long long start_dim, long long step_dim, long long stop_dim, long long nslices)
+void display_times(double cr, double ci, long long start_dim, long long step_dim, long long stop_dim, long long nslices, int gen_images)
 {
 {
-
 	long long dim;
 	long long dim;
 
 
-	for (dim = start_dim; dim <= stop_dim; dim += step_dim) {
+	for (dim = start_dim; dim <= stop_dim; dim += step_dim)
+	{
 		printf("Dimension: %lld...\n", dim);
 		printf("Dimension: %lld...\n", dim);
-		double res = min_times(cr, ci, dim, nslices);
+		double res = min_times(cr, ci, dim, nslices, gen_images);
 		res = res / dim / dim; // time per pixel
 		res = res / dim / dim; // time per pixel
 		printf("%lld %lf\n", dim, res);
 		printf("%lld %lf\n", dim, res);
 	}
 	}
@@ -142,23 +147,40 @@ void display_times(double cr, double ci, long long start_dim, long long step_dim
 
 
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
-	if (argc != 7){
-		printf("Usage: %s cr ci start_dim step_dim stop_dim nslices(must divide dims)\n", argv[0]);
-		return 1;
+	double cr, ci;
+	long long start_dim, step_dim, stop_dim, nslices;
+	int gen_images;
+
+	if (argc != 8)
+	{
+		printf("Usage: %s cr ci start_dim step_dim stop_dim nslices(must divide dims) gen_images. Using default parameters\n", argv[0]);
+
+		cr = -0.800671;
+		ci = -0.158392;
+		start_dim = 32;
+		step_dim = 32;
+		stop_dim = 512;
+		nslices = 4;
+		gen_images = 0;
 	}
 	}
-	if (starpu_init(NULL) != EXIT_SUCCESS){
+	else
+	{
+		cr = (float) atof(argv[1]);
+		ci = (float) atof(argv[2]);
+		start_dim = atoll(argv[3]);
+		step_dim = atoll(argv[4]);
+		stop_dim = atoll(argv[5]);
+		nslices = atoll(argv[6]);
+		gen_images = atoi(argv[7]);
+	}
+
+	if (starpu_init(NULL) != EXIT_SUCCESS)
+	{
 		fprintf(stderr, "ERROR\n");
 		fprintf(stderr, "ERROR\n");
 		return 77;
 		return 77;
 	}
 	}
 
 
-	double cr = (float) atof(argv[1]);
-	double ci = (float) atof(argv[2]);
-	long long start_dim = atoll(argv[3]);
-	long long step_dim = atoll(argv[4]);
-	long long stop_dim = atoll(argv[5]);
-	long long nslices = atoll(argv[6]);
-
-	display_times(cr, ci, start_dim, step_dim, stop_dim, nslices);
+	display_times(cr, ci, start_dim, step_dim, stop_dim, nslices, gen_images);
 
 
 	starpu_shutdown();
 	starpu_shutdown();
 
 

+ 21 - 0
julia/examples/mandelbrot/mandelbrot.sh

@@ -0,0 +1,21 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh mandelbrot/mandelbrot.jl
+$(dirname $0)/../execute.sh mandelbrot/mandelbrot_native.jl
+$(dirname $0)/../execute.sh -calllib mandelbrot/cpu_mandelbrot.c mandelbrot/mandelbrot.jl
+

+ 22 - 5
julia/examples/mandelbrot/mandelbrot_native.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 using LinearAlgebra
 using LinearAlgebra
 
 
 function mandelbrot(pixels, centerr ::Float64, centeri ::Float64, offset ::Int64, dim ::Int64) :: Nothing
 function mandelbrot(pixels, centerr ::Float64, centeri ::Float64, offset ::Int64, dim ::Int64) :: Nothing
@@ -68,7 +83,7 @@ function pixels2img(pixels ::Matrix{Int64}, width ::Int64, height ::Int64, filen
     end
     end
 end
 end
 
 
-function min_times(cr ::Float64, ci ::Float64, dim ::Int64, nslices ::Int64)
+function min_times(cr ::Float64, ci ::Float64, dim ::Int64, nslices ::Int64, gen_images)
     tmin=0;
     tmin=0;
 
 
     pixels ::Matrix{Int64} = zeros(dim, dim)
     pixels ::Matrix{Int64} = zeros(dim, dim)
@@ -80,17 +95,19 @@ function min_times(cr ::Float64, ci ::Float64, dim ::Int64, nslices ::Int64)
             tmin=t
             tmin=t
         end
         end
     end
     end
-    pixels2img(pixels,dim,dim,"out$(dim).ppm")
+    if (gen_images == 1)
+        pixels2img(pixels,dim,dim,"out$(dim).ppm")
+    end
     return tmin
     return tmin
 end
 end
 
 
-function display_time(cr ::Float64, ci ::Float64, start_dim ::Int64, step_dim ::Int64, stop_dim ::Int64, nslices ::Int64)
+function display_time(cr ::Float64, ci ::Float64, start_dim ::Int64, step_dim ::Int64, stop_dim ::Int64, nslices ::Int64, gen_images)
     for dim in (start_dim : step_dim : stop_dim)
     for dim in (start_dim : step_dim : stop_dim)
-        res = min_times(cr, ci, dim, nslices)
+        res = min_times(cr, ci, dim, nslices, gen_images)
         res=res/dim/dim; # time per pixel
         res=res/dim/dim; # time per pixel
         println("$(dim) $(res)")
         println("$(dim) $(res)")
     end
     end
 end
 end
 
 
 
 
-display_time(-0.800671,-0.158392,32,32,4096,4)
+display_time(-0.800671,-0.158392,32,32,512,4, 0)

+ 11 - 15
julia/examples/mult/Makefile

@@ -1,9 +1,6 @@
-# tile size. Should be changed in mult.jl as well
-STRIDE=72
-
 # ICC compiler
 # ICC compiler
 #CC =icc
 #CC =icc
-#CFLAGS=-restrict -unroll4 -ipo -falign-loops=256 -O3 -DSTRIDE=${STRIDE} -march=native $(shell pkg-config --cflags starpu-1.3)
+#CFLAGS=-restrict -unroll4 -ipo -falign-loops=256 -O3 -march=native $(shell pkg-config --cflags starpu-1.3)
 # GCC compiler
 # GCC compiler
 CC=gcc
 CC=gcc
 NVCC=nvcc
 NVCC=nvcc
@@ -14,7 +11,7 @@ ifeq ($(ENABLE_CUDA),yes)
         LD := ${NVCC}
         LD := ${NVCC}
 endif
 endif
 
 
-CFLAGS = -O3 -g -DSTRIDE=${STRIDE} $(shell pkg-config --cflags starpu-1.3)
+CFLAGS = -O3 -g $(shell pkg-config --cflags starpu-1.3)
 CPU_CFLAGS = ${CFLAGS} -Wall -mavx -fomit-frame-pointer -march=native -ffast-math
 CPU_CFLAGS = ${CFLAGS} -Wall -mavx -fomit-frame-pointer -march=native -ffast-math
 CUDA_CFLAGS = ${CFLAGS}
 CUDA_CFLAGS = ${CFLAGS}
 LDFLAGS +=$(shell pkg-config --libs starpu-1.3)
 LDFLAGS +=$(shell pkg-config --libs starpu-1.3)
@@ -28,9 +25,6 @@ ifneq ($(ENABLE_CUDA),yes)
 	CUDA_OBJECTS:=
 	CUDA_OBJECTS:=
 endif
 endif
 
 
-
-LIBPATH=${PWD}/../StarPU.jl/lib
-
 all: ${EXTERNLIB}
 all: ${EXTERNLIB}
 
 
 mult: mult.c cpu_mult.o #gpu_mult.o
 mult: mult.c cpu_mult.o #gpu_mult.o
@@ -53,14 +47,16 @@ ${GENERATEDLIB}: $(C_OBJECTS) $(CUDA_OBJECTS)
 clean:
 clean:
 	rm -f mult *.so *.o genc_*.c gencuda_*.cu *.dat
 	rm -f mult *.so *.o genc_*.c gencuda_*.cu *.dat
 
 
+tjulia: julia_generatedc.dat
 # Performance Tests
 # Performance Tests
+STRIDE=72
 cstarpu.dat: mult
 cstarpu.dat: mult
-	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./mult > $@
-julia_generatedc.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult.jl $@
-julia_native.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult_native.jl $@
-julia_calllib.dat: ${EXTERNLIB}
-	LD_LIBRARY_PATH+=${LIBPATH} JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult.jl julia_calllib.dat
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./mult $(STRIDE) > $@
+julia_generatedc.dat: mult.jl
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult.jl $(STRIDE) $@
+julia_native.dat: mult_native.jl
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult_native.jl $(STRIDE) $@
+julia_calllib.dat: ${EXTERNLIB} mult.jl
+	JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia mult.jl $(STRIDE) julia_calllib.dat
 
 
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat

+ 2 - 1
julia/examples/mult/gpu_mult.cu

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2018                                     Alexis Juven
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2018       Alexis Juven
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by

+ 50 - 59
julia/examples/mult/mult.c

@@ -1,10 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2018                                     Alexis Juven
- * Copyright (C) 2012,2013                                Inria
- * Copyright (C) 2009-2011,2013-2015                      Université de Bordeaux
- * Copyright (C) 2010                                     Mehdi Juhoor
- * Copyright (C) 2010-2013,2015,2017                      CNRS
+ * Copyright (C) 2018       Alexis Juven
+ * Copyright (C) 2010-2020  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -40,8 +37,6 @@
 
 
 #include <starpu.h>
 #include <starpu.h>
 
 
-
-
 /*
 /*
  * That program should compute C = A * B
  * That program should compute C = A * B
  *
  *
@@ -63,43 +58,32 @@
 
 
  */
  */
 
 
-
-
-
-
 //void gpu_mult(void **, void *);
 //void gpu_mult(void **, void *);
 void cpu_mult(void **, void *);
 void cpu_mult(void **, void *);
 
 
-
 static struct starpu_perfmodel model =
 static struct starpu_perfmodel model =
 {
 {
-		.type = STARPU_HISTORY_BASED,
-		.symbol = "history_perf"
+	.type = STARPU_HISTORY_BASED,
+	.symbol = "history_perf"
 };
 };
 
 
 static struct starpu_codelet cl =
 static struct starpu_codelet cl =
 {
 {
-		.cpu_funcs = {cpu_mult},
-		.cpu_funcs_name = {"cpu_mult"},
-		//.cuda_funcs = {gpu_mult},
-		.nbuffers = 3,
-		.modes = {STARPU_R, STARPU_R, STARPU_W},
-		.model = &model
+	.cpu_funcs = {cpu_mult},
+	.cpu_funcs_name = {"cpu_mult"},
+	//.cuda_funcs = {gpu_mult},
+	.nbuffers = 3,
+	.modes = {STARPU_R, STARPU_R, STARPU_W},
+	.model = &model
 };
 };
 
 
-
-void multiply_with_starpu(float *A, float *B, float *C,  unsigned xdim,  unsigned ydim,  unsigned zdim, unsigned nslicesx, unsigned nslicesy)
+void multiply_with_starpu(float *A, float *B, float *C,  unsigned xdim,  unsigned ydim,  unsigned zdim, unsigned nslicesx, unsigned nslicesy, int stride)
 {
 {
 	starpu_data_handle_t A_handle, B_handle, C_handle;
 	starpu_data_handle_t A_handle, B_handle, C_handle;
 
 
-
-	starpu_matrix_data_register(&A_handle, STARPU_MAIN_RAM, (uintptr_t)A,
-			ydim, ydim, zdim, sizeof(float));
-	starpu_matrix_data_register(&B_handle, STARPU_MAIN_RAM, (uintptr_t)B,
-			zdim, zdim, xdim, sizeof(float));
-	starpu_matrix_data_register(&C_handle, STARPU_MAIN_RAM, (uintptr_t)C,
-			ydim, ydim, xdim, sizeof(float));
-
+	starpu_matrix_data_register(&A_handle, STARPU_MAIN_RAM, (uintptr_t)A, ydim, ydim, zdim, sizeof(float));
+	starpu_matrix_data_register(&B_handle, STARPU_MAIN_RAM, (uintptr_t)B, zdim, zdim, xdim, sizeof(float));
+	starpu_matrix_data_register(&C_handle, STARPU_MAIN_RAM, (uintptr_t)C, ydim, ydim, xdim, sizeof(float));
 
 
 	struct starpu_data_filter vert =
 	struct starpu_data_filter vert =
 	{
 	{
@@ -113,31 +97,32 @@ void multiply_with_starpu(float *A, float *B, float *C,  unsigned xdim,  unsigne
 			.nchildren = nslicesy
 			.nchildren = nslicesy
 	};
 	};
 
 
-
 	starpu_data_partition(B_handle, &vert);
 	starpu_data_partition(B_handle, &vert);
 	starpu_data_partition(A_handle, &horiz);
 	starpu_data_partition(A_handle, &horiz);
 	starpu_data_map_filters(C_handle, 2, &vert, &horiz);
 	starpu_data_map_filters(C_handle, 2, &vert, &horiz);
 
 
 	unsigned taskx, tasky;
 	unsigned taskx, tasky;
 
 
-	for (taskx = 0; taskx < nslicesx; taskx++){
-		for (tasky = 0; tasky < nslicesy; tasky++){
-
+	for (taskx = 0; taskx < nslicesx; taskx++)
+	{
+		for (tasky = 0; tasky < nslicesy; tasky++)
+		{
 			struct starpu_task *task = starpu_task_create();
 			struct starpu_task *task = starpu_task_create();
 
 
 			task->cl = &cl;
 			task->cl = &cl;
 			task->handles[0] = starpu_data_get_sub_data(A_handle, 1, tasky);
 			task->handles[0] = starpu_data_get_sub_data(A_handle, 1, tasky);
 			task->handles[1] = starpu_data_get_sub_data(B_handle, 1, taskx);
 			task->handles[1] = starpu_data_get_sub_data(B_handle, 1, taskx);
 			task->handles[2] = starpu_data_get_sub_data(C_handle, 2, taskx, tasky);
 			task->handles[2] = starpu_data_get_sub_data(C_handle, 2, taskx, tasky);
+			task->cl_arg = &stride;
+			task->cl_arg_size = sizeof(stride);
 
 
-			if (starpu_task_submit(task)!=0) fprintf(stderr,"submit task error\n");
-
+			int ret = starpu_task_submit(task);
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 		}
 		}
 	}
 	}
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 
 
-
 	starpu_data_unpartition(A_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(A_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(B_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(B_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(C_handle, STARPU_MAIN_RAM);
 	starpu_data_unpartition(C_handle, STARPU_MAIN_RAM);
@@ -145,31 +130,27 @@ void multiply_with_starpu(float *A, float *B, float *C,  unsigned xdim,  unsigne
 	starpu_data_unregister(A_handle);
 	starpu_data_unregister(A_handle);
 	starpu_data_unregister(B_handle);
 	starpu_data_unregister(B_handle);
 	starpu_data_unregister(C_handle);
 	starpu_data_unregister(C_handle);
-
 }
 }
 
 
-
-
 void init_rand(float * m, unsigned width, unsigned height)
 void init_rand(float * m, unsigned width, unsigned height)
 {
 {
 	unsigned i,j;
 	unsigned i,j;
 
 
-	for (j = 0 ; j < height ; j++){
-		for (i = 0 ; i < width ; i++){
+	for (j = 0 ; j < height ; j++)
+	{
+		for (i = 0 ; i < width ; i++)
+		{
 			m[j+i*height] = (float)(starpu_drand48());
 			m[j+i*height] = (float)(starpu_drand48());
 		}
 		}
 	}
 	}
 }
 }
 
 
-
 void init_zero(float * m, unsigned width, unsigned height)
 void init_zero(float * m, unsigned width, unsigned height)
 {
 {
 	memset(m, 0, sizeof(float) * width * height);
 	memset(m, 0, sizeof(float) * width * height);
 }
 }
 
 
-
-
-double min_time(unsigned nb_test, unsigned xdim, unsigned ydim, unsigned zdim, unsigned nsclicesx, unsigned nsclicesy)
+double min_time(unsigned nb_test, unsigned xdim, unsigned ydim, unsigned zdim, unsigned nsclicesx, unsigned nsclicesy, int stride)
 {
 {
 	unsigned i;
 	unsigned i;
 
 
@@ -179,8 +160,8 @@ double min_time(unsigned nb_test, unsigned xdim, unsigned ydim, unsigned zdim, u
 
 
 	double exec_times=-1;
 	double exec_times=-1;
 
 
-	for (i = 0 ; i < nb_test ; i++){
-
+	for (i = 0 ; i < nb_test ; i++)
+	{
 		double start, stop, exec_t;
 		double start, stop, exec_t;
 
 
 		init_rand(A, zdim, ydim);
 		init_rand(A, zdim, ydim);
@@ -188,7 +169,7 @@ double min_time(unsigned nb_test, unsigned xdim, unsigned ydim, unsigned zdim, u
 		init_zero(C, xdim, ydim);
 		init_zero(C, xdim, ydim);
 
 
 		start = starpu_timing_now();
 		start = starpu_timing_now();
-		multiply_with_starpu(A, B, C, xdim, ydim, zdim, nsclicesx, nsclicesy);
+		multiply_with_starpu(A, B, C, xdim, ydim, zdim, nsclicesx, nsclicesy, stride);
 		stop = starpu_timing_now();
 		stop = starpu_timing_now();
 
 
 		exec_t = (stop - start)*1.e3; // Put in ns instead of us
 		exec_t = (stop - start)*1.e3; // Put in ns instead of us
@@ -201,34 +182,44 @@ double min_time(unsigned nb_test, unsigned xdim, unsigned ydim, unsigned zdim, u
 	return exec_times;
 	return exec_times;
 }
 }
 
 
-
-void display_times(unsigned start_dim, unsigned step_dim, unsigned stop_dim, unsigned nb_tests, unsigned nsclicesx, unsigned nsclicesy)
+void display_times(unsigned start_dim, unsigned step_dim, unsigned stop_dim, unsigned nb_tests, unsigned nsclicesx, unsigned nsclicesy, int stride)
 {
 {
 	unsigned dim;
 	unsigned dim;
 
 
-	for (dim = start_dim ; dim <= stop_dim ; dim += step_dim){
-		double t = min_time(nb_tests, dim, dim, dim, nsclicesx, nsclicesy);
+	for (dim = start_dim ; dim <= stop_dim ; dim += step_dim)
+	{
+		double t = min_time(nb_tests, dim, dim, dim, nsclicesx, nsclicesy, stride);
 		printf("%f %f\n", dim*dim*4.*3./1024./1024, (2.*dim-1.)*dim*dim/t);
 		printf("%f %f\n", dim*dim*4.*3./1024./1024, (2.*dim-1.)*dim*dim/t);
 	}
 	}
-
 }
 }
 
 
+#define STRIDE_DEFAULT 8
 
 
 int main(int argc, char * argv[])
 int main(int argc, char * argv[])
 {
 {
-	if (starpu_init(NULL) != EXIT_SUCCESS){
+	int stride=STRIDE_DEFAULT;
+	if (argc >= 2)
+		stride = atoi(argv[1]);
+	if (stride % 4 != 0)
+	{
+		fprintf(stderr, "STRIDE must be a multiple of 4 (%d)\n", stride);
+		return -1;
+	}
+
+	if (starpu_init(NULL) != EXIT_SUCCESS)
+	{
 		fprintf(stderr, "ERROR\n");
 		fprintf(stderr, "ERROR\n");
 		return 77;
 		return 77;
 	}
 	}
 
 
-	unsigned start_dim = 16*STRIDE;
-	unsigned step_dim = 4*STRIDE;
-	unsigned stop_dim = 4096;
+	unsigned start_dim = 16*stride;
+	unsigned step_dim = 4*stride;
+	unsigned stop_dim = 128*stride;
 	unsigned nb_tests = 10;
 	unsigned nb_tests = 10;
 	unsigned nsclicesx = 2;
 	unsigned nsclicesx = 2;
 	unsigned nsclicesy = 2;
 	unsigned nsclicesy = 2;
 
 
-	display_times(start_dim, step_dim, stop_dim, nb_tests, nsclicesx, nsclicesy);
+	display_times(start_dim, step_dim, stop_dim, nb_tests, nsclicesx, nsclicesy, stride);
 
 
 	starpu_shutdown();
 	starpu_shutdown();
 
 

+ 27 - 9
julia/examples/mult/mult_native.jl

@@ -1,11 +1,23 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 import Libdl
 import Libdl
 using StarPU
 using StarPU
 using LinearAlgebra
 using LinearAlgebra
 
 
-#shoud be the same as in the makefile
-const STRIDE = 72
-
-function multiply_without_starpu(A :: Matrix{Float32}, B :: Matrix{Float32}, C :: Matrix{Float32}, nslicesx, nslicesy)
+function multiply_without_starpu(A :: Matrix{Float32}, B :: Matrix{Float32}, C :: Matrix{Float32}, nslicesx, nslicesy, stride)
     tmin = 0
     tmin = 0
     for i in (1 : 10 )
     for i in (1 : 10 )
         t=time_ns()
         t=time_ns()
@@ -19,12 +31,12 @@ function multiply_without_starpu(A :: Matrix{Float32}, B :: Matrix{Float32}, C :
 end
 end
 
 
 
 
-function compute_times(io,start_dim, step_dim, stop_dim, nslicesx, nslicesy)
+function compute_times(io,start_dim, step_dim, stop_dim, nslicesx, nslicesy, stride)
     for dim in (start_dim : step_dim : stop_dim)
     for dim in (start_dim : step_dim : stop_dim)
         A = Array(rand(Cfloat, dim, dim))
         A = Array(rand(Cfloat, dim, dim))
         B = Array(rand(Cfloat, dim, dim))
         B = Array(rand(Cfloat, dim, dim))
         C = zeros(Float32, dim, dim)
         C = zeros(Float32, dim, dim)
-        mt =  multiply_without_starpu(A, B, C, nslicesx, nslicesy)
+        mt =  multiply_without_starpu(A, B, C, nslicesx, nslicesy, stride)
         flops = (2*dim-1)*dim*dim/mt
         flops = (2*dim-1)*dim*dim/mt
         size=dim*dim*4*3/1024/1024
         size=dim*dim*4*3/1024/1024
         println(io,"$size $flops")
         println(io,"$size $flops")
@@ -32,8 +44,14 @@ function compute_times(io,start_dim, step_dim, stop_dim, nslicesx, nslicesy)
     end
     end
 end
 end
 
 
-
-io=open(ARGS[1],"w")
-compute_times(io,16*STRIDE,4*STRIDE,4096,2,2)
+if size(ARGS, 1) < 2
+    stride=4
+    filename="x.dat"
+else
+    stride=parse(Int, ARGS[1])
+    filename=ARGS[2]
+end
+io=open(filename,"w")
+compute_times(io,16*stride,4*stride,128*stride,2,2,stride)
 close(io)
 close(io)
 
 

+ 22 - 0
julia/examples/mult/mult_starpu.sh

@@ -0,0 +1,22 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh mult/mult.jl
+$(dirname $0)/../execute.sh mult/mult_native.jl
+$(dirname $0)/../execute.sh -calllib mult/cpu_mult.c mult/mult.jl
+
+

+ 38 - 0
julia/examples/mult/perf.sh

@@ -0,0 +1,38 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+stride=72
+#stride=4
+
+export STARPU_NOPENCL=0
+export STARPU_SCHED=dmda
+export STARPU_CALIBRATE=1
+
+rm -f ./cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
+
+$(dirname $0)/mult $stride > ./cstarpu.dat
+$(dirname $0)/../execute.sh mult/mult.jl $stride julia_generatedc.dat
+$(dirname $0)/../execute.sh mult/mult_native.jl $stride julia_native.dat
+$(dirname $0)/../execute.sh -calllib mult/cpu_mult.c mult/mult.jl $stride julia_calllib.dat
+
+(
+    cat <<EOF
+set output "comparison.pdf"
+set term pdf
+plot "julia_native.dat" w l,"cstarpu.dat" w l,"julia_generatedc.dat" w l,"julia_calllib.dat" w l
+EOF
+) | gnuplot

+ 1 - 0
julia/examples/old_examples/includes/display.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/includes/display.h

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/includes/sorting.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/includes/sorting.h

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/mandelbrot/cpu_cuda_mandelbrot.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("../../src/Compiler/include.jl")  
 include("../../src/Compiler/include.jl")  
 
 
 starpu_new_cpu_kernel_file("../build/generated_cpu_mandelbrot.c")
 starpu_new_cpu_kernel_file("../build/generated_cpu_mandelbrot.c")

+ 1 - 0
julia/examples/old_examples/mandelbrot/cpu_mandelbrot.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/mandelbrot/cpu_mandelbrot_between.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 2 - 1
julia/examples/old_examples/mandelbrot/gpu_mandelbrot.cu

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -107,4 +108,4 @@ extern "C" void gpu_mandelbrot(void *descr[], void *args)
   gpuMandelbrotKernel <<< nblocks, THREADS_PER_BLOCK, 0, starpu_cuda_get_local_stream() >>> (nxP, nyP, ldP, d_subP, *params);
   gpuMandelbrotKernel <<< nblocks, THREADS_PER_BLOCK, 0, starpu_cuda_get_local_stream() >>> (nxP, nyP, ldP, d_subP, *params);
 
 
   cudaStreamSynchronize(starpu_cuda_get_local_stream());
   cudaStreamSynchronize(starpu_cuda_get_local_stream());
-}
+}

+ 1 - 0
julia/examples/old_examples/mandelbrot/gpu_mandelbrot_between.cu

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/mandelbrot/mandelbrot.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/mandelbrot/mandelbrot.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 function mandelbrotjl(pixels ::Matrix{Int64}, centerr ::Float64, centeri ::Float64)
 function mandelbrotjl(pixels ::Matrix{Int64}, centerr ::Float64, centeri ::Float64)
     height,width = size(pixels)
     height,width = size(pixels)
     zoom = width * 0.25296875
     zoom = width * 0.25296875

+ 1 - 0
julia/examples/old_examples/mandelbrot/mandelbrot_between.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/mandelbrot/mandelbrot_def.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("mandelbrot.jl")
 include("mandelbrot.jl")
 
 
 
 

+ 15 - 0
julia/examples/old_examples/mandelbrot/mandelbrot_generated.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 
 
 if length(ARGS) != 7
 if length(ARGS) != 7

+ 15 - 0
julia/examples/old_examples/mult/cpu_cuda_mult.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("../../src/Compiler/include.jl")
 include("../../src/Compiler/include.jl")
 
 

+ 1 - 0
julia/examples/old_examples/mult/cpu_mult.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/mult/gpu_mult.cu

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/mult/mult_def.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 using Base.LinAlg
 using Base.LinAlg
 include("mult_naive.jl")
 include("mult_naive.jl")
 
 

+ 15 - 0
julia/examples/old_examples/mult/mult_extern.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 if length(ARGS) != 6
 if length(ARGS) != 6
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")

+ 15 - 0
julia/examples/old_examples/mult/mult_extern_graph.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 if length(ARGS) != 6
 if length(ARGS) != 6
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")

+ 15 - 0
julia/examples/old_examples/mult/mult_generated.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 if length(ARGS) != 6
 if length(ARGS) != 6
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")

+ 15 - 0
julia/examples/old_examples/mult/mult_generated_graph.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 if length(ARGS) != 6
 if length(ARGS) != 6
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")
     println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")

+ 15 - 0
julia/examples/old_examples/mult/mult_naive.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 function multjl(A ::Matrix{Float32}, B ::Matrix{Float32}, C ::Matrix{Float32})
 function multjl(A ::Matrix{Float32}, B ::Matrix{Float32}, C ::Matrix{Float32})
     heightC, widthC = size(C)
     heightC, widthC = size(C)
     widthA = size(A)[2]
     widthA = size(A)[2]

+ 15 - 0
julia/examples/old_examples/nbody/cpu_cuda_nbody.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("../../src/Compiler/include.jl")
 include("../../src/Compiler/include.jl")
 
 
 starpu_new_cpu_kernel_file("../build/generated_cpu_nbody.c")
 starpu_new_cpu_kernel_file("../build/generated_cpu_nbody.c")

+ 1 - 0
julia/examples/old_examples/nbody/cpu_nbody.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/nbody/cpu_nbody_between.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 2 - 1
julia/examples/old_examples/nbody/gpu_nbody.cu

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -157,4 +158,4 @@ extern "C" void gpu_nbody2(void * descr[], void *args)
     >>> (d_subP, d_subV, d_subA, nxP, nxV, nxA, ldP, ldV, ldA, *params);
     >>> (d_subP, d_subV, d_subA, nxP, nxV, nxA, ldP, ldV, ldA, *params);
 
 
   cudaStreamSynchronize(starpu_cuda_get_local_stream());
   cudaStreamSynchronize(starpu_cuda_get_local_stream());
-}
+}

+ 1 - 0
julia/examples/old_examples/nbody/gpu_nbody_between.cu

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 1 - 0
julia/examples/old_examples/nbody/nbody.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/nbody/nbody.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("nbody_display.jl")
 include("nbody_display.jl")
 function mod2(v ::Vector{Float64})
 function mod2(v ::Vector{Float64})
     return sqrt(v[1]^2 + v[2]^2)
     return sqrt(v[1]^2 + v[2]^2)

+ 1 - 0
julia/examples/old_examples/nbody/nbody_between.c

@@ -1,5 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  * Copyright (C) 2019       Mael Keryell
  * Copyright (C) 2019       Mael Keryell
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify

+ 15 - 0
julia/examples/old_examples/nbody/nbody_def.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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("./nbody_display.jl")
 #include("./nbody_display.jl")
 include("nbody.jl")
 include("nbody.jl")
 function nbody_with_starpu(positions ::Matrix{Float64}, velocities ::Matrix{Float64}, accelerations ::Matrix{Float64}, masses ::Vector{Float64}, parameters ::Vector{Float64}, nbr_simulations ::Int64, nslices ::Int64, nbr_planets ::Int64)
 function nbody_with_starpu(positions ::Matrix{Float64}, velocities ::Matrix{Float64}, accelerations ::Matrix{Float64}, masses ::Vector{Float64}, parameters ::Vector{Float64}, nbr_simulations ::Int64, nslices ::Int64, nbr_planets ::Int64)

+ 15 - 0
julia/examples/old_examples/nbody/nbody_display.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 function get_planet_pixels(X ::Int64, Y ::Int64)
 function get_planet_pixels(X ::Int64, Y ::Int64)
     pix ::Array{Tuple{Int64,Int64}} = []
     pix ::Array{Tuple{Int64,Int64}} = []
     for i = X-1:X+1
     for i = X-1:X+1

+ 15 - 0
julia/examples/old_examples/nbody/nbody_generated.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 if length(ARGS) != 6
 if length(ARGS) != 6
     println("Usage: julia nbody_generated.jl start_nbr step_nbr stop_nbr nbr_simulations nbr_slices nbr_tests")
     println("Usage: julia nbody_generated.jl start_nbr step_nbr stop_nbr nbr_simulations nbr_slices nbr_tests")
     quit()
     quit()

+ 1 - 3
julia/examples/task_insert_color/Makefile

@@ -21,8 +21,6 @@ ifneq ($(ENABLE_CUDA),yes)
 	CUDA_OBJECTS:=
 	CUDA_OBJECTS:=
 endif
 endif
 
 
-LIBPATH=${PWD}/../StarPU.jl/lib
-
 all: task_insert_color
 all: task_insert_color
 
 
 task_insert_color: task_insert_color.o
 task_insert_color: task_insert_color.o
@@ -46,6 +44,6 @@ clean:
 cstarpu.dat: task_insert_color
 cstarpu.dat: task_insert_color
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./task_insert_color > $@
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./task_insert_color > $@
 julia_generatedc.dat:
 julia_generatedc.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia task_insert_colorl.jl
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia task_insert_color.jl
 
 
 test: cstarpu.dat julia_generatedc.dat
 test: cstarpu.dat julia_generatedc.dat

+ 19 - 0
julia/examples/task_insert_color/task_insert_color.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh task_insert_color/task_insert_color.jl
+

+ 3 - 5
julia/examples/variable/Makefile

@@ -21,8 +21,6 @@ ifneq ($(ENABLE_CUDA),yes)
 	CUDA_OBJECTS:=
 	CUDA_OBJECTS:=
 endif
 endif
 
 
-LIBPATH=${PWD}/../StarPU.jl/lib
-
 all: ${EXTERNLIB}
 all: ${EXTERNLIB}
 
 
 variable: variable.c cpu_variable.o #gpu_variable.o
 variable: variable.c cpu_variable.o #gpu_variable.o
@@ -49,10 +47,10 @@ clean:
 cstarpu.dat: variable
 cstarpu.dat: variable
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./variable -0.800671 -0.158392 32 32 4096 4 > $@
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./variable -0.800671 -0.158392 32 32 4096 4 > $@
 julia_generatedc.dat:
 julia_generatedc.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable.jl $@
 julia_native.dat:
 julia_native.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable_native.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable_native.jl $@
 julia_calllib.dat: ${EXTERNLIB}
 julia_calllib.dat: ${EXTERNLIB}
-	LD_LIBRARY_PATH+=${LIBPATH} JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable.jl julia_calllib.dat
+	JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia variable.jl julia_calllib.dat
 
 
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
 test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat

+ 15 - 0
julia/examples/variable/variable.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 import Libdl
 import Libdl
 using StarPU
 using StarPU
 
 

+ 20 - 0
julia/examples/variable/variable.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh variable/variable.jl
+$(dirname $0)/../execute.sh variable/variable_native.jl
+

+ 15 - 0
julia/examples/variable/variable_native.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 function variable(val ::Ref{Float32}) :: Nothing
 function variable(val ::Ref{Float32}) :: Nothing
     val[] = val[] + 1
     val[] = val[] + 1
 
 

+ 5 - 6
julia/examples/vector_scal/Makefile

@@ -21,8 +21,6 @@ ifneq ($(ENABLE_CUDA),yes)
 	CUDA_OBJECTS:=
 	CUDA_OBJECTS:=
 endif
 endif
 
 
-LIBPATH=${PWD}/../StarPU.jl/lib
-
 all: ${EXTERNLIB}
 all: ${EXTERNLIB}
 
 
 vector_scal: vector_scal.c cpu_vector_scal.o #gpu_vector_scal.o
 vector_scal: vector_scal.c cpu_vector_scal.o #gpu_vector_scal.o
@@ -49,10 +47,11 @@ clean:
 cstarpu.dat: vector_scal
 cstarpu.dat: vector_scal
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./vector_scal > $@
 	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 ./vector_scal > $@
 julia_generatedc.dat:
 julia_generatedc.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal.jl $@
 julia_native.dat:
 julia_native.dat:
-	LD_LIBRARY_PATH+=${LIBPATH} STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal_native.jl $@
+	STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal_native.jl $@
 julia_calllib.dat: ${EXTERNLIB}
 julia_calllib.dat: ${EXTERNLIB}
-	LD_LIBRARY_PATH+=${LIBPATH} JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal.jl julia_calllib.dat
+	JULIA_TASK_LIB="${EXTERNLIB}" STARPU_NOPENCL=0 STARPU_SCHED=dmda STARPU_CALIBRATE=1 julia vector_scal.jl julia_calllib.dat
 
 
-test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
+#test: cstarpu.dat julia_generatedc.dat julia_native.dat julia_calllib.dat
+test: julia_generatedc.dat julia_calllib.dat

+ 16 - 1
julia/examples/vector_scal/cpu_vector_scal.c

@@ -1,3 +1,18 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2020       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 <stdio.h>
 #include <stdint.h>
 #include <stdint.h>
 #include <starpu.h>
 #include <starpu.h>
@@ -29,7 +44,7 @@ float cpu_vector_scal(void *buffers[], void *cl_arg)
 
 
   /* scale the vector */
   /* scale the vector */
   for (unsigned i = 0; i < n; i++)
   for (unsigned i = 0; i < n; i++)
-    val[i] = val[i] * k + l + m;
+    val[i] = val[i] * m + l + k;
 
 
   return 0.0;
   return 0.0;
 }
 }

+ 20 - 0
julia/examples/vector_scal/vector_scal.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+
+$(dirname $0)/../execute.sh vector_scal/vector_scal.jl
+$(dirname $0)/../execute.sh -calllib vector_scal/cpu_vector_scal.c vector_scal/vector_scal.jl
+

+ 15 - 0
julia/setenv.sh

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 export JULIA_LOAD_PATH=$JULIA_LOAD_PATH:$PWD
 export JULIA_LOAD_PATH=$JULIA_LOAD_PATH:$PWD
 
 
 if [ `uname` == "Darwin" ]; then
 if [ `uname` == "Darwin" ]; then

+ 39 - 0
julia/src/callback_wrapper.c

@@ -0,0 +1,39 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ *
+ * StarPU is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+#include <starpu.h>
+
+void  *dummy_function_list[] = {
+				starpu_matrix_filter_vertical_block,
+				starpu_matrix_filter_block,
+				starpu_vector_filter_block,
+				starpu_init,
+};
+
+void julia_callback_func(void *user_data)
+{
+  volatile int *signal = (int *) user_data;
+
+  // wakeup callback
+  *(signal) = 1;
+
+  // Wait for callback to end.
+  while ((*signal) != 0);
+}
+
+void julia_wait_signal(volatile int *signal)
+{
+  while ((*signal) == 0);
+}

+ 15 - 0
julia/src/compiler/c.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 """
 """
     Returns the list of instruction that will be added before for loop of shape
     Returns the list of instruction that will be added before for loop of shape
         "for for_index_var in set ..."
         "for for_index_var in set ..."

+ 15 - 0
julia/src/compiler/cuda.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 
 
 function is_indep_for_expr(x :: StarpuExpr)
 function is_indep_for_expr(x :: StarpuExpr)

+ 15 - 0
julia/src/compiler/expression_manipulation.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 """
 """
     Lenient comparison operator for structures and arrays.
     Lenient comparison operator for structures and arrays.

+ 15 - 12
julia/src/compiler/expressions.jl

@@ -1,15 +1,18 @@
-global starpu_type_traduction_dict = Dict(
-    Int32 => "int32_t",
-    UInt32 => "uint32_t",
-    Float32 => "float",
-    Int64 => "int64_t",
-    UInt64 => "uint64_t",
-    Float64 => "double",
-    Nothing => "void"
-)
-export starpu_type_traduction_dict
-
-
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 #======================================================
 #======================================================
                 AFFECTATION
                 AFFECTATION
 ======================================================#
 ======================================================#

+ 15 - 19
julia/src/compiler/file_generation.jl

@@ -1,12 +1,18 @@
-
-
-
-global generated_cuda_kernel_file_name = "PRINT TO STDOUT"
-
-
-
-global generated_cpu_kernel_file_name = "PRINT TO STDOUT"
-
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 const cpu_kernel_file_start = "#include <stdio.h>
 const cpu_kernel_file_start = "#include <stdio.h>
 #include <stdint.h>
 #include <stdint.h>
 #include <starpu.h>
 #include <starpu.h>
@@ -92,16 +98,6 @@ macro target(x)
     end
     end
 end
 end
 
 
-export CPU_CODELETS
-global CPU_CODELETS=Dict{String,String}()
-export CUDA_CODELETS
-global CUDA_CODELETS=Dict{String,String}()
-
-export CODELETS_SCALARS
-global CODELETS_SCALARS=Dict{String,Any}()
-export CODELETS_PARAMS_STRUCT
-global CODELETS_PARAMS_STRUCT=Dict{String,Any}()
-
 """
 """
 	    Executes @cuda_kernel and @cpu_kernel
 	    Executes @cuda_kernel and @cpu_kernel
         """
         """

+ 15 - 0
julia/src/compiler/include.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 export starpu_new_cpu_kernel_file
 export starpu_new_cpu_kernel_file
 export starpu_new_cuda_kernel_file
 export starpu_new_cuda_kernel_file
 export @codelet
 export @codelet

+ 15 - 0
julia/src/compiler/parsing.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 
 
 
 
 #======================================================
 #======================================================

+ 15 - 0
julia/src/compiler/utils.jl

@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
 import Base.print
 import Base.print
 
 
 function print_newline(io :: IO, indent = 0, n_lines = 1)
 function print_newline(io :: IO, indent = 0, n_lines = 1)

+ 126 - 0
julia/src/destructible.jl

@@ -0,0 +1,126 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020       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.
+#
+"""
+        Object used to store a lot of function which must
+        be applied to and object
+    """
+mutable struct StarpuDestructible{T}
+
+    object :: T
+    destructors :: LinkedList{Function}
+
+end
+
+starpu_block_list = Vector{LinkedList{StarpuDestructible}}()
+
+"""
+    Declares a block of code. Every declared StarpuDestructible in this code
+    will execute its destructors on its object, once the block is exited
+"""
+macro starpu_block(expr)
+    quote
+        starpu_enter_new_block()
+        local z=$(esc(expr))
+        starpu_exit_block()
+        z
+    end
+end
+
+
+function StarpuDestructible(obj :: T, destructors :: Function...) where T
+
+    if (isempty(starpu_block_list))
+        error("Creation of a StarpuDestructible object while not beeing in a @starpu_block")
+    end
+
+    l = LinkedList{Function}()
+
+    for destr in destructors
+        add_to_tail!(l, destr)
+    end
+
+    output = StarpuDestructible{T}(obj, l)
+    add_to_head!(starpu_block_list[end], output)
+
+    return output
+end
+
+function starpu_enter_new_block()
+
+    push!(starpu_block_list, LinkedList{StarpuDestructible}())
+end
+
+function starpu_destruct!(x :: StarpuDestructible)
+
+    @foreach_asc  x.destructors destr begin
+        destr.data(x.object)
+    end
+
+    empty!(x.destructors)
+
+    return nothing
+end
+
+
+function starpu_exit_block()
+
+    destr_list = pop!(starpu_block_list)
+
+    @foreach_asc destr_list x begin
+        starpu_destruct!(x.data)
+    end
+end
+
+"""
+    Adds new destructors to the list of function. They will be executed before
+        already stored ones when calling starpu_destruct!
+"""
+function starpu_add_destructor!(x :: StarpuDestructible, destrs :: Function...)
+
+    for d in destrs
+        add_to_head!(x.destructors, d)
+    end
+
+    return nothing
+end
+
+"""
+    Removes detsructor without executing it
+"""
+function starpu_remove_destructor!(x :: StarpuDestructible, destr :: Function)
+
+    @foreach_asc x.destructors lnk begin
+
+        if (lnk.data == destr)
+            remove_link!(lnk)
+            break
+        end
+    end
+
+    return nothing
+end
+
+"""
+    Executes "destr" function. If it was one of the stored destructors, it
+    is removed.
+    This function can be used to allow user to execute a specific action manually
+        (ex : explicit call to starpu_data_unpartition() without unregistering)
+"""
+function starpu_execute_destructor!(x :: StarpuDestructible, destr :: Function)
+
+    starpu_remove_destructor!(x, destr)
+    return destr(x.object)
+end

+ 0 - 133
julia/src/jlstarpu_data_handles.c

@@ -1,133 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2018                                     Alexis Juven
- *
- * 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 "jlstarpu.h"
-
-enum jlstarpu_data_filter_func
-{
-	JLSTARPU_MATRIX_FILTER_VERTICAL_BLOCK = 0,
-	JLSTARPU_MATRIX_FILTER_BLOCK,
-	JLSTARPU_VECTOR_FILTER_BLOCK,
-};
-
-struct jlstarpu_data_filter
-{
-	enum jlstarpu_data_filter_func func;
-	unsigned int nchildren;
-
-};
-
-
-void * jlstarpu_translate_data_filter_func(enum jlstarpu_data_filter_func func)
-{
-	switch (func){
-	case JLSTARPU_MATRIX_FILTER_VERTICAL_BLOCK:
-		return starpu_matrix_filter_vertical_block;
-	case JLSTARPU_MATRIX_FILTER_BLOCK:
-		return starpu_matrix_filter_block;
-	case JLSTARPU_VECTOR_FILTER_BLOCK:
-		return starpu_vector_filter_block;
-	default:
-		return NULL;
-	}
-
-}
-
-void jlstarpu_translate_data_filter(const struct jlstarpu_data_filter * const input,struct starpu_data_filter * output)
-{
-	memset(output, 0, sizeof(struct starpu_data_filter));
-	output->filter_func = jlstarpu_translate_data_filter_func(input->func);
-	output->nchildren = input->nchildren;
-}
-
-void jlstarpu_data_partition(starpu_data_handle_t handle,const struct jlstarpu_data_filter * const jl_filter)
-{
-	struct starpu_data_filter filter;
-	jlstarpu_translate_data_filter(jl_filter, &filter);
-	starpu_data_partition(handle, &filter);
-}
-
-
-void jlstarpu_data_map_filters_1_arg(starpu_data_handle_t handle,
-	const struct jlstarpu_data_filter * const jl_filter
-	)
-{
-	struct starpu_data_filter filter;
-	jlstarpu_translate_data_filter(jl_filter, &filter);
-
-	starpu_data_map_filters(handle, 1, &filter);
-
-}
-
-
-void jlstarpu_data_map_filters_2_arg
-(
-	starpu_data_handle_t handle,
-	const struct jlstarpu_data_filter * const jl_filter_1,
-	const struct jlstarpu_data_filter * const jl_filter_2
-	)
-{
-	struct starpu_data_filter filter_1;
-	jlstarpu_translate_data_filter(jl_filter_1, &filter_1);
-
-	struct starpu_data_filter filter_2;
-	jlstarpu_translate_data_filter(jl_filter_2, &filter_2);
-
-
-	starpu_data_map_filters(handle, 2, &filter_1, &filter_2);
-
-}
-
-
-
-
-#define JLSTARPU_GET(interface, field, ret_type)			\
-									\
-	ret_type jlstarpu_##interface##_get_##field(const struct starpu_##interface##_interface * const x) \
-	{								\
-		return (ret_type) x->field;				\
-	}								\
-
-
-
-
-
-JLSTARPU_GET(vector, ptr, void *)
-JLSTARPU_GET(vector, nx, uint32_t)
-JLSTARPU_GET(vector, elemsize, size_t)
-
-
-
-JLSTARPU_GET(matrix, ptr, void *)
-JLSTARPU_GET(matrix, ld, uint32_t)
-JLSTARPU_GET(matrix, nx, uint32_t)
-JLSTARPU_GET(matrix, ny, uint32_t)
-JLSTARPU_GET(matrix, elemsize, size_t)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 75
julia/src/jlstarpu_task.h

@@ -1,75 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2018                                     Alexis Juven
- *
- * 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.
- */
-/*
- * jlstarpu_task.h
- *
- *  Created on: 27 juin 2018
- *      Author: ajuven
- */
-
-#ifndef JLSTARPU_TASK_H_
-#define JLSTARPU_TASK_H_
-
-
-#include "jlstarpu.h"
-
-struct jlstarpu_codelet
-{
-	uint32_t where;
-
-  	uint32_t color;
-
-	starpu_cpu_func_t cpu_func;
-	char * cpu_func_name;
-
-	starpu_cuda_func_t cuda_func;
-	starpu_opencl_func_t opencl_func;
-
-	int nbuffer;
-	enum starpu_data_access_mode * modes;
-
-	struct starpu_perfmodel * model;
-
-};
-
-
-
-struct jlstarpu_task
-{
-	struct starpu_codelet * cl;
-	starpu_data_handle_t * handles;
-	unsigned int synchronous;
-
-	void * cl_arg;
-	size_t cl_arg_size;
-};
-
-
-#if 0
-
-struct cl_args_decorator
-{
-	struct jlstarpu_function_launcher * launcher;
-	void * cl_args;
-};
-
-#endif
-
-
-
-
-
-#endif /* JLSTARPU_TASK_H_ */

+ 0 - 0
julia/src/jlstarpu_task_submit.c


Некоторые файлы не были показаны из-за большого количества измененных файлов