浏览代码

removed garbage

Andra Hugo 12 年之前
父节点
当前提交
7ce09b5472

+ 0 - 12
AUTHORS

@@ -4,19 +4,7 @@ Jérôme Clet-Ortega <jerome.clet-ortega@labri.fr>
 Nicolas Collin <nicolas.collin@inria.fr>
 Nathalie Furmento <nathalie.furmento@labri.fr>
 Sylvain Henry <sylvain.henry@inria.fr>
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 Cyril Roelandt <cyril.roelandt@inria.fr>
-=======
-Cyril Roélandt <cyril.roelandt@inria.fr>
-=======
-Cyril Roelandt <cyril.roelandt@inria.fr>
->>>>>>> .merge-right.r7640
->>>>>>> .merge-right.r6541
-=======
-Cyril Roélandt <cyril.roelandt@inria.fr>
->>>>>>> .merge-right.r6541
 François Tessier <francois.tessier@inria.fr>
 Samuel Thibault <samuel.thibault@labri.fr>
 Pierre André Wacrenier <wacrenier@labri.fr>

+ 1 - 17
configure.ac

@@ -951,7 +951,6 @@ if test x$use_fxt = xyes; then
 	else
 	    PKG_CHECK_MODULES([FXT],  [fxt])
 	fi
-<<<<<<< .working
 	save_LIBS="$LIBS"
 	LIBS="$LIBS $FXT_LIBS"
 	save_LDFLAGS="$LDFLAGS"
@@ -965,8 +964,6 @@ if test x$use_fxt = xyes; then
 	AC_CHECK_DECLS([enable_fut_flush])
 	AC_CHECK_DECLS([fut_set_filename])
 	CFLAGS="$save_CFLAGS"
-=======
->>>>>>> .merge-right.r6541
 fi
 
 AC_MSG_CHECKING(whether performance debugging should be enabled)
@@ -1895,13 +1892,10 @@ AC_MSG_NOTICE([
 	       GCC plug-in: $build_gcc_plugin
 	       GCC plug-in test suite (requires GNU Guile): $run_gcc_plugin_test_suite
 	       SOCL enabled:  $build_socl
-<<<<<<< .working
                Scheduler Hypervisor: $build_sched_ctx_hypervisor
-=======
                SOCL test suite: $run_socl_check
->>>>>>> .merge-right.r7640
+
 ])
-<<<<<<< .working
 
 if test "$build_socl" = "yes" -a "$run_socl_check" = "no" ; then
 	AC_MSG_NOTICE([
@@ -1918,13 +1912,3 @@ WARNING: hwloc was not enabled.  If the target machine is hyperthreaded the
 performance may be impacted a lot.  It is strongly recommended to install
 hwloc])
 fi
-=======
-
-if test x"$have_valid_hwloc" = xno
-then
-  AC_MSG_NOTICE([
-WARNING: hwloc was not enabled.  If the target machine is hyperthreaded the
-performance may be impacted a lot.  It is strongly recommended to install
-hwloc])
-fi
->>>>>>> .merge-right.r6541

+ 0 - 53
doc/chapters/advanced-api.texi

@@ -816,7 +816,6 @@ static struct starpu_sched_policy dummy_sched_policy = @{
 @end smallexample
 @end cartouche
 
-<<<<<<< .working
 @node Running drivers
 @section Running drivers
 
@@ -884,58 +883,6 @@ if (ret != 0)
 @end smallexample
 @end cartouche
 
-=======
-@node Running drivers
-@section Running drivers
-
-@menu
-* Driver API::
-* Example::
-@end menu
-
-@node Driver API
-@subsection Driver API
-
-@deftypefun int starpu_driver_init(struct starpu_driver *@var{d})
-Initialize the given driver. Returns 0 on success, -EINVAL if d->type is not
-STARPU_CUDA_WORKER.
-@end deftypefun
-
-@deftypefun int starpu_driver_run_once(struct starpu_driver *@var{d})
-Runs the driver for a while, then returns 0 on success, -EINVAL if d->type is
-not STARPU_CUDA_WORKER.
-@end deftypefun
-
-@deftypefun int starpu_driver_deinit(struct starpu_driver *@var{d})
-Deinitialize the given driver. Returns 0 on success, -EINVAL if d->type is not
-STARPU_CUDA_WORKER.
-@end deftypefun
-
-@node Example
-@subsection Example
-
-@cartouche
-@smallexample
-int ret;
-struct starpu_driver = @{
-    .type = STARPU_CUDA_WORKER,
-    .id.cuda_id = 0
-@};
-ret = starpu_driver_init(&d);
-if (ret != 0)
-    error();
-while (some_condition) @{
-    ret = starpu_driver_run_once(&d);
-    if (ret != 0)
-        error();
-@}
-ret = starpu_driver_deinit(&d);
-if (ret != 0)
-    error();
-@end smallexample
-@end cartouche
-
->>>>>>> .merge-right.r6541
 @node Expert mode
 @section Expert mode
 

+ 0 - 22
doc/chapters/advanced-examples.texi

@@ -1050,7 +1050,6 @@ renderbuffer objects into CUDA.  CUDA however imposes some technical
 constraints: peer memcpy has to be disabled, and the thread that runs OpenGL has
 to be the one that runs CUDA computations for that GPU.
 
-<<<<<<< .working
 To achieve this with StarPU, pass the @code{--disable-cuda-memcpy-peer} option
 to @code{./configure} (TODO: make it dynamic), OpenGL/GLUT has to be initialized
 first, and the interoperability mode has to
@@ -1067,21 +1066,6 @@ to make GLUT progress from the StarPU driver loop, while the latter uses
 Then, to use an OpenGL buffer as a CUDA data, StarPU simply needs to be given
 the CUDA pointer at registration, for instance:
 
-=======
-To achieve this with StarPU, pass the @code{--disable-cuda-memcpy-peer} option
-to @code{./configure} (TODO: make it dynamic), the interoperability mode has to
-be enabled by using the @code{cuda_opengl_interoperability} field of the
-@code{starpu_conf} structure, and the driver loop has to be run by
-the application, by using the @code{not_launched_drivers} field of
-@code{starpu_conf} to prevent StarPU from running it in a separate thread, and
-by using @code{starpu_driver_run} to run the loop. The @code{gl_interop} example
-shows how it articulates in a simple case, where rendering is done in task
-callbacks. TODO: provide glutIdleFunc alternative.
-
-Then, to use an OpenGL buffer as a CUDA data, StarPU simply needs to be given
-the CUDA pointer at registration, for instance:
-
->>>>>>> .merge-right.r6541
 @cartouche
 @smallexample
 /* Get the CUDA worker id */
@@ -1089,10 +1073,7 @@ for (workerid = 0; workerid < starpu_worker_get_count(); workerid++)
         if (starpu_worker_get_type(workerid) == STARPU_CUDA_WORKER)
                 break;
 
-<<<<<<< .working
 /* Build a CUDA pointer pointing at the OpenGL buffer */
-=======
->>>>>>> .merge-right.r6541
 cudaGraphicsResourceGetMappedPointer((void**)&output, &num_bytes, resource);
 
 /* And register it to StarPU */
@@ -1101,14 +1082,11 @@ starpu_vector_data_register(&handle, starpu_worker_get_memory_node(workerid),
 
 /* The handle can now be used as usual */
 starpu_insert_task(&cl, STARPU_RW, handle, 0);
-<<<<<<< .working
 
 /* ... */
 
 /* This gets back data into the OpenGL buffer */
 starpu_data_unregister(handle);
-=======
->>>>>>> .merge-right.r6541
 @end smallexample
 @end cartouche
 

+ 0 - 38
doc/chapters/basic-api.texi

@@ -36,7 +36,6 @@ Upon successful completion, this function returns 0. Otherwise, @code{-ENODEV}
 indicates that no worker was available (so that StarPU was not initialized).
 @end deftypefun
 
-<<<<<<< .working
 @deftp {Data Type} {struct starpu_driver}
 @table @asis
 @item @code{enum starpu_archtype type}
@@ -55,24 +54,6 @@ Should only be used if type is STARPU_OPENCL_WORKER.
 @end deftp
 
 
-=======
-@deftp {Data Type} {struct starpu_driver}
-@table @asis
-@item @code{enum starpu_archtype type}
-The type of the driver. Only STARPU_CUDA_DRIVER and STARPU_OPENCL_DRIVER are
-currently supported.
-@item @code{union id} Anonymous union
-@table @asis
-@item @code{unsigned cuda_id}
-Should only be used if type is STARPU_CUDA_WORKER.
-@item @code{cl_device_id opencl_id}
-Should only be used if type is STARPU_OPENCL_WORKER.
-@end table
-@end table
-@end deftp
-
-
->>>>>>> .merge-right.r6541
 @deftp {Data Type} {struct starpu_conf}
 This structure is passed to the @code{starpu_init} function in order
 to configure StarPU. It has to be initialized with @code{starpu_conf_init}.
@@ -170,7 +151,6 @@ CPUs and all accelerators. This can also be specified with the
 The AMD implementation of OpenCL is known to
 fail when copying data asynchronously. When using this implementation,
 it is therefore necessary to disable asynchronous data transfers.
-<<<<<<< .working
 This can also be specified at compilation time by giving to the
 configure script the option @code{--disable-asynchronous-copy}.
 
@@ -206,24 +186,6 @@ The drivers that should not be launched by StarPU.
 @item @code{unsigned nnot_launched_drivers}
 The number of StarPU drivers that should not be launched by StarPU.
 
-=======
-
-@item @code{int *cuda_opengl_interoperability} (default = NULL)
-This can be set to an array of CUDA device identifiers for which
-@code{cudaGLSetGLDevice} should be called instead of @code{cudaSetDevice}. Its
-size is specified by the @code{n_cuda_opengl_interoperability} field below
-
-@item @code{int *n_cuda_opengl_interoperability} (default = 0)
-This has to be set to the size of the array pointed to by the
-@code{cuda_opengl_interoperability} field.
-
-@item @code{struct starpu_driver *not_launched_drivers}
-The drivers that should not be launched by StarPU.
-
-@item @code{unsigned nnot_launched_drivers}
-The number of StarPU drivers that should not be launched by StarPU.
-
->>>>>>> .merge-right.r6541
 @end table
 @end deftp
 

+ 0 - 38
doc/chapters/configuration.texi

@@ -274,23 +274,7 @@ By default, it is disabled.
 @node Workers
 @subsection Configuring workers
 
-<<<<<<< .working
 @table @code
-=======
-@menu
-* STARPU_NCPUS::                	Number of CPU workers
-* STARPU_NCUDA::                	Number of CUDA workers
-* STARPU_NOPENCL::              	Number of OpenCL workers
-* STARPU_NGORDON::              	Number of SPU workers (Cell)
-* STARPU_WORKERS_NOBIND::       	Do not bind workers
-* STARPU_WORKERS_CPUID::        	Bind workers to specific CPUs
-* STARPU_WORKERS_CUDAID::       	Select specific CUDA devices
-* STARPU_WORKERS_OPENCLID::     	Select specific OpenCL devices
-* STARPU_SINGLE_COMBINED_WORKER:: 	Do not use concurrent workers
-* STARPU_MIN_WORKERSIZE::	 	Minimum size of the combined workers
-* STARPU_MAX_WORKERSIZE:: 		Maximum size of the combined workers
-@end menu
->>>>>>> .merge-right.r6541
 
 @item @code{STARPU_NCPU}
 Specify the number of CPU workers (thus not including workers dedicated to control acceleratores). Note that by default, StarPU will not allocate
@@ -355,7 +339,6 @@ OpenCL equivalent of the @code{STARPU_WORKERS_CUDAID} environment variable.
 This variable is ignored if the @code{use_explicit_workers_opencl_gpuid} flag of
 the @code{starpu_conf} structure passed to @code{starpu_init} is set.
 
-<<<<<<< .working
 @item @code{STARPU_SINGLE_COMBINED_WORKER}
 If set, StarPU will create several workers which won't be able to work
 concurrently. It will create combined workers which size goes from 1 to the
@@ -399,27 +382,6 @@ instead. This permits to test the performance effect of GPU-Direct.
 
 @end table
 
-=======
-@node STARPU_SINGLE_COMBINED_WORKER
-@subsubsection @code{STARPU_SINGLE_COMBINED_WORKER} -- Do not use concurrent workers
-
-If set, StarPU will create several workers which won't be able to work
-concurrently. It will create combined workers which size goes from 1 to the
-total number of CPU workers in the system.
-
-@node STARPU_MIN_WORKERSIZE
-@subsubsection @code{STARPU_MIN_WORKERSIZE} -- Minimum size of the combined workers
-
-Let the user give a hint to StarPU about which how many workers
-(minimum boundary) the combined workers should contain.
-
-@node STARPU_MAX_WORKERSIZE
-@subsubsection @code{STARPU_MAX_WORKERSIZE} -- Maximum size of the combined workers
-
-Let the user give a hint to StarPU about which how many workers
-(maximum boundary) the combined workers should contain.
-
->>>>>>> .merge-right.r6541
 @node Scheduling
 @subsection Configuring the Scheduling engine
 

+ 0 - 18
examples/Makefile.am

@@ -852,7 +852,6 @@ pi_pi_redux_LDADD =				\
 	$(STARPU_CURAND_LDFLAGS)
 endif
 
-<<<<<<< .working
 ###########################
 # OpenGL interoperability #
 ###########################
@@ -888,23 +887,6 @@ pipeline_pipeline_LDADD =		\
 	$(STARPU_BLAS_LDFLAGS)
 endif
 
-=======
-###########################
-# OpenGL interoperability #
-###########################
-
-if HAVE_OPENGL
-examplebin_PROGRAMS +=				\
-	gl_interop/gl_interop
-
-gl_interop_gl_interop_SOURCES =			\
-	gl_interop/gl_interop.c
-
-gl_interop_gl_interop_LDADD =			\
-	$(STARPU_OPENGL_RENDER_LDFLAGS)
-endif
-
->>>>>>> .merge-right.r6541
 showcheck:
 	-cat $(TEST_LOGS) /dev/null
 	for i in $(SUBDIRS) ; do \

+ 1 - 150
include/starpu.h

@@ -66,9 +66,6 @@ extern "C"
 {
 #endif
 
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 enum starpu_archtype
 {
 	STARPU_CPU_WORKER,    /* CPU core */
@@ -100,81 +97,6 @@ struct starpu_driver
 	} id;
 };
 
-=======
-#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
-#include <starpu_opencl.h>
-#endif
-
-=======
->>>>>>> .merge-right.r7640
-enum starpu_archtype
-{
-	STARPU_CPU_WORKER,    /* CPU core */
-	STARPU_CUDA_WORKER,   /* NVIDIA CUDA device */
-	STARPU_OPENCL_WORKER, /* OpenCL device */
-	STARPU_GORDON_WORKER  /* Cell SPU */
-};
-
-struct starpu_driver
-{
-	enum starpu_archtype type;
-	union
-	{
-		unsigned cpu_id;
-		unsigned cuda_id;
-#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
-		cl_device_id opencl_id;
-#endif
-		/*
-		 * HOWTO: add a new kind of device to the starpu_driver structure.
-		 * 1) Add a member to this union.
-		 * 2) Edit _starpu_launch_drivers() to make sure the driver is
-		 *    not always launched.
-		 * 3) Edit starpu_driver_run() so that it can handle another
-		 *    kind of architecture.
-		 * 4) Write _starpu_run_foobar() in the corresponding driver.
-		 * 5) Test the whole thing :)
-		 */
-	} id;
-};
-
->>>>>>> .merge-right.r6541
-=======
-#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
-#include <starpu_opencl.h>
-#endif
-
-enum starpu_archtype
-{
-	STARPU_CPU_WORKER,    /* CPU core */
-	STARPU_CUDA_WORKER,   /* NVIDIA CUDA device */
-	STARPU_OPENCL_WORKER, /* OpenCL device */
-	STARPU_GORDON_WORKER  /* Cell SPU */
-};
-
-struct starpu_driver
-{
-	enum starpu_archtype type;
-	union
-	{
-		unsigned cuda_id;
-#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
-		cl_device_id opencl_id;
-#endif
-		/*
-		 * TODO: handle CPUs:
-		 * 1) Add a member to this union.
-		 * 2) Edit _starpu_launch_drivers() to make sure the driver is
-		 *    not always launched.
-		 * 3) Edit starpu_driver_run() so that it can handle another
-		 *    kind of architecture.
-		 * 4) Write _starpu_run_foobar() in the corresponding driver.
-		 * 5) Test the whole thing :)
-		 */
-	} id;
-};
-
->>>>>>> .merge-right.r6541
 struct starpu_conf
 {
 	/* Will be initialized by starpu_conf_init */
@@ -213,8 +135,6 @@ struct starpu_conf
 
         /* indicate if all asynchronous copies should be disabled */
 	int disable_asynchronous_copy;
-<<<<<<< .working
-<<<<<<< .working
 
         /* indicate if asynchronous copies to CUDA devices should be disabled */
 	int disable_cuda_asynchronous_copy;
@@ -229,7 +149,6 @@ struct starpu_conf
 	/* A driver that the application will run in one of its own threads. */
 	struct starpu_driver *not_launched_drivers;
 	unsigned n_not_launched_drivers;
-=======
 
 	/* Enable CUDA/OpenGL interoperation on these CUDA devices */
 	int *cuda_opengl_interoperability;
@@ -238,17 +157,6 @@ struct starpu_conf
 	/* A driver that the application will run in one of its own threads. */
 	struct starpu_driver *not_launched_drivers;
 	unsigned n_not_launched_drivers;
->>>>>>> .merge-right.r6541
-=======
-
-	/* Enable CUDA/OpenGL interoperation on these CUDA devices */
-	int *cuda_opengl_interoperability;
-	unsigned n_cuda_opengl_interoperability;
-
-	/* A driver that the application will run in one of its own threads. */
-	struct starpu_driver *not_launched_drivers;
-	unsigned n_not_launched_drivers;
->>>>>>> .merge-right.r6541
 };
 
 /* Initialize a starpu_conf structure with default values. */
@@ -290,26 +198,6 @@ int starpu_combined_worker_get_id(void);
 int starpu_combined_worker_get_size(void);
 int starpu_combined_worker_get_rank(void);
 
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-enum starpu_archtype
-{
-	STARPU_CPU_WORKER, /* CPU core */
-	STARPU_CUDA_WORKER, /* NVIDIA CUDA device */
-	STARPU_OPENCL_WORKER, /* OpenCL CUDA device */
-	STARPU_GORDON_WORKER, /* Cell SPU */
-	STARPU_ALL
-};
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
 
 /* This function returns the type of worker associated to an identifier (as
  * returned by the starpu_worker_get_id function). The returned value indicates
@@ -348,50 +236,13 @@ void starpu_worker_get_name(int id, char *dst, size_t maxlen);
  */
 int starpu_worker_get_devid(int id);
 void starpu_profiling_init();
-	void starpu_display_stats();
-int starpu_driver_run(struct starpu_driver *);
-void starpu_set_end_of_submissions(void);
-
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-int starpu_driver_init(struct starpu_driver *d);
-int starpu_driver_run_once(struct starpu_driver *d);
-int starpu_driver_deinit(struct starpu_driver *d);
-=======
+void starpu_display_stats();
 int starpu_driver_run(struct starpu_driver *);
-void starpu_set_end_of_submissions(void);
-=======
-int starpu_driver_run(struct starpu_driver *d);
 void starpu_drivers_request_termination(void);
->>>>>>> .merge-right.r7640
-=======
-int starpu_driver_run(struct starpu_driver *d);
-void starpu_drivers_request_termination(void);
->>>>>>> .merge-right.r7640
-
-int starpu_driver_init(struct starpu_driver *d);
-int starpu_driver_run_once(struct starpu_driver *d);
-int starpu_driver_deinit(struct starpu_driver *d);
->>>>>>> .merge-right.r6541
-=======
-int starpu_driver_run(struct starpu_driver *);
-void starpu_set_end_of_submissions(void);
-
-int starpu_driver_init(struct starpu_driver *d);
-int starpu_driver_run_once(struct starpu_driver *d);
-int starpu_driver_deinit(struct starpu_driver *d);
->>>>>>> .merge-right.r6541
-=======
-int starpu_driver_run(struct starpu_driver *);
-void starpu_set_end_of_submissions(void);
 
 int starpu_driver_init(struct starpu_driver *d);
 int starpu_driver_run_once(struct starpu_driver *d);
 int starpu_driver_deinit(struct starpu_driver *d);
->>>>>>> .merge-right.r6541
 #ifdef __cplusplus
 }
 #endif

+ 1 - 0
mpi/.gitignore

@@ -0,0 +1 @@
+/.deps

+ 26 - 0
mpi/starpu_mpi_insert_task_cache.h

@@ -0,0 +1,26 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011  Université de Bordeaux 1
+ *
+ * StarPU is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+#include <starpu.h>
+
+#define _STARPU_MPI_CLEAR_SENT_DATA     0
+#define _STARPU_MPI_CLEAR_RECEIVED_DATA 1
+
+extern struct starpu_htbl32_node **sent_data;
+extern struct starpu_htbl32_node **received_data;
+
+void _starpu_mpi_clear_cache_request(starpu_data_handle_t data_handle, int rank, int mode);

+ 0 - 30
src/core/perfmodel/perfmodel_bus.c

@@ -93,18 +93,8 @@ static void measure_bandwidth_between_host_and_dev_on_cpu_with_cuda(int dev, int
 	_starpu_bind_thread_on_cpu(config, cpu);
 	size_t size = SIZE;
 
-<<<<<<< .working
-<<<<<<< .working
 	/* Initialize CUDA context on the device */
 	cudaSetDevice(dev);
-=======
-	/* Initialize CUDA context on the device */
-	starpu_cuda_set_device(dev);
->>>>>>> .merge-right.r6541
-=======
-	/* Initialize CUDA context on the device */
-	starpu_cuda_set_device(dev);
->>>>>>> .merge-right.r6541
 
 	/* hack to avoid third party libs to rebind threads */
 	_starpu_bind_thread_on_cpu(config, cpu);
@@ -198,18 +188,8 @@ static void measure_bandwidth_between_dev_and_dev_cuda(int src, int dst)
 	if (STARPU_UNLIKELY(cures)) STARPU_CUDA_REPORT_ERROR(cures);
         if (size > prop.totalGlobalMem/4) size = prop.totalGlobalMem/4;
 
-<<<<<<< .working
-<<<<<<< .working
 	/* Initialize CUDA context on the source */
 	cudaSetDevice(src);
-=======
-	/* Initialize CUDA context on the source */
-	starpu_cuda_set_device(src);
->>>>>>> .merge-right.r6541
-=======
-	/* Initialize CUDA context on the source */
-	starpu_cuda_set_device(src);
->>>>>>> .merge-right.r6541
 
 	if (starpu_get_env_number("STARPU_DISABLE_CUDA_GPU_GPU_DIRECT") <= 0) {
 		cures = cudaDeviceCanAccessPeer(&can, src, dst);
@@ -226,18 +206,8 @@ static void measure_bandwidth_between_dev_and_dev_cuda(int src, int dst)
 	STARPU_ASSERT(s_buffer);
 	cudaMemset(s_buffer, 0, size);
 
-<<<<<<< .working
-<<<<<<< .working
 	/* Initialize CUDA context on the destination */
 	cudaSetDevice(dst);
-=======
-	/* Initialize CUDA context on the destination */
-	starpu_cuda_set_device(dst);
->>>>>>> .merge-right.r6541
-=======
-	/* Initialize CUDA context on the destination */
-	starpu_cuda_set_device(dst);
->>>>>>> .merge-right.r6541
 
 	if (starpu_get_env_number("STARPU_DISABLE_CUDA_GPU_GPU_DIRECT") <= 0) {
 		cures = cudaDeviceCanAccessPeer(&can, dst, src);

+ 0 - 24
src/core/task.c

@@ -681,7 +681,6 @@ void _starpu_decrement_nsubmitted_tasks(void)
 
 }
 
-<<<<<<< .working
 void
 starpu_drivers_request_termination(void)
 {
@@ -698,29 +697,6 @@ starpu_drivers_request_termination(void)
 	_STARPU_PTHREAD_MUTEX_UNLOCK(&submitted_mutex);
 }
 
-=======
-void
-starpu_set_end_of_submissions(void)
-{
-	struct _starpu_machine_config *config = _starpu_get_machine_config();
-
-	_STARPU_PTHREAD_MUTEX_LOCK(&submitted_mutex);
-
-	config->submitting = 0;
-	if (nsubmitted == 0) {
-		config->running = 0;
-		_STARPU_PTHREAD_COND_BROADCAST(&submitted_cond);
-	}
-
-	_STARPU_PTHREAD_MUTEX_UNLOCK(&submitted_mutex);
-}
-
-void _starpu_check_nsubmitted_tasks(void)
-{
-
-}
-
->>>>>>> .merge-right.r6541
 static void _starpu_increment_nsubmitted_tasks(void)
 {
 	_STARPU_PTHREAD_MUTEX_LOCK(&submitted_mutex);

+ 0 - 532
src/core/workers.c

@@ -251,8 +251,6 @@ static void _starpu_init_worker_queue(struct _starpu_worker *workerarg)
 	_starpu_memory_node_register_condition(cond, mutex, memory_node);
 }
 
-<<<<<<< .working
-<<<<<<< .working
 /*
  * Returns 0 if the given driver is one of the drivers that must be launched by
  * the application itself, and not by StarPU, 1 otherwise.
@@ -328,86 +326,6 @@ void _starpu_worker_init(struct _starpu_worker *worker, unsigned fut_key)
 
 }
 
-=======
-/*
- * Returns 0 if the given driver is one of the drivers that must be launched by
- * the application itself, and not by StarPU, 1 otherwise.
- */
-static unsigned _starpu_may_launch_driver(struct starpu_conf *conf,
-					  struct starpu_driver *d)
-{
-	if (conf->n_not_launched_drivers == 0 ||
-	    conf->not_launched_drivers == NULL)
-		return 1;
-
-	/* Is <d> in conf->not_launched_drivers ? */
-	unsigned i;
-	for (i = 0; i < conf->n_not_launched_drivers; i++)
-	{
-		if (d->type != conf->not_launched_drivers[i].type)
-			continue;
-
-		switch (d->type)
-		{
-		case STARPU_CUDA_WORKER:
-			if (d->id.cuda_id == conf->not_launched_drivers[i].id.cuda_id)
-				return 0;
-			break;
-#ifdef STARPU_USE_OPENCL
-		case STARPU_OPENCL_WORKER:
-			if (d->id.opencl_id == conf->not_launched_drivers[i].id.opencl_id)
-				return 0;
-			break;
-#endif
-		default:
-			STARPU_ABORT();
-		}
-	}
-
-	return 1;
-}
-
->>>>>>> .merge-right.r6541
-=======
-/*
- * Returns 0 if the given driver is one of the drivers that must be launched by
- * the application itself, and not by StarPU, 1 otherwise.
- */
-static unsigned _starpu_may_launch_driver(struct starpu_conf *conf,
-					  struct starpu_driver *d)
-{
-	if (conf->n_not_launched_drivers == 0 ||
-	    conf->not_launched_drivers == NULL)
-		return 1;
-
-	/* Is <d> in conf->not_launched_drivers ? */
-	unsigned i;
-	for (i = 0; i < conf->n_not_launched_drivers; i++)
-	{
-		if (d->type != conf->not_launched_drivers[i].type)
-			continue;
-
-		switch (d->type)
-		{
-		case STARPU_CUDA_WORKER:
-			if (d->id.cuda_id == conf->not_launched_drivers[i].id.cuda_id)
-				return 0;
-			break;
-#ifdef STARPU_USE_OPENCL
-		case STARPU_OPENCL_WORKER:
-			if (d->id.opencl_id == conf->not_launched_drivers[i].id.opencl_id)
-				return 0;
-			break;
-#endif
-		default:
-			STARPU_ABORT();
-		}
-	}
-
-	return 1;
-}
-
->>>>>>> .merge-right.r6541
 static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 {
 	config->running = 1;
@@ -418,15 +336,7 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 	unsigned nworkers = config->topology.nworkers;
 
 	/* Launch workers asynchronously (except for SPUs) */
-<<<<<<< .working
-<<<<<<< .working
 	unsigned cpu = 0, cuda = 0;
-=======
-	unsigned cuda = 0;
->>>>>>> .merge-right.r6541
-=======
-	unsigned cuda = 0;
->>>>>>> .merge-right.r6541
 	unsigned worker;
 
 #ifdef STARPU_PERF_DEBUG
@@ -448,14 +358,11 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 		workerarg->worker_size = 1;
 		workerarg->combined_workerid = workerarg->workerid;
 		workerarg->current_rank = 0;
-<<<<<<< .working
 		workerarg->has_prev_init = 0;
 		/* mutex + cond only for the local list */
 		/* we have a single local list */
 		/* afterwards there would be a mutex + cond for the list of each strategy */
-=======
 		workerarg->run_by_starpu = 1;
->>>>>>> .merge-right.r7640
 
 		_STARPU_PTHREAD_MUTEX_INIT(&workerarg->sched_mutex, NULL);
 		_STARPU_PTHREAD_COND_INIT(&workerarg->sched_cond, NULL);
@@ -503,8 +410,6 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 			case STARPU_CUDA_WORKER:
 				workerarg->set = NULL;
 				workerarg->worker_is_initialized = 0;
-<<<<<<< .working
-<<<<<<< .working
 				driver.id.cuda_id = cuda;
 				if (_starpu_may_launch_driver(config->conf, &driver))
 				{
@@ -519,46 +424,16 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 					workerarg->run_by_starpu = 0;
 				}
 				cuda++;
-=======
-				driver.id.cuda_id = cuda;
-				if (_starpu_may_launch_driver(config->conf, &driver))
-				{
-					pthread_create(&workerarg->worker_thread,
-						       NULL, _starpu_cuda_worker, workerarg);
-				}
-				cuda++;
->>>>>>> .merge-right.r6541
-=======
-				driver.id.cuda_id = cuda;
-				if (_starpu_may_launch_driver(config->conf, &driver))
-				{
-					pthread_create(&workerarg->worker_thread,
-						       NULL, _starpu_cuda_worker, workerarg);
-				}
-				cuda++;
->>>>>>> .merge-right.r6541
 				break;
 #endif
 #ifdef STARPU_USE_OPENCL
 			case STARPU_OPENCL_WORKER:
-<<<<<<< .working
-<<<<<<< .working
 				starpu_opencl_get_device(workerarg->devid, &driver.id.opencl_id);
 				if (!_starpu_may_launch_driver(config->conf, &driver))
 				{
 					workerarg->run_by_starpu = 0;
 					break;
 				}
-=======
-				starpu_opencl_get_device(workerarg->devid, &driver.id.opencl_id);
-				if (!_starpu_may_launch_driver(config->conf, &driver))
-					break;
->>>>>>> .merge-right.r6541
-=======
-				starpu_opencl_get_device(workerarg->devid, &driver.id.opencl_id);
-				if (!_starpu_may_launch_driver(config->conf, &driver))
-					break;
->>>>>>> .merge-right.r6541
 				workerarg->set = NULL;
 				workerarg->worker_is_initialized = 0;
 				_STARPU_PTHREAD_CREATE(
@@ -605,16 +480,8 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 		}
 	}
 
-<<<<<<< .working
-<<<<<<< .working
 	cpu  = 0;
 	cuda = 0;
-=======
-	cuda = 0;
->>>>>>> .merge-right.r6541
-=======
-	cuda = 0;
->>>>>>> .merge-right.r6541
 	for (worker = 0; worker < nworkers; worker++)
 	{
 		struct _starpu_worker *workerarg = &config->workers[worker];
@@ -624,8 +491,6 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 		switch (workerarg->arch)
 		{
 			case STARPU_CPU_WORKER:
-<<<<<<< .working
-<<<<<<< .working
 				driver.id.cpu_id = cpu;
 				if (!_starpu_may_launch_driver(config->conf, &driver))
 				{
@@ -638,20 +503,6 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 				_STARPU_PTHREAD_MUTEX_UNLOCK(&workerarg->mutex);
 				cpu++;
 				break;
-=======
-				_STARPU_PTHREAD_MUTEX_LOCK(&workerarg->mutex);
-				while (!workerarg->worker_is_initialized)
-					_STARPU_PTHREAD_COND_WAIT(&workerarg->ready_cond, &workerarg->mutex);
-				_STARPU_PTHREAD_MUTEX_UNLOCK(&workerarg->mutex);
-				break;
->>>>>>> .merge-right.r6541
-=======
-				_STARPU_PTHREAD_MUTEX_LOCK(&workerarg->mutex);
-				while (!workerarg->worker_is_initialized)
-					_STARPU_PTHREAD_COND_WAIT(&workerarg->ready_cond, &workerarg->mutex);
-				_STARPU_PTHREAD_MUTEX_UNLOCK(&workerarg->mutex);
-				break;
->>>>>>> .merge-right.r6541
 			case STARPU_CUDA_WORKER:
 				driver.id.cuda_id = cuda;
 				if (!_starpu_may_launch_driver(config->conf, &driver))
@@ -850,9 +701,6 @@ int starpu_init(struct starpu_conf *user_conf)
 
 	srand(2008);
 
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 #ifdef STARPU_USE_FXT
 	_starpu_start_fxt_profiling();
 #endif
@@ -867,12 +715,6 @@ int starpu_init(struct starpu_conf *user_conf)
 
 	_starpu_load_bus_performance_files();
 
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
 	/* store the pointer to the user explicit configuration during the
 	 * initialization */
 	if (user_conf == NULL)
@@ -893,65 +735,11 @@ int starpu_init(struct starpu_conf *user_conf)
 	}
 	_starpu_conf_check_environment(config.conf);
 
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 	_starpu_init_all_sched_ctxs(&config);
-=======
-=======
 	_starpu_init_progression_hooks();
 
 	_starpu_init_tags();
 
->>>>>>> .merge-right.r7640
-#ifdef STARPU_USE_FXT
-	_starpu_start_fxt_profiling();
-#endif
-
-	_starpu_open_debug_logfile();
-
-	_starpu_data_interface_init();
-
-	_starpu_timing_init();
-
-	_starpu_profiling_init();
-
-	_starpu_load_bus_performance_files();
-
->>>>>>> .merge-right.r6541
-=======
-#ifdef STARPU_USE_FXT
-	_starpu_start_fxt_profiling();
-#endif
-
-	_starpu_open_debug_logfile();
-
-	_starpu_data_interface_init();
-
-	_starpu_timing_init();
-
-	_starpu_profiling_init();
-
-	_starpu_load_bus_performance_files();
-
->>>>>>> .merge-right.r6541
-=======
-#ifdef STARPU_USE_FXT
-	_starpu_start_fxt_profiling();
-#endif
-
-	_starpu_open_debug_logfile();
-
-	_starpu_data_interface_init();
-
-	_starpu_timing_init();
-
-	_starpu_profiling_init();
-
-	_starpu_load_bus_performance_files();
-
->>>>>>> .merge-right.r6541
 	ret = _starpu_build_topology(&config);
 	if (ret)
 	{
@@ -1408,11 +1196,6 @@ int starpu_worker_get_nids_by_type(enum starpu_archtype type, int *workerids, in
 
 	return cnt;
 }
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-
-<<<<<<< .working
 
 int starpu_worker_get_available_ids_by_type(enum starpu_archtype type, int *workerids, int maxsize)
 {
@@ -1487,124 +1270,6 @@ struct _starpu_sched_ctx* _starpu_get_initial_sched_ctx(void)
 	return &config.sched_ctxs[0];
 }
 
-#ifdef STARPU_USE_CUDA
-extern int _starpu_run_cuda(struct starpu_driver *);
-#endif
-#ifdef STARPU_USE_OPENCL
-extern int _starpu_run_opencl(struct starpu_driver *);
-#endif
-
-=======
->>>>>>> .merge-right.r7640
-int
-starpu_driver_run(struct starpu_driver *d)
-{
-	if (!d)
-		return -EINVAL;
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CPU
-	case STARPU_CPU_WORKER:
-		return _starpu_run_cpu(d);
-#endif
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_run_cuda(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_run_opencl(d);
-#endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_init(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CPU
-	case STARPU_CPU_WORKER:
-		return _starpu_cpu_driver_init(d);
-#endif
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_init(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_opencl_driver_init(d);
-#endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_run_once(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CPU
-	case STARPU_CPU_WORKER:
-		return _starpu_cpu_driver_run_once(d);
-#endif
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_run_once(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_opencl_driver_run_once(d);
-#endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_deinit(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CPU
-	case STARPU_CPU_WORKER:
-		return _starpu_cpu_driver_deinit(d);
-#endif
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_deinit(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_opencl_driver_deinit(d);
-#endif
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-=======
-
-#ifdef STARPU_USE_CUDA
-extern int _starpu_run_cuda(struct starpu_driver *);
-#endif
-#ifdef STARPU_USE_OPENCL
-extern int _starpu_run_opencl(struct starpu_driver *);
-#endif
-
 int
 starpu_driver_run(struct starpu_driver *d)
 {
@@ -1628,202 +1293,6 @@ starpu_driver_run(struct starpu_driver *d)
 	}
 }
 
-#ifdef STARPU_USE_CUDA
-extern int _starpu_cuda_driver_init(struct starpu_driver *);
-extern int _starpu_cuda_driver_run_once(struct starpu_driver *);
-extern int _starpu_cuda_driver_deinit(struct starpu_driver *);
-#endif
-
-int
-starpu_driver_init(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_init(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_run_once(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_run_once(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_deinit(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_deinit(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
->>>>>>> .merge-right.r6541
-=======
-
-#ifdef STARPU_USE_CUDA
-extern int _starpu_run_cuda(struct starpu_driver *);
-#endif
-#ifdef STARPU_USE_OPENCL
-extern int _starpu_run_opencl(struct starpu_driver *);
-#endif
-
-int
-starpu_driver_run(struct starpu_driver *d)
-{
-	if (!d)
-		return -EINVAL;
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_run_cuda(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_run_opencl(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-#ifdef STARPU_USE_CUDA
-extern int _starpu_cuda_driver_init(struct starpu_driver *);
-extern int _starpu_cuda_driver_run_once(struct starpu_driver *);
-extern int _starpu_cuda_driver_deinit(struct starpu_driver *);
-#endif
-
-int
-starpu_driver_init(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_init(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_run_once(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_run_once(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-int
-starpu_driver_deinit(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d);
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_cuda_driver_deinit(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_OPENCL_WORKER: /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
->>>>>>> .merge-right.r6541
-=======
-
-#ifdef STARPU_USE_CUDA
-extern int _starpu_run_cuda(struct starpu_driver *);
-#endif
-#ifdef STARPU_USE_OPENCL
-extern int _starpu_run_opencl(struct starpu_driver *);
-#endif
-
-int
-starpu_driver_run(struct starpu_driver *d)
-{
-	if (!d)
-		return -EINVAL;
-
-	switch (d->type)
-	{
-#ifdef STARPU_USE_CUDA
-	case STARPU_CUDA_WORKER:
-		return _starpu_run_cuda(d);
-#endif
-#ifdef STARPU_USE_OPENCL
-	case STARPU_OPENCL_WORKER:
-		return _starpu_run_opencl(d);
-#endif
-	case STARPU_CPU_WORKER:    /* Not supported yet */
-	case STARPU_GORDON_WORKER: /* Not supported yet */
-	default:
-		return -EINVAL;
-	}
-}
-
-#ifdef STARPU_USE_CUDA
-extern int _starpu_cuda_driver_init(struct starpu_driver *);
-extern int _starpu_cuda_driver_run_once(struct starpu_driver *);
-extern int _starpu_cuda_driver_deinit(struct starpu_driver *);
-#endif
-
 int
 starpu_driver_init(struct starpu_driver *d)
 {
@@ -1880,4 +1349,3 @@ starpu_driver_deinit(struct starpu_driver *d)
 		return -EINVAL;
 	}
 }
->>>>>>> .merge-right.r6541

+ 0 - 35
src/core/workers.h

@@ -69,23 +69,9 @@ struct _starpu_worker
 	int current_rank; /* current rank in case the worker is used in a parallel fashion */
 	int worker_size; /* size of the worker in case we use a combined worker */
         pthread_cond_t ready_cond; /* indicate when the worker is ready */
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 	unsigned memory_node; /* which memory node is the worker associated with ? */
 	pthread_cond_t sched_cond; /* condition variable used when the worker waits for tasks. */
 	pthread_mutex_t sched_mutex; /* mutex protecting sched_cond */
-=======
-	unsigned memory_node; /* which memory node is the worker associated with ? */
-=======
-	unsigned memory_node; /* which memory node is the worker associated with ? */
->>>>>>> .merge-right.r6541
-=======
-	unsigned memory_node; /* which memory node is the worker associated with ? */
->>>>>>> .merge-right.r6541
-	pthread_cond_t *sched_cond; /* condition variable used when the worker waits for tasks. */
-	pthread_mutex_t *sched_mutex; /* mutex protecting sched_cond */
->>>>>>> .merge-right.r6541
 	struct starpu_task_list local_tasks; /* this queue contains tasks that have been explicitely submitted to that queue */
 	struct starpu_task *current_task; /* task currently executed by this worker */
 	struct _starpu_worker_set *set; /* in case this worker belongs to a set */
@@ -187,33 +173,12 @@ struct _starpu_machine_config
 
 	/* this flag is set until the runtime is stopped */
 	unsigned running;
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 
 	/* all the sched ctx of the current instance of starpu */
 	struct _starpu_sched_ctx sched_ctxs[STARPU_NMAX_SCHED_CTXS];
-=======
-
-	/* this flag is set until the application is finished submitting tasks */
-	unsigned submitting;
->>>>>>> .merge-right.r6541
-=======
-
-	/* this flag is set until the application is finished submitting tasks */
-	unsigned submitting;
->>>>>>> .merge-right.r6541
-=======
-
-	/* this flag is set until the application is finished submitting tasks */
-	unsigned submitting;
->>>>>>> .merge-right.r6541
-=======
 
 	/* this flag is set until the application is finished submitting tasks */
 	unsigned submitting;
->>>>>>> .merge-right.r6541
 };
 
 /* Has starpu_shutdown already been called ? */

+ 2 - 73
src/drivers/cpu/driver_cpu.c

@@ -219,83 +219,33 @@ int _starpu_cpu_driver_run_once(struct starpu_driver *d STARPU_ATTRIBUTE_UNUSED)
 	struct starpu_task *task;
 	int res;
 
-<<<<<<< .working
-	pthread_cond_t *sched_cond = &cpu_arg->sched_cond;
-	pthread_mutex_t *sched_mutex = &cpu_arg->sched_mutex;
-	struct timespec start_time, end_time;
-	unsigned idle = 0;
-	while (_starpu_machine_is_running())
-	{
-		_STARPU_TRACE_START_PROGRESS(memnode);
-		_starpu_datawizard_progress(memnode, 1);
-		_STARPU_TRACE_END_PROGRESS(memnode);
-=======
 	task = _starpu_get_worker_task(cpu_worker, workerid, memnode);
->>>>>>> .merge-right.r7640
 
-<<<<<<< .working
-		/* take the mutex inside pop because it depends what mutex:
-		   the one of the local task or the one of one of the strategies */
-=======
 	if (!task)
 		return 0;
 
->>>>>>> .merge-right.r7640
 	j = _starpu_get_job_associated_to_task(task);
 
-<<<<<<< .working
-                if (!task)
-		{
-			_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
-			if (_starpu_worker_can_block(memnode))
-				_starpu_block_worker(workerid, sched_cond, sched_mutex);
-			else
-			{
-				_starpu_clock_gettime(&start_time);
-				_starpu_worker_register_sleeping_start_date(workerid, &start_time);
-				idle = 1;
-=======
-	/* can a cpu perform that task ? */
+ 	/* can a cpu perform that task ? */
 	if (!_STARPU_CPU_MAY_PERFORM(j))
 	{
 		/* put it and the end of the queue ... XXX */
 		_starpu_push_task(j);
 		return 0;
 	}
->>>>>>> .merge-right.r7640
 
-<<<<<<< .working
-			}
-			_STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
-=======
 	int rank = 0;
 	int is_parallel_task = (j->task_size > 1);
 
->>>>>>> .merge-right.r7640
 	enum starpu_perf_archtype perf_arch;
 
-<<<<<<< .working
-		if(idle)
-		{
-			_starpu_clock_gettime(&end_time);
-			
-			int profiling = starpu_profiling_status_get();
-			if (profiling)
-			{
-				struct timespec sleeping_time;
-				starpu_timespec_sub(&end_time, &start_time, &sleeping_time);
-				_starpu_worker_update_profiling_info_sleeping(workerid, &start_time, &end_time);
-			}
-			idle = 0;
-		}
-=======
 	/* Get the rank in case it is a parallel task */
 	if (is_parallel_task)
 	{
 		_STARPU_PTHREAD_MUTEX_LOCK(&j->sync_mutex);
 		rank = j->active_task_alias_count++;
 		_STARPU_PTHREAD_MUTEX_UNLOCK(&j->sync_mutex);
->>>>>>> .merge-right.r7640
+
 
 		struct _starpu_combined_worker *combined_worker;
 		combined_worker = _starpu_get_combined_worker_struct(j->combined_workerid);
@@ -355,25 +305,7 @@ int _starpu_cpu_driver_deinit(struct starpu_driver *d STARPU_ATTRIBUTE_UNUSED)
 	cpu_worker = _starpu_get_local_worker_key();
 	STARPU_ASSERT(cpu_worker);
 
-<<<<<<< .working
-		/* In the case of combined workers, we need to inform the
-		 * scheduler each worker's execution is over.
-		 * Then we free the workers' task alias */
-		if (is_parallel_task)
-		{
-			_starpu_sched_post_exec_hook(task);
-			free(task);
-		}
-
-		if (rank == 0)
-			_starpu_handle_job_termination(j, workerid);
-        }
-
-	_STARPU_TRACE_WORKER_DEINIT_START
-
-=======
 	unsigned memnode = cpu_worker->memory_node;
->>>>>>> .merge-right.r7640
 	_starpu_handle_all_pending_node_data_requests(memnode);
 
 	/* In case there remains some memory that was automatically
@@ -383,7 +315,6 @@ int _starpu_cpu_driver_deinit(struct starpu_driver *d STARPU_ATTRIBUTE_UNUSED)
 
 	_STARPU_TRACE_WORKER_DEINIT_END(_STARPU_FUT_CPU_KEY);
 
-<<<<<<< .working
 	return 0;
 }
 
@@ -402,8 +333,6 @@ _starpu_cpu_worker(void *arg)
 		_starpu_cpu_driver_run_once(&d);
 	_starpu_cpu_driver_deinit(&d);
 
-=======
->>>>>>> .merge-right.r6541
 	return NULL;
 }
 

+ 0 - 278
src/drivers/cuda/driver_cuda.c

@@ -27,23 +27,10 @@
 #include <drivers/driver_common/driver_common.h>
 #include "driver_cuda.h"
 #include <core/sched_policy.h>
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
 #include <core/sched_ctx.h>
-=======
-=======
 #ifdef HAVE_CUDA_GL_INTEROP_H
->>>>>>> .merge-right.r7640
 #include <cuda_gl_interop.h>
-<<<<<<< .working
->>>>>>> .merge-right.r6541
-=======
 #endif
->>>>>>> .merge-right.r7640
-=======
-#include <cuda_gl_interop.h>
->>>>>>> .merge-right.r6541
 
 /* the number of CUDA devices */
 static int ncudagpus;
@@ -143,17 +130,11 @@ const struct cudaDeviceProp *starpu_cuda_get_device_properties(unsigned workerid
 void starpu_cuda_set_device(int devid)
 {
 	cudaError_t cures;
-<<<<<<< .working
 	struct starpu_conf *conf = _starpu_get_machine_config()->conf;
 #if !defined(HAVE_CUDA_MEMCPY_PEER) && defined(HAVE_CUDA_GL_INTEROP_H)
 	unsigned i;
 #endif
-=======
-	struct starpu_conf *conf = _starpu_get_machine_config()->conf;
-	unsigned i;
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 #ifdef HAVE_CUDA_MEMCPY_PEER
 	if (conf->n_cuda_opengl_interoperability) {
 		fprintf(stderr, "OpenGL interoperability was requested, but StarPU was built with multithread GPU control support, please reconfigure with --disable-cuda-memcpy-peer but that will disable the memcpy-peer optimizations\n");
@@ -172,36 +153,15 @@ void starpu_cuda_set_device(int devid)
 		}
 #endif
 
-=======
-#ifdef HAVE_CUDA_MEMCPY_PEER
-	if (conf->n_cuda_opengl_interoperability) {
-		fprintf(stderr, "OpenGL interoperability was requested, but StarPU was built with multithread GPU control support, please reconfigure with --disable-cuda-memcpy-peer but that will disable the memcpy-peer optimizations\n");
-		STARPU_ASSERT(0);
-	}
-#else
-	for (i = 0; i < conf->n_cuda_opengl_interoperability; i++)
-		if (conf->cuda_opengl_interoperability[i] == devid) {
-			cures = cudaGLSetGLDevice(devid);
-			goto done;
-		}
-#endif
-
->>>>>>> .merge-right.r6541
 	cures = cudaSetDevice(devid);
-<<<<<<< .working
 
 #if !defined(HAVE_CUDA_MEMCPY_PEER) && defined(HAVE_CUDA_GL_INTEROP_H)
 done:
 #endif
-=======
-
-done:
->>>>>>> .merge-right.r6541
 	if (STARPU_UNLIKELY(cures))
 		STARPU_CUDA_REPORT_ERROR(cures);
 }
 
-<<<<<<< .working
 static void init_context(int devid)
 {
 	cudaError_t cures;
@@ -228,16 +188,6 @@ static void init_context(int devid)
 		}
 	}
 #endif
-
-=======
-static void init_context(int devid)
-{
-	cudaError_t cures;
-	int workerid = starpu_worker_get_id();
-
-	starpu_cuda_set_device(devid);
-
->>>>>>> .merge-right.r6541
 	/* force CUDA to initialize the context for real */
 	cures = cudaFree(0);
 	if (STARPU_UNLIKELY(cures)) {
@@ -361,7 +311,6 @@ static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *arg
 static struct _starpu_worker*
 _starpu_get_worker_from_driver(struct starpu_driver *d)
 {
-<<<<<<< .working
 	unsigned nworkers = starpu_worker_get_count();
 	unsigned  workerid;
 	for (workerid = 0; workerid < nworkers; workerid++)
@@ -374,51 +323,19 @@ _starpu_get_worker_from_driver(struct starpu_driver *d)
 				return worker;
 		}
 	}
-=======
-	int workers[d->id.cuda_id + 1];
-	int nworkers;
-	nworkers = starpu_worker_get_ids_by_type(STARPU_CUDA_WORKER, workers, d->id.cuda_id+1);
-	if (nworkers >= 0 && (unsigned) nworkers < d->id.cuda_id)
-		return NULL; // No device was found.
-	
-	return _starpu_get_worker_struct(workers[d->id.cuda_id]);
-}
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 	return NULL;
 }
-=======
-/* XXX Should this be merged with _starpu_init_cuda ? */
-int _starpu_cuda_driver_init(struct starpu_driver *d)
-{
-	struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
-	STARPU_ASSERT(args);
 
-	int devid = args->devid;
-	unsigned memory_node = args->memory_node;
->>>>>>> .merge-right.r6541
-
-<<<<<<< .working
 /* XXX Should this be merged with _starpu_init_cuda ? */
 int _starpu_cuda_driver_init(struct starpu_driver *d)
 {
 	struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
 	STARPU_ASSERT(args);
-=======
-#ifdef STARPU_USE_FXT
-	_starpu_fxt_register_thread(args->bindid);
-#endif
-	_STARPU_TRACE_WORKER_INIT_START(_STARPU_FUT_CUDA_KEY, devid, memory_node);
->>>>>>> .merge-right.r6541
 
 	int devid = args->devid;
 
-<<<<<<< .working
 	_starpu_worker_init(args, _STARPU_FUT_CUDA_KEY);
-=======
-	_starpu_set_local_memory_node_key(&args->memory_node);
->>>>>>> .merge-right.r6541
 
 	init_context(devid);
 
@@ -456,144 +373,27 @@ int _starpu_cuda_driver_init(struct starpu_driver *d)
 	return 0;
 }
 
-<<<<<<< .working
-<<<<<<< .working
-	pthread_cond_t *sched_cond = &args->sched_cond;
-	pthread_mutex_t *sched_mutex = &args->sched_mutex;
-	struct timespec start_time, end_time;
-	unsigned idle = 0;
-	while (_starpu_machine_is_running())
-	{
-		_STARPU_TRACE_START_PROGRESS(memnode);
-		_starpu_datawizard_progress(memnode, 1);
-		_STARPU_TRACE_END_PROGRESS(memnode);
-=======
 int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 {
 	struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
 	STARPU_ASSERT(args);
->>>>>>> .merge-right.r6541
-=======
-int _starpu_cuda_driver_run_once(struct starpu_driver *d)
-{
-	struct _starpu_worker* args = _starpu_get_worker_from_driver(d);
-	STARPU_ASSERT(args);
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
-<<<<<<< .working
-=======
-	unsigned memnode = args->memory_node;
-	int workerid = args->workerid;
-=======
 	unsigned memnode = args->memory_node;
 	int workerid = args->workerid;
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
->>>>>>> .merge-right.r6541
 	_STARPU_TRACE_START_PROGRESS(memnode);
 	_starpu_datawizard_progress(memnode, 1);
 	_STARPU_TRACE_END_PROGRESS(memnode);
-=======
-	_STARPU_TRACE_START_PROGRESS(memnode);
-	_starpu_datawizard_progress(memnode, 1);
-	_STARPU_TRACE_END_PROGRESS(memnode);
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
-<<<<<<< .working
-<<<<<<< .working
-		if (!task) 
-		{
-			_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
-			if (_starpu_worker_can_block(memnode))
-				_starpu_block_worker(workerid, sched_cond, sched_mutex);
-			else
-			{
-				_starpu_clock_gettime(&start_time);
-				_starpu_worker_register_sleeping_start_date(workerid, &start_time);
-				idle = 1;
-			}
-		  
-=======
-	_STARPU_PTHREAD_MUTEX_LOCK(args->sched_mutex);
->>>>>>> .merge-right.r6541
-=======
-	_STARPU_PTHREAD_MUTEX_LOCK(args->sched_mutex);
->>>>>>> .merge-right.r6541
-
-<<<<<<< .working
-<<<<<<< .working
-			_STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
-=======
-	struct starpu_task *task = _starpu_pop_task(args);
-=======
 	struct starpu_task *task;
->>>>>>> .merge-right.r7640
-	struct _starpu_job *j = NULL;
->>>>>>> .merge-right.r6541
-=======
-	struct starpu_task *task = _starpu_pop_task(args);
 	struct _starpu_job *j = NULL;
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 	task = _starpu_get_worker_task(args, workerid, memnode);
-=======
-	if (task == NULL)
-	{
-		if (_starpu_worker_can_block(memnode))
-			_starpu_block_worker(workerid, args->sched_cond, args->sched_mutex);
->>>>>>> .merge-right.r6541
-
-<<<<<<< .working
-<<<<<<< .working
-		if(idle)
-		{
-			_starpu_clock_gettime(&end_time);
-			
-			int profiling = starpu_profiling_status_get();
-			if (profiling)
-			{
-				struct timespec sleeping_time;
-				starpu_timespec_sub(&end_time, &start_time, &sleeping_time);
-				_starpu_worker_update_profiling_info_sleeping(workerid, &start_time, &end_time);
-			}
-			idle = 0;
-		}
-=======
-		_STARPU_PTHREAD_MUTEX_UNLOCK(args->sched_mutex);
-
-		return 0;
-	}
-
-	_STARPU_PTHREAD_MUTEX_UNLOCK(args->sched_mutex);
->>>>>>> .merge-right.r6541
-
-<<<<<<< .working
-=======
 	if (!task)
->>>>>>> .merge-right.r7640
 		return 0;
-=======
-	STARPU_ASSERT(task);
-	j = _starpu_get_job_associated_to_task(task);
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 	j = _starpu_get_job_associated_to_task(task);
-=======
-	/* can CUDA do that task ? */
-	if (!_STARPU_CUDA_MAY_PERFORM(j))
-	{
-		/* this is neither a cuda or a cublas task */
-		_starpu_push_task(j);
-		return 0;
-	}
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 	/* can CUDA do that task ? */
 	if (!_STARPU_CUDA_MAY_PERFORM(j))
 	{
@@ -601,12 +401,7 @@ int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 		_starpu_push_task(j);
 		return 0;
 	}
-=======
-	_starpu_set_current_task(task);
-	args->current_task = j->task;
->>>>>>> .merge-right.r6541
 
-<<<<<<< .working
 	_starpu_set_current_task(task);
 	args->current_task = j->task;
 
@@ -618,16 +413,6 @@ int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 	if (res)
 	{
 		switch (res)
-=======
-	int res = execute_job_on_cuda(j, args);
-
-	_starpu_set_current_task(NULL);
-	args->current_task = NULL;
-
-	if (res)
-	{
-		switch (res)
->>>>>>> .merge-right.r6541
 		{
 			case -EAGAIN:
 				_STARPU_DISP("ouch, put the codelet %p back ... \n", j);
@@ -636,14 +421,6 @@ int _starpu_cuda_driver_run_once(struct starpu_driver *d)
 			default:
 				STARPU_ABORT();
 		}
-<<<<<<< .working
-<<<<<<< .working
-
-		_starpu_handle_job_termination(j, workerid);
-=======
->>>>>>> .merge-right.r6541
-=======
->>>>>>> .merge-right.r6541
 	}
 
 	_starpu_handle_job_termination(j);
@@ -729,7 +506,6 @@ void starpu_cuda_report_error(const char *func, const char *file, int line, cuda
 	printf("oops in %s (%s:%d)... %d: %s \n", func, file, line, status, errormsg);
 	STARPU_ABORT();
 }
-<<<<<<< .working
 
 int starpu_cuda_copy_async_sync(void *src_ptr, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_ptr, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t ssize, cudaStream_t stream, enum cudaMemcpyKind kind)
 {
@@ -782,57 +558,3 @@ int _starpu_run_cuda(struct starpu_driver *d)
 
 	return 0;
 }
-=======
-
-int starpu_cuda_copy_async_sync(void *src_ptr, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_ptr, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t ssize, cudaStream_t stream, enum cudaMemcpyKind kind)
-{
-	cudaError_t cures = 0;
-
-	if (stream)
-	{
-	     _STARPU_TRACE_START_DRIVER_COPY_ASYNC(src_node, dst_node);
-	     cures = cudaMemcpyAsync((char *)dst_ptr, (char *)src_ptr, ssize, kind, stream);
-	     _STARPU_TRACE_END_DRIVER_COPY_ASYNC(src_node, dst_node);
-	}
-	/* Test if the asynchronous copy has failed or if the caller only asked for a synchronous copy */
-	if (stream == NULL || cures)
-	{
-		/* do it in a synchronous fashion */
-		cures = cudaMemcpy((char *)dst_ptr, (char *)src_ptr, ssize, kind);
-
-		if (STARPU_UNLIKELY(cures))
-			STARPU_CUDA_REPORT_ERROR(cures);
-
-		return 0;
-	}
-
-	return -EAGAIN;
-}
-
-int _starpu_run_cuda(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d && d->type == STARPU_CUDA_WORKER);
-
-	int workers[d->id.cuda_id + 1];
-	int nworkers;
-	nworkers = starpu_worker_get_ids_by_type(STARPU_CUDA_WORKER, workers, d->id.cuda_id+1);
-	if (nworkers >= 0 && (unsigned) nworkers < d->id.cuda_id)
-		return -ENODEV;
-	
-	_STARPU_DEBUG("Running cuda %d from the application\n", d->id.cuda_id);
-
-	struct _starpu_worker *workerarg = _starpu_get_worker_struct(workers[d->id.cuda_id]);
-
-	workerarg->set = NULL;
-	workerarg->worker_is_initialized = 0;
-
-	/* Let's go ! */
-	_starpu_cuda_worker(workerarg);
-
-	/* XXX: Should we wait for the driver to be ready, as it is done when
-	 * launching it the usual way ? Cf. the end of _starpu_launch_drivers()
-	 */
-
-	return 0;
-}
->>>>>>> .merge-right.r6541

+ 0 - 80
src/drivers/opencl/driver_opencl.c

@@ -488,43 +488,17 @@ int _starpu_opencl_driver_run_once(struct starpu_driver *d)
 	struct starpu_task *task;
 	int res;
 
-<<<<<<< .working
-	pthread_cond_t *sched_cond = &args->sched_cond;
-    pthread_mutex_t *sched_mutex = &args->sched_mutex;
-
-	while (_starpu_machine_is_running())
-	{
-		_STARPU_TRACE_START_PROGRESS(memnode);
-		_starpu_datawizard_progress(memnode, 1);
-		_STARPU_TRACE_END_PROGRESS(memnode);
-=======
 	_STARPU_TRACE_START_PROGRESS(memnode);
 	_starpu_datawizard_progress(memnode, 1);
 	_STARPU_TRACE_END_PROGRESS(memnode);
->>>>>>> .merge-right.r7640
 
-<<<<<<< .working
-=======
 	task = _starpu_get_worker_task(args, workerid, memnode);
 
->>>>>>> .merge-right.r7640
 	if (task == NULL)
 		return 0;
-<<<<<<< .working
-		
-		if (task == NULL) 
-		{
-			_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
-			if (_starpu_worker_can_block(memnode))
-				_starpu_block_worker(workerid, sched_cond, sched_mutex);
-=======
 
 	j = _starpu_get_job_associated_to_task(task);
->>>>>>> .merge-right.r7640
 
-<<<<<<< .working
-			_STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
-=======
 	/* can OpenCL do that task ? */
 	if (!_STARPU_OPENCL_MAY_PERFORM(j))
 	{
@@ -532,16 +506,12 @@ int _starpu_opencl_driver_run_once(struct starpu_driver *d)
 		_starpu_push_task(j);
 		return 0;
 	}
->>>>>>> .merge-right.r7640
 
 	_starpu_set_current_task(j->task);
 	args->current_task = j->task;
 
-<<<<<<< .working
-=======
 	res = _starpu_opencl_execute_job(j, args);
 
->>>>>>> .merge-right.r7640
 	_starpu_set_current_task(NULL);
 	args->current_task = NULL;
 
@@ -574,13 +544,8 @@ int _starpu_opencl_driver_deinit(struct starpu_driver *d)
 	unsigned devid   = args->devid;
 	unsigned memnode = args->memory_node;
 
-<<<<<<< .working
-		_starpu_handle_job_termination(j, workerid);
-	}
-=======
 	_starpu_handle_all_pending_node_data_requests(memnode);
         _starpu_opencl_deinit_context(devid);
->>>>>>> .merge-right.r7640
 
 	return 0;
 }
@@ -596,14 +561,11 @@ void *_starpu_opencl_worker(void *arg)
 		.id.opencl_id = id
 	};
 
-<<<<<<< .working
 	_starpu_opencl_driver_init(&d);
 	while (_starpu_machine_is_running())
 		_starpu_opencl_driver_run_once(&d);
 	_starpu_opencl_driver_deinit(&d);
 
-=======
->>>>>>> .merge-right.r6541
 	return NULL;
 }
 
@@ -687,7 +649,6 @@ static int _starpu_opencl_execute_job(struct _starpu_job *j, struct _starpu_work
 
 	return EXIT_SUCCESS;
 }
-<<<<<<< .working
 
 int _starpu_run_opencl(struct starpu_driver *d)
 {
@@ -727,44 +688,3 @@ int _starpu_run_opencl(struct starpu_driver *d)
 
 	return 0;
 }
-=======
-
-int _starpu_run_opencl(struct starpu_driver *d)
-{
-	STARPU_ASSERT(d && d->type == STARPU_OPENCL_WORKER);
-
-	int nworkers;
-	int workers[STARPU_MAXOPENCLDEVS];
-	nworkers = starpu_worker_get_ids_by_type(STARPU_OPENCL_WORKER, workers, STARPU_MAXOPENCLDEVS);
-	if (nworkers == 0)
-		return -ENODEV;
-
-	int i;
-	for (i = 0; i < nworkers; i++)
-	{
-		cl_device_id device;
-		int devid = starpu_worker_get_devid(workers[i]);
-		starpu_opencl_get_device(devid, &device);
-		if (device == d->id.opencl_id)
-			break;
-	}
-
-	if (i == nworkers)
-		return -ENODEV;
-
-	struct _starpu_worker *workerarg = _starpu_get_worker_struct(i);
-	_STARPU_DEBUG("Running OpenCL %d from the application\n", workerarg->devid);
-
-	workerarg->set = NULL;
-	workerarg->worker_is_initialized = 0;
-
-	/* Let's go ! */
-	_starpu_opencl_worker(workerarg);
-
-	/* XXX: Should we wait for the driver to be ready, as it is done when
-	 * launching it the usual way ? Cf. the end of _starpu_launch_drivers()
-	 */
-
-	return 0;
-}
->>>>>>> .merge-right.r6541