Kaynağa Gözat

src: define node_ops structs in the drivers code

Nathalie Furmento 6 yıl önce
ebeveyn
işleme
e06e0fe944

+ 2 - 1
src/core/disk.c

@@ -37,6 +37,7 @@
 
 #include <drivers/cuda/driver_cuda.h>
 #include <drivers/opencl/driver_opencl.h>
+#include <drivers/disk/driver_disk.h>
 #include <profiling/profiling.h>
 #include <common/uthash.h>
 
@@ -76,7 +77,7 @@ int starpu_disk_register(struct starpu_disk_ops *func, void *parameter, starpu_s
 {
 	STARPU_ASSERT_MSG(size < 0 || size >= STARPU_DISK_SIZE_MIN, "Minimum disk size is %d Bytes ! (Here %d) \n", (int) STARPU_DISK_SIZE_MIN, (int) size);
 	/* register disk */
-	unsigned disk_memnode = _starpu_memory_node_register(STARPU_DISK_RAM, 0);
+	unsigned disk_memnode = _starpu_memory_node_register(STARPU_DISK_RAM, 0, &_starpu_driver_disk_node_ops);
 
         /* Connect the disk memory node to all numa memory nodes */
         int nb_numa_nodes = starpu_memory_nodes_get_numa_count();

+ 8 - 10
src/core/topology.c

@@ -37,7 +37,6 @@
 #include <datawizard/datastats.h>
 #include <datawizard/memory_nodes.h>
 #include <datawizard/memory_manager.h>
-#include <datawizard/node_ops.h>
 
 #include <common/uthash.h>
 
@@ -2272,7 +2271,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 				if (numa_starpu_id == -1)
 				{
 					int devid = numa_logical_id == STARPU_NUMA_MAIN_RAM ? 0 : numa_logical_id;
-					int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, devid);
+					int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, devid, &_starpu_driver_cpu_node_ops);
 					_starpu_memory_manager_set_global_memory_size(memnode, _starpu_cpu_get_global_mem_size(devid, config));
 					STARPU_ASSERT_MSG(memnode < STARPU_MAXNUMANODES, "Wrong Memory Node : %d (only %d available)", memnode, STARPU_MAXNUMANODES);
 					numa_memory_nodes_to_hwloclogid[memnode] = numa_logical_id;
@@ -2319,7 +2318,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 
 			if (numa_starpu_id == -1)
 			{
-				int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, obj->logical_index);
+				int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, obj->logical_index, &_starpu_driver_cpu_node_ops);
 				_starpu_memory_manager_set_global_memory_size(memnode, _starpu_cpu_get_global_mem_size(obj->logical_index, config));
 				STARPU_ASSERT_MSG(memnode < STARPU_MAXNUMANODES, "Wrong Memory Node : %d (only %d available)", memnode, STARPU_MAXNUMANODES);
 				numa_memory_nodes_to_hwloclogid[memnode] = obj->logical_index;
@@ -2379,7 +2378,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 
 					if (numa_starpu_id == -1)
 					{
-						int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, obj->logical_index);
+						int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, obj->logical_index, &_starpu_driver_cpu_node_ops);
 						_starpu_memory_manager_set_global_memory_size(memnode, _starpu_cpu_get_global_mem_size(obj->logical_index, config));
 						STARPU_ASSERT_MSG(memnode < STARPU_MAXNUMANODES, "Wrong Memory Node : %d (only %d available)", memnode, STARPU_MAXNUMANODES);
 						numa_memory_nodes_to_hwloclogid[memnode] = obj->logical_index;
@@ -2436,7 +2435,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 			numa_logical_id = 0;
 			numa_physical_id = 0;
 		}
-		int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, numa_logical_id);
+		int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, numa_logical_id, &_starpu_driver_cpu_node_ops);
 		_starpu_memory_manager_set_global_memory_size(memnode, _starpu_cpu_get_global_mem_size(numa_logical_id, config));
 
 		numa_memory_nodes_to_hwloclogid[memnode] = numa_logical_id;
@@ -2629,7 +2628,7 @@ static void _starpu_init_workers_binding_and_memory(struct _starpu_machine_confi
 					}
 					else
 						workerarg->bindid = cuda_bindid[devid] = _starpu_get_next_bindid(config, STARPU_THREAD_ACTIVE, preferred_binding, npreferred);
-					memory_node = cuda_memory_nodes[devid] = _starpu_memory_node_register(STARPU_CUDA_RAM, devid);
+					memory_node = cuda_memory_nodes[devid] = _starpu_memory_node_register(STARPU_CUDA_RAM, devid, &_starpu_driver_cuda_node_ops);
 
 					for (numa = 0; numa < nb_numa_nodes; numa++)
 					{
@@ -2726,7 +2725,7 @@ static void _starpu_init_workers_binding_and_memory(struct _starpu_machine_confi
 				{
 					opencl_init[devid] = 1;
 					workerarg->bindid = opencl_bindid[devid] = _starpu_get_next_bindid(config, STARPU_THREAD_ACTIVE, preferred_binding, npreferred);
-					memory_node = opencl_memory_nodes[devid] = _starpu_memory_node_register(STARPU_OPENCL_RAM, devid);
+					memory_node = opencl_memory_nodes[devid] = _starpu_memory_node_register(STARPU_OPENCL_RAM, devid, &_starpu_driver_opencl_node_ops);
 
 					for (numa = 0; numa < nb_numa_nodes; numa++)
 					{
@@ -2771,7 +2770,7 @@ static void _starpu_init_workers_binding_and_memory(struct _starpu_machine_confi
 					//	npreferred = config->topology.nhwpus;
 					//}
 					mic_bindid[devid] = _starpu_get_next_bindid(config, STARPU_THREAD_ACTIVE, preferred_binding, npreferred);
-					memory_node = mic_memory_nodes[devid] = _starpu_memory_node_register(STARPU_MIC_RAM, devid);
+					memory_node = mic_memory_nodes[devid] = _starpu_memory_node_register(STARPU_MIC_RAM, devid, &_starpu_driver_mic_node_ops);
 
 					for (numa = 0; numa < nb_numa_nodes; numa++)
 					{
@@ -2824,7 +2823,7 @@ static void _starpu_init_workers_binding_and_memory(struct _starpu_machine_confi
 				{
 					mpi_init[devid] = 1;
 					mpi_bindid[devid] = _starpu_get_next_bindid(config, STARPU_THREAD_ACTIVE, preferred_binding, npreferred);
-					memory_node = mpi_memory_nodes[devid] = _starpu_memory_node_register(STARPU_MPI_MS_RAM, devid);
+					memory_node = mpi_memory_nodes[devid] = _starpu_memory_node_register(STARPU_MPI_MS_RAM, devid, &_starpu_driver_mpi_node_ops);
 
 					for (numa = 0; numa < nb_numa_nodes; numa++)
 					{
@@ -2971,7 +2970,6 @@ int _starpu_build_topology(struct _starpu_machine_config *config, int no_mp_conf
 	/* for the data management library */
 	_starpu_memory_nodes_init();
 	_starpu_datastats_init();
-	_starpu_node_ops_init();
 
 	_starpu_init_workers_binding_and_memory(config, no_mp_config);
 

+ 4 - 5
src/datawizard/coherency.c

@@ -31,7 +31,6 @@
 #include <core/task.h>
 #include <starpu_scheduler.h>
 #include <core/workers.h>
-#include <datawizard/node_ops.h>
 
 #ifdef STARPU_SIMGRID
 #include <core/simgrid.h>
@@ -233,12 +232,12 @@ static int worker_supports_direct_access(unsigned node, unsigned handling_node)
 		/* No worker to process the request from that node */
 		return 0;
 
-	int type = starpu_node_get_kind(node);
-	if (_node_ops[type].direct_access_supported)
-		return _node_ops[type].direct_access_supported(node, handling_node);
+	struct _starpu_node_ops *node_ops = _starpu_memory_node_get_node_ops(node);
+	if (node_ops && node_ops->is_direct_access_supported)
+		return node_ops->is_direct_access_supported(node, handling_node);
 	else
 	{
-		STARPU_ABORT_MSG("Node %d does not define the operation 'direct_access_supported'", type);
+		STARPU_ABORT_MSG("Node %s does not define the operation 'is_direct_access_supported'", _starpu_node_get_prefix(starpu_node_get_kind(node)));
 		return 1;
 	}
 }

+ 19 - 21
src/datawizard/copy_driver.c

@@ -34,7 +34,6 @@
 #include <starpu_cuda.h>
 #include <profiling/profiling.h>
 #include <core/disk.h>
-#include <datawizard/node_ops.h>
 
 #ifdef STARPU_SIMGRID
 #include <core/simgrid.h>
@@ -186,13 +185,14 @@ static int copy_data_1_to_1_generic(starpu_data_handle_t handle,
 	}
 #endif
 
-	if (_node_ops[src_kind].copy_data_to[dst_kind])
+	struct _starpu_node_ops *node_ops = _starpu_memory_node_get_node_ops(src_node);
+	if (node_ops && node_ops->copy_data_to[dst_kind])
 	{
-		return _node_ops[src_kind].copy_data_to[dst_kind](handle, src_interface, src_node, dst_interface, dst_node, req);
+		return node_ops->copy_data_to[dst_kind](handle, src_interface, src_node, dst_interface, dst_node, req);
 	}
 	else
 	{
-		STARPU_ABORT();
+		STARPU_ABORT_MSG("No copy_data_to function defined from node %s to node %s\n", _starpu_node_get_prefix(starpu_node_get_kind(src_node)), _starpu_node_get_prefix(starpu_node_get_kind(dst_node)));
 	}
 #endif /* !SIMGRID */
 }
@@ -299,19 +299,19 @@ void starpu_interface_end_driver_copy_async(unsigned src_node, unsigned dst_node
 int starpu_interface_copy(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, void *async_data)
 {
 	struct _starpu_async_channel *async_channel = async_data;
-	enum starpu_node_kind src_kind = starpu_node_get_kind(src_node);
 	enum starpu_node_kind dst_kind = starpu_node_get_kind(dst_node);
+	struct _starpu_node_ops *node_ops = _starpu_memory_node_get_node_ops(src_node);
 
-	if (_node_ops[src_kind].copy_interface_to[dst_kind])
+	if (node_ops && node_ops->copy_interface_to[dst_kind])
 	{
-		return _node_ops[src_kind].copy_interface_to[dst_kind](src, src_offset, src_node,
-								       dst, dst_offset, dst_node,
-								       size,
-								       async_channel);
+		return node_ops->copy_interface_to[dst_kind](src, src_offset, src_node,
+							     dst, dst_offset, dst_node,
+							     size,
+							     async_channel);
 	}
 	else
 	{
-		STARPU_ABORT();
+		STARPU_ABORT_MSG("No copy_interface_to function defined from node %s to node %s\n", _starpu_node_get_prefix(starpu_node_get_kind(src_node)), _starpu_node_get_prefix(starpu_node_get_kind(dst_node)));
 		return -1;
 	}
 }
@@ -321,15 +321,14 @@ void _starpu_driver_wait_request_completion(struct _starpu_async_channel *async_
 #ifdef STARPU_SIMGRID
 	_starpu_simgrid_wait_transfer_event(&async_channel->event);
 #else /* !SIMGRID */
-	enum starpu_node_kind kind = async_channel->type;
-
-	if (_node_ops[kind].wait_request_completion != NULL)
+	struct _starpu_node_ops *node_ops = async_channel->node_ops;
+	if (node_ops && node_ops->wait_request_completion != NULL)
 	{
-		_node_ops[kind].wait_request_completion(async_channel);
+		node_ops->wait_request_completion(async_channel);
 	}
 	else
 	{
-		STARPU_ABORT();
+		STARPU_ABORT_MSG("No wait_request_completion function defined for node %s\n", node_ops?node_ops->name:"unknown");
 	}
 #endif /* !SIMGRID */
 }
@@ -339,15 +338,14 @@ unsigned _starpu_driver_test_request_completion(struct _starpu_async_channel *as
 #ifdef STARPU_SIMGRID
 	return _starpu_simgrid_test_transfer_event(&async_channel->event);
 #else /* !SIMGRID */
-	enum starpu_node_kind kind = async_channel->type;
-
-	if (_node_ops[kind].test_request_completion != NULL)
+	struct _starpu_node_ops *node_ops = async_channel->node_ops;
+	if (node_ops && node_ops->test_request_completion != NULL)
 	{
-		return _node_ops[kind].test_request_completion(async_channel);
+		return node_ops->test_request_completion(async_channel);
 	}
 	else
 	{
-		STARPU_ABORT_MSG("Memory is not recognized (kind %d) \n", kind);
+		STARPU_ABORT_MSG("No test_request_completion function defined for node %s\n", node_ops?node_ops->name:"unknown");
 	}
 #endif /* !SIMGRID */
 }

+ 5 - 5
src/datawizard/copy_driver.h

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008-2015,2017                           Université de Bordeaux
  * Copyright (C) 2012,2013,2016,2017                      Inria
- * Copyright (C) 2010,2011,2013,2015,2017                 CNRS
+ * Copyright (C) 2010,2011,2013,2015,2017,2019            CNRS
  *
  * 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
@@ -74,7 +74,7 @@ struct _starpu_mpi_ms_async_event
 LIST_TYPE(_starpu_disk_backend_event,
 	void *backend_event;
 );
-        
+
 struct _starpu_disk_async_event
 {
 	unsigned memory_node;
@@ -115,13 +115,13 @@ union _starpu_async_channel_event
 struct _starpu_async_channel
 {
 	union _starpu_async_channel_event event;
-	enum starpu_node_kind type;
+	struct _starpu_node_ops *node_ops;
         /* Which node to polling when needing ACK msg */
         struct _starpu_mp_node *polling_node_sender;
         struct _starpu_mp_node *polling_node_receiver;
         /* Used to know if the acknowlegdment msg is arrived from sinks */
-        volatile int starpu_mp_common_finished_sender; 
-        volatile int starpu_mp_common_finished_receiver; 
+        volatile int starpu_mp_common_finished_sender;
+        volatile int starpu_mp_common_finished_receiver;
 };
 
 void _starpu_wake_all_blocked_workers_on_node(unsigned nodeid);

+ 1 - 1
src/datawizard/data_request.c

@@ -141,7 +141,7 @@ struct _starpu_data_request *_starpu_create_data_request(starpu_data_handle_t ha
 	r->src_replicate = src_replicate;
 	r->dst_replicate = dst_replicate;
 	r->mode = mode;
-	r->async_channel.type = STARPU_UNUSED;
+	r->async_channel.node_ops = NULL;
         r->async_channel.starpu_mp_common_finished_sender = 0;
         r->async_channel.starpu_mp_common_finished_receiver = 0;
         r->async_channel.polling_node_sender = NULL;

+ 8 - 9
src/datawizard/malloc.c

@@ -28,7 +28,6 @@
 #include <datawizard/memory_manager.h>
 #include <datawizard/memory_nodes.h>
 #include <datawizard/malloc.h>
-#include <datawizard/node_ops.h>
 #include <core/simgrid.h>
 #include <core/task.h>
 
@@ -587,11 +586,11 @@ static uintptr_t _starpu_malloc_on_node(unsigned dst_node, size_t size, int flag
 		flags &= ~STARPU_MALLOC_COUNT;
 	}
 
-	enum starpu_node_kind node_kind = starpu_node_get_kind(dst_node);
-	if (_node_ops[node_kind].malloc_on_node)
-		return _node_ops[node_kind].malloc_on_node(dst_node, size, flags);
+	struct _starpu_node_ops *node_ops = _starpu_memory_node_get_node_ops(dst_node);
+	if (node_ops && node_ops->malloc_on_node)
+		return node_ops->malloc_on_node(dst_node, size, flags);
 	else
-		STARPU_ABORT_MSG("No malloc_on_node function defined for node %s\n", _starpu_node_get_prefix(node_kind));
+		STARPU_ABORT_MSG("No malloc_on_node function defined for node %s\n", _starpu_node_get_prefix(starpu_node_get_kind(dst_node)));
 
 	if (addr == 0)
 	{
@@ -607,11 +606,11 @@ void _starpu_free_on_node_flags(unsigned dst_node, uintptr_t addr, size_t size,
 	int count = flags & STARPU_MALLOC_COUNT;
 	flags &= ~STARPU_MALLOC_COUNT;
 
-	enum starpu_node_kind node_kind = starpu_node_get_kind(dst_node);
-	if (_node_ops[node_kind].free_on_node)
-		_node_ops[node_kind].free_on_node(dst_node, addr, size, flags);
+	struct _starpu_node_ops *node_ops = _starpu_memory_node_get_node_ops(dst_node);
+	if (node_ops && node_ops->free_on_node)
+		node_ops->free_on_node(dst_node, addr, size, flags);
 	else
-		STARPU_ABORT_MSG("No free_on_node function defined for node %s\n", _starpu_node_get_prefix(node_kind));
+		STARPU_ABORT_MSG("No free_on_node function defined for node %s\n", _starpu_node_get_prefix(starpu_node_get_kind(dst_node)));
 
 	if (count)
 		starpu_memory_deallocate(dst_node, size);

+ 2 - 2
src/datawizard/memory_nodes.c

@@ -80,7 +80,7 @@ int starpu_memory_node_get_name(unsigned node, char *name, size_t size)
 	return snprintf(name, size, "%s %d", prefix, _starpu_descr.devid[node]);
 }
 
-unsigned _starpu_memory_node_register(enum starpu_node_kind kind, int devid)
+unsigned _starpu_memory_node_register(enum starpu_node_kind kind, int devid, struct _starpu_node_ops *node_ops)
 {
 	unsigned node;
 	/* ATOMIC_ADD returns the new value ... */
@@ -91,6 +91,7 @@ unsigned _starpu_memory_node_register(enum starpu_node_kind kind, int devid)
 	_STARPU_TRACE_NEW_MEM_NODE(node);
 
 	_starpu_descr.devid[node] = devid;
+	_starpu_descr.node_ops[node] = node_ops;
 
 	/* for now, there is no condition associated to that newly created node */
 	_starpu_descr.condition_count[node] = 0;
@@ -180,4 +181,3 @@ int starpu_memory_node_get_devid(unsigned node)
 {
 	return _starpu_descr.devid[node];
 }
-

+ 8 - 1
src/datawizard/memory_nodes.h

@@ -23,6 +23,7 @@
 #include <common/config.h>
 #include <datawizard/coherency.h>
 #include <datawizard/memalloc.h>
+#include <datawizard/node_ops.h>
 #include <common/utils.h>
 #include <core/workers.h>
 
@@ -42,6 +43,7 @@ struct _starpu_memory_node_descr
 {
 	unsigned nnodes;
 	enum starpu_node_kind nodes[STARPU_MAXNODES];
+	struct _starpu_node_ops *node_ops[STARPU_MAXNODES];
 
 	/* Get the device id associated to this node, or -1 if not applicable */
 	int devid[STARPU_MAXNODES];
@@ -79,6 +81,11 @@ static inline void _starpu_memory_node_add_nworkers(unsigned node)
 /* same utility as _starpu_memory_node_add_nworkers */
 void _starpu_worker_drives_memory_node(struct _starpu_worker *worker, unsigned memnode);
 
+static inline struct _starpu_node_ops *_starpu_memory_node_get_node_ops(unsigned node)
+{
+	return _starpu_descr.node_ops[node];
+}
+
 static inline unsigned _starpu_memory_node_get_nworkers(unsigned node)
 {
 	return _starpu_descr.nworkers[node];
@@ -95,7 +102,7 @@ static inline msg_host_t _starpu_simgrid_memory_node_get_host(unsigned node)
 	return _starpu_descr.host[node];
 }
 #endif
-unsigned _starpu_memory_node_register(enum starpu_node_kind kind, int devid);
+unsigned _starpu_memory_node_register(enum starpu_node_kind kind, int devid, struct _starpu_node_ops *node_ops);
 //void _starpu_memory_node_attach_queue(struct starpu_jobq_s *q, unsigned nodeid);
 void _starpu_memory_node_register_condition(struct _starpu_worker *worker, starpu_pthread_cond_t *cond, unsigned nodeid);
 

+ 0 - 98
src/datawizard/node_ops.c

@@ -27,104 +27,6 @@
 #include <drivers/scc/driver_scc_source.h>
 #include <drivers/disk/driver_disk.h>
 
-struct _starpu_node_ops _node_ops[STARPU_MPI_MS_RAM+1];
-
-void _starpu_node_ops_init()
-{
-	memset(_node_ops, 0, STARPU_MPI_MS_RAM*sizeof(struct _starpu_node_ops));
-
-	// CPU
-	// CPU_RAM does not define wait_event operation
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_cpu_copy_data;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_cpu_copy_interface;
-	_node_ops[STARPU_CPU_RAM].direct_access_supported = _starpu_cpu_direct_access_supported;
-	_node_ops[STARPU_CPU_RAM].malloc_on_node = _starpu_cpu_malloc_on_node;
-	_node_ops[STARPU_CPU_RAM].free_on_node = _starpu_cpu_free_on_node;
-
-#ifdef STARPU_USE_CUDA
-	_node_ops[STARPU_CUDA_RAM].wait_request_completion = _starpu_cuda_wait_request_completion;
-	_node_ops[STARPU_CUDA_RAM].test_request_completion = _starpu_cuda_test_request_completion;
-	_node_ops[STARPU_CUDA_RAM].copy_data_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_data_from_cuda_to_cuda;
-	_node_ops[STARPU_CUDA_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_cuda_copy_data_from_cuda_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_data_from_cpu_to_cuda;
-	_node_ops[STARPU_CUDA_RAM].copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cuda;
-	_node_ops[STARPU_CUDA_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cpu_to_cuda;
-#endif
-#if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
-	_node_ops[STARPU_CUDA_RAM].direct_access_supported = _starpu_cuda_direct_access_supported;
-	_node_ops[STARPU_CUDA_RAM].malloc_on_node = _starpu_cuda_malloc_on_node;
-	_node_ops[STARPU_CUDA_RAM].free_on_node = _starpu_cuda_free_on_node;
-#endif
-
-#ifdef STARPU_USE_OPENCL
-	_node_ops[STARPU_OPENCL_RAM].wait_request_completion = _starpu_opencl_wait_request_completion;
-	_node_ops[STARPU_OPENCL_RAM].test_request_completion = _starpu_opencl_test_request_completion;
-	_node_ops[STARPU_OPENCL_RAM].copy_data_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_data_from_opencl_to_opencl;
-	_node_ops[STARPU_OPENCL_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_opencl_copy_data_from_opencl_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_data_from_cpu_to_opencl;
-	_node_ops[STARPU_OPENCL_RAM].copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_opencl_to_opencl;
-	_node_ops[STARPU_OPENCL_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_opencl_copy_interface_from_opencl_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_cpu_to_opencl;
-#endif
-#if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
-	_node_ops[STARPU_OPENCL_RAM].direct_access_supported = _starpu_opencl_direct_access_supported;
-	_node_ops[STARPU_OPENCL_RAM].malloc_on_node = _starpu_opencl_malloc_on_node;
-	_node_ops[STARPU_OPENCL_RAM].free_on_node = _starpu_opencl_free_on_node;
-#endif
-
-#ifdef STARPU_USE_MIC
-	_node_ops[STARPU_MIC_RAM].wait_request_completion = _starpu_mic_wait_request_completion;
-	_node_ops[STARPU_MIC_RAM].test_request_completion = _starpu_mic_test_request_completion;
-	/* TODO: MIC -> MIC */
-	_node_ops[STARPU_MIC_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_mic_copy_data_from_mic_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_MIC_RAM] = _starpu_mic_copy_data_from_cpu_to_mic;
-	_node_ops[STARPU_MIC_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_mic_copy_interface_from_mic_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_MIC_RAM] = _starpu_mic_copy_interface_from_cpu_to_mic;
-	_node_ops[STARPU_MIC_RAM].direct_access_supported = _starpu_mic_direct_access_supported;
-	_node_ops[STARPU_MIC_RAM].malloc_on_node = _starpu_mic_malloc_on_node;
-	_node_ops[STARPU_MIC_RAM].free_on_node = _starpu_mic_free_on_node;
-#endif
-
-#ifdef STARPU_USE_MPI_MASTER_SLAVE
-	_node_ops[STARPU_MPI_MS_RAM].wait_request_completion = _starpu_mpi_common_wait_request_completion;
-	_node_ops[STARPU_MPI_MS_RAM].test_request_completion = _starpu_mpi_common_test_event;
-	_node_ops[STARPU_MPI_MS_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_mpi_copy_data_from_mpi_to_cpu;
-	_node_ops[STARPU_MPI_MS_RAM].copy_data_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_data_from_mpi_to_mpi;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_data_from_cpu_to_mpi;
-	_node_ops[STARPU_MPI_MS_RAM].copy_interface_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_interface_from_mpi_to_mpi;
-	_node_ops[STARPU_MPI_MS_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_mpi_copy_interface_from_mpi_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_interface_from_cpu_to_mpi;
-	_node_ops[STARPU_MPI_MS_RAM].direct_access_supported = _starpu_mpi_direct_access_supported;
-	_node_ops[STARPU_MPI_MS_RAM].malloc_on_node = _starpu_mpi_malloc_on_node;
-	_node_ops[STARPU_MPI_MS_RAM].free_on_node = _starpu_mpi_free_on_node;
-#endif
-
-	_node_ops[STARPU_DISK_RAM].wait_request_completion = _starpu_disk_wait_request_completion;
-	_node_ops[STARPU_DISK_RAM].test_request_completion = _starpu_disk_test_request_completion;
-	_node_ops[STARPU_DISK_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_disk_copy_data_from_disk_to_cpu;
-	_node_ops[STARPU_DISK_RAM].copy_data_to[STARPU_DISK_RAM] = _starpu_disk_copy_data_from_disk_to_disk;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_DISK_RAM] = _starpu_disk_copy_data_from_cpu_to_disk;
-	_node_ops[STARPU_DISK_RAM].copy_interface_to[STARPU_DISK_RAM] = _starpu_disk_copy_interface_from_disk_to_disk;
-	_node_ops[STARPU_DISK_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_disk_copy_interface_from_disk_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_DISK_RAM] = _starpu_disk_copy_interface_from_cpu_to_disk;
-	_node_ops[STARPU_DISK_RAM].direct_access_supported = _starpu_disk_direct_access_supported;
-	_node_ops[STARPU_DISK_RAM].malloc_on_node = _starpu_disk_malloc_on_node;
-	_node_ops[STARPU_DISK_RAM].free_on_node = _starpu_disk_free_on_node;
-
-#ifdef STARPU_USE_SCC
-	_node_ops[STARPU_SCC_RAM].copy_data_to[STARPU_CPU_RAM] = _starpu_scc_copy_data_from_scc_to_cpu;
-	_node_ops[STARPU_SCC_RAM].copy_data_to[STARPU_SCC_RAM] = _starpu_scc_copy_data_from_scc_to_scc;
-	_node_ops[STARPU_CPU_RAM].copy_data_to[STARPU_SCC_RAM] = _starpu_scc_copy_data_from_cpu_to_scc;
-	_node_ops[STARPU_SCC_RAM].copy_interface_to[STARPU_SCC_RAM] = _starpu_scc_copy_interface_from_scc_to_scc;
-	_node_ops[STARPU_SCC_RAM].copy_interface_to[STARPU_CPU_RAM] = _starpu_scc_copy_interface_from_scc_to_cpu;
-	_node_ops[STARPU_CPU_RAM].copy_interface_to[STARPU_SCC_RAM] = _starpu_scc_copy_interface_from_cpu_to_scc;
-	_node_ops[STARPU_SCC_RAM].direct_access_supported = _starpu_scc_direct_access_supported;
-	_node_ops[STARPU_SCC_RAM].malloc_on_node = _starpu_scc_malloc_on_node;
-	_node_ops[STARPU_SCC_RAM].free_on_node = _starpu_scc_free_on_node;
-#endif
-}
-
 const char* _starpu_node_get_prefix(enum starpu_node_kind kind)
 {
 	switch (kind)

+ 3 - 5
src/datawizard/node_ops.h

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008-2011,2014,2017                      Université de Bordeaux
  * Copyright (C) 2016,2017                                Inria
- * Copyright (C) 2010,2013,2015,2017,2019                      CNRS
+ * Copyright (C) 2010,2013,2015,2017,2019                 CNRS
  *
  * 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
@@ -37,14 +37,12 @@ struct _starpu_node_ops
 	copy_interface_t copy_interface_to[STARPU_MPI_MS_RAM+1];
 	void (*wait_request_completion)(struct _starpu_async_channel *async_channel);
 	unsigned (*test_request_completion)(struct _starpu_async_channel *async_channel);
-	int (*direct_access_supported)(unsigned node, unsigned handling_node);
+	int (*is_direct_access_supported)(unsigned node, unsigned handling_node);
 	uintptr_t (*malloc_on_node)(unsigned dst_node, size_t size, int flags);
 	void (*free_on_node)(unsigned dst_node, uintptr_t addr, size_t size, int flags);
+	char *name;
 };
 
-extern struct _starpu_node_ops _node_ops[STARPU_MPI_MS_RAM+1];
-
-void _starpu_node_ops_init();
 const char* _starpu_node_get_prefix(enum starpu_node_kind kind);
 
 #endif // __NODE_OPS_H__

+ 76 - 1
src/drivers/cpu/driver_cpu.c

@@ -32,6 +32,11 @@
 #include <core/idle_hook.h>
 #include <drivers/cpu/driver_cpu.h>
 #include <drivers/disk/driver_disk.h>
+#include <drivers/opencl/driver_opencl.h>
+#include <drivers/cuda/driver_cuda.h>
+#include <drivers/mic/driver_mic_source.h>
+#include <drivers/mpi/driver_mpi_source.h>
+#include <drivers/disk/driver_disk.h>
 #include <core/sched_policy.h>
 #include <datawizard/memory_manager.h>
 #include <datawizard/memory_nodes.h>
@@ -466,7 +471,7 @@ int _starpu_cpu_copy_interface(uintptr_t src, size_t src_offset, unsigned src_no
 	return 0;
 }
 
-int _starpu_cpu_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_cpu_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void) node;
 	(void) handling_node;
@@ -501,3 +506,73 @@ void _starpu_cpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, in
 #endif
 				   );
 }
+
+struct _starpu_node_ops _starpu_driver_cpu_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_cpu_copy_data,
+#ifdef STARPU_USE_CUDA
+	.copy_data_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_data_from_cpu_to_cuda,
+#else
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+#endif
+#ifdef STARPU_USE_OPENCL
+	.copy_data_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_data_from_cpu_to_opencl,
+#else
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+#endif
+	.copy_data_to[STARPU_DISK_RAM] = _starpu_disk_copy_data_from_cpu_to_disk,
+#ifdef STARPU_USE_MIC
+	.copy_data_to[STARPU_MIC_RAM] = _starpu_mic_copy_data_from_cpu_to_mic,
+#else
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+#endif
+#ifdef STARPU_USE_SCC
+	.copy_data_to[STARPU_SCC_RAM] = _starpu_scc_copy_data_from_cpu_to_scc,
+#else
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+#endif
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+#ifdef STARPU_USE_MPI_MASTER_SLAVE
+	.copy_data_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_data_from_cpu_to_mpi,
+#else
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+#endif
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_cpu_copy_interface,
+#ifdef STARPU_USE_CUDA
+	.copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cpu_to_cuda,
+#else
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+#endif
+#ifdef STARPU_USE_OPENCL
+	.copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_cpu_to_opencl,
+#else
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+#endif
+	.copy_interface_to[STARPU_DISK_RAM] = _starpu_disk_copy_interface_from_cpu_to_disk,
+#ifdef STARPU_USE_MIC
+	.copy_interface_to[STARPU_MIC_RAM] = _starpu_mic_copy_interface_from_cpu_to_mic,
+#else
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+#endif
+#ifdef STARPU_USE_SCC
+	.copy_interface_to[STARPU_SCC_RAM] = _starpu_scc_copy_interface_from_cpu_to_scc,
+#else
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+#endif
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+#ifdef STARPU_USE_MPI_MASTER_SLAVE
+	.copy_interface_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_interface_from_cpu_to_mpi,
+#else
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+#endif
+
+	.wait_request_completion = NULL,
+	.test_request_completion = NULL,
+	.is_direct_access_supported = _starpu_cpu_is_direct_access_supported,
+	.malloc_on_node = _starpu_cpu_malloc_on_node,
+	.free_on_node = _starpu_cpu_free_on_node,
+	.name = "cpu driver"
+};

+ 4 - 1
src/drivers/cpu/driver_cpu.h

@@ -20,14 +20,17 @@
 #define __DRIVER_CPU_H__
 
 #include <common/config.h>
+#include <datawizard/node_ops.h>
 
 extern struct _starpu_driver_ops _starpu_driver_cpu_ops;
+extern struct _starpu_node_ops _starpu_driver_cpu_node_ops;
+
 void *_starpu_cpu_worker(void *);
 
 int _starpu_cpu_copy_data(starpu_data_handle_t handle, void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, struct _starpu_data_request *req);
 int _starpu_cpu_copy_interface(uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t ssize, struct _starpu_async_channel *async_channel);
 
-int _starpu_cpu_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_cpu_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_cpu_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_cpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 35 - 4
src/drivers/cuda/driver_cuda.c

@@ -26,6 +26,7 @@
 #include <common/utils.h>
 #include <common/config.h>
 #include <core/debug.h>
+#include <drivers/cpu/driver_cpu.h>
 #include <drivers/driver_common/driver_common.h>
 #include "driver_cuda.h"
 #include <core/sched_policy.h>
@@ -1272,7 +1273,7 @@ int _starpu_cuda_copy_data_from_cuda_to_cuda(starpu_data_handle_t handle, void *
 	}
 	else
 	{
-		req->async_channel.type = STARPU_CUDA_RAM;
+		req->async_channel.node_ops = &_starpu_driver_cuda_node_ops;
 		cures = cudaEventCreateWithFlags(&req->async_channel.event.cuda_event, cudaEventDisableTiming);
 		if (STARPU_UNLIKELY(cures != cudaSuccess)) STARPU_CUDA_REPORT_ERROR(cures);
 
@@ -1317,7 +1318,7 @@ int _starpu_cuda_copy_data_from_cuda_to_cpu(starpu_data_handle_t handle, void *s
 	}
 	else
 	{
-		req->async_channel.type = STARPU_CUDA_RAM;
+		req->async_channel.node_ops = &_starpu_driver_cuda_node_ops;
 		cures = cudaEventCreateWithFlags(&req->async_channel.event.cuda_event, cudaEventDisableTiming);
 		if (STARPU_UNLIKELY(cures != cudaSuccess)) STARPU_CUDA_REPORT_ERROR(cures);
 
@@ -1364,7 +1365,7 @@ int _starpu_cuda_copy_data_from_cpu_to_cuda(starpu_data_handle_t handle, void *s
 	}
 	else
 	{
-		req->async_channel.type = STARPU_CUDA_RAM;
+		req->async_channel.node_ops = &_starpu_driver_cuda_node_ops;
 		cures = cudaEventCreateWithFlags(&req->async_channel.event.cuda_event, cudaEventDisableTiming);
 		if (STARPU_UNLIKELY(cures != cudaSuccess))
 			STARPU_CUDA_REPORT_ERROR(cures);
@@ -1429,7 +1430,7 @@ int _starpu_cuda_copy_interface_from_cpu_to_cuda(uintptr_t src, size_t src_offse
 
 #endif /* STARPU_USE_CUDA */
 
-int _starpu_cuda_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_cuda_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	/* GPUs not always allow direct remote access: if CUDA4
 	 * is enabled, we allow two CUDA devices to communicate. */
@@ -1558,3 +1559,33 @@ struct _starpu_driver_ops _starpu_driver_cuda_ops =
 	.run_once = _starpu_cuda_driver_run_once_from_worker,
 	.deinit = _starpu_cuda_driver_deinit_from_worker
 };
+
+struct _starpu_node_ops _starpu_driver_cuda_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_cuda_copy_data_from_cuda_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_data_from_cuda_to_cuda,
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_data_to[STARPU_DISK_RAM] = NULL,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = _starpu_cuda_copy_interface_from_cuda_to_cuda,
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_interface_to[STARPU_DISK_RAM] = NULL,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.wait_request_completion = _starpu_cuda_wait_request_completion,
+	.test_request_completion = _starpu_cuda_test_request_completion,
+	.is_direct_access_supported = _starpu_cuda_is_direct_access_supported,
+	.malloc_on_node = _starpu_cuda_malloc_on_node,
+	.free_on_node = _starpu_cuda_free_on_node,
+	.name = "cuda driver"
+};

+ 3 - 1
src/drivers/cuda/driver_cuda.h

@@ -30,8 +30,10 @@
 
 #include <starpu.h>
 #include <core/workers.h>
+#include <datawizard/node_ops.h>
 
 extern struct _starpu_driver_ops _starpu_driver_cuda_ops;
+extern struct _starpu_node_ops _starpu_driver_cuda_node_ops;
 
 void _starpu_cuda_init(void);
 unsigned _starpu_get_cuda_device_count(void);
@@ -64,7 +66,7 @@ int _starpu_cuda_copy_interface_from_cuda_to_cuda(uintptr_t src, size_t src_offs
 int _starpu_cuda_copy_interface_from_cuda_to_cpu(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_cuda_copy_interface_from_cpu_to_cuda(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_cuda_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_cuda_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_cuda_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_cuda_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 35 - 4
src/drivers/disk/driver_disk.c

@@ -21,6 +21,7 @@
 #include <core/disk.h>
 #include <starpu_profiling.h>
 #include <drivers/disk/driver_disk.h>
+#include <drivers/cpu/driver_cpu.h>
 #include <datawizard/coherency.h>
 
 int _starpu_disk_copy_src_to_disk(void * src, unsigned src_node, void * dst, size_t dst_offset, unsigned dst_node, size_t size, void * async_channel)
@@ -92,7 +93,7 @@ int _starpu_disk_copy_data_from_disk_to_cpu(starpu_data_handle_t handle, void *s
 
 	if (req && !starpu_asynchronous_copy_disabled())
 	{
-		req->async_channel.type = STARPU_DISK_RAM;
+		req->async_channel.node_ops = &_starpu_driver_cpu_node_ops;
 		req->async_channel.event.disk_event.requests = NULL;
 		req->async_channel.event.disk_event.ptr = NULL;
 		req->async_channel.event.disk_event.handle = NULL;
@@ -135,7 +136,7 @@ int _starpu_disk_copy_data_from_disk_to_disk(starpu_data_handle_t handle, void *
 
 	if (req && !starpu_asynchronous_copy_disabled())
 	{
-		req->async_channel.type = STARPU_DISK_RAM;
+		req->async_channel.node_ops = &_starpu_driver_disk_node_ops;
 		req->async_channel.event.disk_event.requests = NULL;
 		req->async_channel.event.disk_event.ptr = NULL;
 		req->async_channel.event.disk_event.handle = NULL;
@@ -155,7 +156,7 @@ int _starpu_disk_copy_data_from_cpu_to_disk(starpu_data_handle_t handle, void *s
 
 	if (req && !starpu_asynchronous_copy_disabled())
 	{
-		req->async_channel.type = STARPU_DISK_RAM;
+		req->async_channel.node_ops = &_starpu_driver_disk_node_ops;
 		req->async_channel.event.disk_event.requests = NULL;
 		req->async_channel.event.disk_event.ptr = NULL;
 		req->async_channel.event.disk_event.handle = NULL;
@@ -221,7 +222,7 @@ int _starpu_disk_copy_interface_from_cpu_to_disk(uintptr_t src, size_t src_offse
 					     size, async_channel);
 }
 
-int _starpu_disk_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_disk_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	/* Each worker can manage disks but disk <-> disk is not always allowed */
 	switch (starpu_node_get_kind(handling_node))
@@ -248,3 +249,33 @@ void _starpu_disk_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, i
 	(void) flags;
 	_starpu_disk_free(dst_node, (void *) addr , size);
 }
+
+struct _starpu_node_ops _starpu_driver_disk_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_disk_copy_data_from_disk_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_data_to[STARPU_DISK_RAM] = _starpu_disk_copy_data_from_disk_to_disk,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_disk_copy_interface_from_disk_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_interface_to[STARPU_DISK_RAM] = _starpu_disk_copy_interface_from_disk_to_disk,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.wait_request_completion = _starpu_disk_wait_request_completion,
+	.test_request_completion = _starpu_disk_test_request_completion,
+	.is_direct_access_supported = _starpu_disk_is_direct_access_supported,
+	.malloc_on_node = _starpu_disk_malloc_on_node,
+	.free_on_node = _starpu_disk_free_on_node,
+	.name = "disk driver"
+};

+ 4 - 1
src/drivers/disk/driver_disk.h

@@ -20,6 +20,8 @@
 #ifndef __DRIVER_DISK_H__
 #define __DRIVER_DISK_H__
 
+#include <datawizard/node_ops.h>
+
 int _starpu_disk_copy_src_to_disk(void * src, unsigned src_node, void * dst, size_t dst_offset, unsigned dst_node, size_t size, void * async_channel);
 
 int _starpu_disk_copy_disk_to_src(void * src, size_t src_offset, unsigned src_node, void * dst, unsigned dst_node, size_t size, void * async_channel);
@@ -37,7 +39,8 @@ int _starpu_disk_copy_interface_from_disk_to_cpu(uintptr_t src, size_t src_offse
 int _starpu_disk_copy_interface_from_disk_to_disk(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_disk_copy_interface_from_cpu_to_disk(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_disk_direct_access_supported(unsigned node, unsigned handling_node);
+extern struct _starpu_node_ops _starpu_driver_disk_node_ops;
+int _starpu_disk_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_disk_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_disk_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 34 - 3
src/drivers/mic/driver_mic_source.c

@@ -583,7 +583,7 @@ int _starpu_mic_copy_data_from_mic_to_cpu(starpu_data_handle_t handle, void *src
 	}
 	else
 	{
-		req->async_channel.type = STARPU_MIC_RAM;
+		req->async_channel.node_ops = &_starpu_driver_mic_node_ops;
 		if (copy_methods->mic_to_ram_async)
 			ret = copy_methods->mic_to_ram_async(src_interface, src_node, dst_interface, dst_node);
 		else
@@ -616,7 +616,7 @@ int _starpu_mic_copy_data_from_cpu_to_mic(starpu_data_handle_t handle, void *src
 	}
 	else
 	{
-		req->async_channel.type = STARPU_MIC_RAM;
+		req->async_channel.node_ops = &_starpu_driver_mic_node_ops;
 		if (copy_methods->ram_to_mic_async)
 			ret = copy_methods->ram_to_mic_async(src_interface, src_node, dst_interface, dst_node);
 		else
@@ -662,7 +662,7 @@ int _starpu_mic_copy_interface_from_cpu_to_mic(uintptr_t src, size_t src_offset,
 						   size);
 }
 
-int _starpu_mic_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_mic_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void) node;
 	(void) handling_node;
@@ -684,3 +684,34 @@ void _starpu_mic_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, in
 	(void) flags;
 	_starpu_mic_free_memory((void*) addr, size, dst_node);
 }
+
+/* TODO: MIC -> MIC */
+struct _starpu_node_ops _starpu_driver_mic_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_mic_copy_data_from_mic_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_data_to[STARPU_DISK_RAM] = NULL,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_mic_copy_interface_from_mic_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_interface_to[STARPU_DISK_RAM] = NULL,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.wait_request_completion = _starpu_mic_wait_request_completion,
+	.test_request_completion = _starpu_mic_test_request_completion,
+	.is_direct_access_supported = _starpu_mic_is_direct_access_supported,
+	.malloc_on_node = _starpu_mic_malloc_on_node,
+	.free_on_node = _starpu_mic_free_on_node,
+	.name = "mic driver"
+};

+ 4 - 1
src/drivers/mic/driver_mic_source.h

@@ -30,6 +30,9 @@
 #include <core/workers.h>
 
 #include <drivers/mp_common/mp_common.h>
+#include <datawizard/node_ops.h>
+
+extern struct _starpu_node_ops _starpu_driver_mic_node_ops;
 
 /* Array of structures containing all the informations useful to send
  * and receive informations with devices */
@@ -88,7 +91,7 @@ int _starpu_mic_copy_data_from_cpu_to_mic(starpu_data_handle_t handle, void *src
 int _starpu_mic_copy_interface_from_mic_to_cpu(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_mic_copy_interface_from_cpu_to_mic(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_mic_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_mic_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_mic_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_mic_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 4 - 4
src/drivers/mp_common/sink_common.c

@@ -126,7 +126,7 @@ static void _starpu_sink_common_copy_from_host_async(struct _starpu_mp_node *mp_
 
         /* Set the sender (host) ready because we don't want to wait its ack */
         struct _starpu_async_channel * async_channel = &sink_event->event;
-        async_channel->type = STARPU_UNUSED;
+	async_channel->node_ops = NULL;
         async_channel->starpu_mp_common_finished_sender = -1;
         async_channel->starpu_mp_common_finished_receiver = 0;
         async_channel->polling_node_receiver = NULL;
@@ -168,7 +168,7 @@ static void _starpu_sink_common_copy_to_host_async(struct _starpu_mp_node *mp_no
 
         /* Set the receiver (host) ready because we don't want to wait its ack */
         struct _starpu_async_channel * async_channel = &sink_event->event;
-        async_channel->type = STARPU_UNUSED;
+	async_channel->node_ops = NULL;
         async_channel->starpu_mp_common_finished_sender = 0;
         async_channel->starpu_mp_common_finished_receiver = -1;
         async_channel->polling_node_receiver = NULL;
@@ -204,7 +204,7 @@ static void _starpu_sink_common_copy_from_sink_async(struct _starpu_mp_node *mp_
 
         /* Set the sender ready because we don't want to wait its ack */
         struct _starpu_async_channel * async_channel = &sink_event->event;
-        async_channel->type = STARPU_UNUSED;
+	async_channel->node_ops = NULL;
         async_channel->starpu_mp_common_finished_sender = -1;
         async_channel->starpu_mp_common_finished_receiver = 0;
         async_channel->polling_node_receiver = NULL;
@@ -240,7 +240,7 @@ static void _starpu_sink_common_copy_to_sink_async(struct _starpu_mp_node *mp_no
 
         /* Set the receiver ready because we don't want to wait its ack */
         struct _starpu_async_channel * async_channel = &sink_event->event;
-        async_channel->type = STARPU_UNUSED;
+	async_channel->node_ops = NULL;
         async_channel->starpu_mp_common_finished_sender = 0;
         async_channel->starpu_mp_common_finished_receiver = -1;
         async_channel->polling_node_receiver = NULL;

+ 35 - 5
src/drivers/mpi/driver_mpi_source.c

@@ -400,7 +400,7 @@ int _starpu_mpi_copy_data_from_mpi_to_cpu(starpu_data_handle_t handle, void *src
 	}
 	else
 	{
-		req->async_channel.type = STARPU_MPI_MS_RAM;
+		req->async_channel.node_ops = &_starpu_driver_cpu_node_ops;
 		if(copy_methods->mpi_ms_to_ram_async)
 			ret = copy_methods->mpi_ms_to_ram_async(src_interface, src_node, dst_interface, dst_node, &req->async_channel);
 		else
@@ -432,7 +432,7 @@ int _starpu_mpi_copy_data_from_mpi_to_mpi(starpu_data_handle_t handle, void *src
 	}
 	else
 	{
-		req->async_channel.type = STARPU_MPI_MS_RAM;
+		req->async_channel.node_ops = &_starpu_driver_mpi_node_ops;
 		if(copy_methods->mpi_ms_to_mpi_ms_async)
 			ret = copy_methods->mpi_ms_to_mpi_ms_async(src_interface, src_node, dst_interface, dst_node, &req->async_channel);
 		else
@@ -464,7 +464,7 @@ int _starpu_mpi_copy_data_from_cpu_to_mpi(starpu_data_handle_t handle, void *src
 	}
 	else
 	{
-		req->async_channel.type = STARPU_MPI_MS_RAM;
+		req->async_channel.node_ops = &_starpu_driver_mpi_node_ops;
 		if(copy_methods->ram_to_mpi_ms_async)
 			ret = copy_methods->ram_to_mpi_ms_async(src_interface, src_node, dst_interface, dst_node, &req->async_channel);
 		else
@@ -524,11 +524,11 @@ int _starpu_mpi_copy_interface_from_cpu_to_mpi(uintptr_t src, size_t src_offset,
 							size);
 }
 
-int _starpu_mpi_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_mpi_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void) node;
 	enum starpu_node_kind kind = starpu_node_get_kind(handling_node);
-	return kind == STARPU_MPI_MS_RAM;
+	return (kind == STARPU_MPI_MS_RAM);
 }
 
 uintptr_t _starpu_mpi_malloc_on_node(unsigned dst_node, size_t size, int flags)
@@ -546,3 +546,33 @@ void _starpu_mpi_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, in
 	(void) size;
 	_starpu_mpi_source_free_memory((void*) addr, dst_node);
 }
+
+struct _starpu_node_ops _starpu_driver_mic_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_mpi_copy_data_from_mpi_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_data_to[STARPU_DISK_RAM] = NULL,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_data_from_mpi_to_mpi,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_mpi_copy_interface_from_mpi_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_interface_to[STARPU_DISK_RAM] = NULL,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = _starpu_mpi_copy_interface_from_mpi_to_mpi,
+
+	.wait_request_completion = _starpu_mpi_common_wait_request_completion,
+	.test_request_completion = _starpu_mpi_common_test_event,
+	.is_direct_access_supported = _starpu_mpi_is_direct_access_supported,
+	.malloc_on_node = _starpu_mpi_malloc_on_node,
+	.free_on_node = _starpu_mpi_free_on_node,
+	.name = "mpi driver"
+};

+ 4 - 1
src/drivers/mpi/driver_mpi_source.h

@@ -22,9 +22,12 @@
 
 #include <drivers/mp_common/mp_common.h>
 #include <starpu_mpi_ms.h>
+#include <datawizard/node_ops.h>
 
 #ifdef STARPU_USE_MPI_MASTER_SLAVE
 
+extern struct _starpu_node_ops _starpu_driver_mpi_node_ops;
+
 /* Array of structures containing all the informations useful to send
  * and receive informations with devices */
 extern struct _starpu_mp_node *_starpu_mpi_ms_nodes[STARPU_MAXMPIDEVS];
@@ -56,7 +59,7 @@ int _starpu_mpi_copy_interface_from_mpi_to_cpu(uintptr_t src, size_t src_offset,
 int _starpu_mpi_copy_interface_from_mpi_to_mpi(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_mpi_copy_interface_from_cpu_to_mpi(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_mpi_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_mpi_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_mpi_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_mpi_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 36 - 6
src/drivers/opencl/driver_opencl.c

@@ -27,8 +27,8 @@
 #include <core/debug.h>
 #include <starpu_opencl.h>
 #include <drivers/driver_common/driver_common.h>
-#include "driver_opencl.h"
-#include "driver_opencl_utils.h"
+#include <drivers/opencl/driver_opencl.h>
+#include <drivers/opencl/driver_opencl_utils.h>
 #include <common/utils.h>
 #include <datawizard/memory_manager.h>
 #include <datawizard/memory_nodes.h>
@@ -1167,7 +1167,7 @@ int _starpu_opencl_copy_data_from_opencl_to_opencl(starpu_data_handle_t handle,
 	}
 	else
 	{
-		req->async_channel.type = STARPU_OPENCL_RAM;
+		req->async_channel.node_ops = &_starpu_driver_opencl_node_ops;
 		if (copy_methods->opencl_to_opencl_async)
 			ret = copy_methods->opencl_to_opencl_async(src_interface, src_node, dst_interface, dst_node, &(req->async_channel.event.opencl_event));
 		else
@@ -1200,7 +1200,7 @@ int _starpu_opencl_copy_data_from_opencl_to_cpu(starpu_data_handle_t handle, voi
 	}
 	else
 	{
-		req->async_channel.type = STARPU_OPENCL_RAM;
+		req->async_channel.node_ops = &_starpu_driver_opencl_node_ops;
 		if (copy_methods->opencl_to_ram_async)
 			ret = copy_methods->opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, &(req->async_channel.event.opencl_event));
 		else
@@ -1233,7 +1233,7 @@ int _starpu_opencl_copy_data_from_cpu_to_opencl(starpu_data_handle_t handle, voi
 	}
 	else
 	{
-		req->async_channel.type = STARPU_OPENCL_RAM;
+		req->async_channel.node_ops = &_starpu_driver_opencl_node_ops;
 		if (copy_methods->ram_to_opencl_async)
 			ret = copy_methods->ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, &(req->async_channel.event.opencl_event));
 		else
@@ -1283,7 +1283,7 @@ int _starpu_opencl_copy_interface_from_cpu_to_opencl(uintptr_t src, size_t src_o
 
 #endif /* STARPU_USE_OPENCL */
 
-int _starpu_opencl_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_opencl_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void)node;
 	(void)handling_node;
@@ -1341,3 +1341,33 @@ void _starpu_opencl_free_on_node(unsigned dst_node, uintptr_t addr, size_t size,
 		STARPU_OPENCL_REPORT_ERROR(err);
 #endif
 }
+
+struct _starpu_node_ops _starpu_driver_opencl_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_opencl_copy_data_from_opencl_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+	.copy_data_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_data_from_opencl_to_opencl,
+	.copy_data_to[STARPU_DISK_RAM] = NULL,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_opencl_copy_interface_from_opencl_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+	.copy_interface_to[STARPU_OPENCL_RAM] = _starpu_opencl_copy_interface_from_opencl_to_opencl,
+	.copy_interface_to[STARPU_DISK_RAM] = NULL,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.wait_request_completion = _starpu_opencl_wait_request_completion,
+	.test_request_completion = _starpu_opencl_test_request_completion,
+	.is_direct_access_supported = _starpu_opencl_is_direct_access_supported,
+	.malloc_on_node = _starpu_opencl_malloc_on_node,
+	.free_on_node = _starpu_opencl_free_on_node,
+	.name = "opencl driver"
+};

+ 3 - 1
src/drivers/opencl/driver_opencl.h

@@ -34,6 +34,7 @@
 #endif
 
 #include <core/workers.h>
+#include <datawizard/node_ops.h>
 
 #if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
 struct _starpu_machine_config;
@@ -47,6 +48,7 @@ void *_starpu_opencl_worker(void *);
 #endif
 
 #ifdef STARPU_USE_OPENCL
+extern struct _starpu_node_ops _starpu_driver_opencl_node_ops;
 extern struct _starpu_driver_ops _starpu_driver_opencl_ops;
 extern char *_starpu_opencl_program_dir;
 
@@ -81,7 +83,7 @@ int _starpu_opencl_copy_interface_from_opencl_to_cpu(uintptr_t src, size_t src_o
 int _starpu_opencl_copy_interface_from_opencl_to_opencl(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_opencl_copy_interface_from_cpu_to_opencl(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_opencl_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_opencl_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_opencl_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_opencl_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
 

+ 31 - 1
src/drivers/scc/driver_scc_source.c

@@ -407,7 +407,7 @@ int _starpu_scc_copy_interface_from_cpu_to_scc(uintptr_t src, size_t src_offset,
 					    size);
 }
 
-int _starpu_scc_direct_access_supported(unsigned node, unsigned handling_node)
+int _starpu_scc_is_direct_access_supported(unsigned node, unsigned handling_node)
 {
 	(void) node;
 	(void) handling_node;
@@ -428,3 +428,33 @@ void _starpu_scc_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, in
 	(void) flags;
 	_starpu_scc_free_memory((void *) addr, dst_node);
 }
+
+struct _starpu_node_ops _starpu_driver_scc_node_ops =
+{
+	.copy_data_to[STARPU_UNUSED] = NULL,
+	.copy_data_to[STARPU_CPU_RAM] = _starpu_scc_copy_data_from_scc_to_cpu,
+	.copy_data_to[STARPU_CUDA_RAM] = NULL,
+	.copy_data_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_data_to[STARPU_DISK_RAM] = NULL,
+	.copy_data_to[STARPU_MIC_RAM] = NULL,
+	.copy_data_to[STARPU_SCC_RAM] = _starpu_scc_copy_data_from_scc_to_scc,
+	.copy_data_to[STARPU_SCC_SHM] = NULL,
+	.copy_data_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.copy_interface_to[STARPU_UNUSED] = NULL,
+	.copy_interface_to[STARPU_CPU_RAM] = _starpu_scc_copy_interface_from_scc_to_cpu,
+	.copy_interface_to[STARPU_CUDA_RAM] = NULL,
+	.copy_interface_to[STARPU_OPENCL_RAM] = NULL,
+	.copy_interface_to[STARPU_DISK_RAM] = NULL,
+	.copy_interface_to[STARPU_MIC_RAM] = NULL,
+	.copy_interface_to[STARPU_SCC_RAM] = _starpu_scc_copy_interface_from_scc_to_scc,
+	.copy_interface_to[STARPU_SCC_SHM] = NULL,
+	.copy_interface_to[STARPU_MPI_MS_RAM] = NULL,
+
+	.wait_request_completion = NULL,
+	.test_request_completion = NULL,
+	.is_direct_access_supported = _starpu_scc_is_direct_access_supported,
+	.malloc_on_node = _starpu_scc_malloc_on_node,
+	.free_on_node = _starpu_scc_free_on_node,
+	.name = "scc driver"
+};

+ 3 - 1
src/drivers/scc/driver_scc_source.h

@@ -28,7 +28,9 @@
 #ifdef STARPU_USE_SCC
 
 #include <drivers/mp_common/mp_common.h>
+#include <datawizard/node_ops.h>
 
+extern struct _starpu_node_ops _starpu_driver_scc_node_ops;
 
 void _starpu_scc_src_mp_deinit();
 
@@ -60,7 +62,7 @@ int _starpu_scc_copy_interface_from_scc_to_cpu(uintptr_t src, size_t src_offset,
 int _starpu_scc_copy_interface_from_scc_to_scc(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 int _starpu_scc_copy_interface_from_cpu_to_scc(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, struct _starpu_async_channel *async_channel);
 
-int _starpu_scc_direct_access_supported(unsigned node, unsigned handling_node);
+int _starpu_scc_is_direct_access_supported(unsigned node, unsigned handling_node);
 uintptr_t _starpu_scc_malloc_on_node(unsigned dst_node, size_t size, int flags);
 void _starpu_scc_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);