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

licences everywhere
more doc, more comments

Simon Archipoff лет назад: 12
Родитель
Сommit
5e2a2b29fb

+ 5 - 2
doc/doxygen/chapters/api/modularized_scheduler.doxy

@@ -323,9 +323,11 @@ starpu_sched_node_heft_create parameters
 
 \struct starpu_sched_specs
 \ingroup API_Modularized_Scheduler
-	 Define how build a scheduler according to topology.
+	 Define how build a scheduler according to topology. Each level (except for hwloc_machine_composed_sched_node) can be NULL, then
+	 the level is just skipped. Bugs everywhere, do not rely on.
 \var starpu_sched_specs::hwloc_machine_composed_sched_node
      the composed node to put on the top of the scheduler
+     this member must not be NULL
 \var starpu_sched_specs::hwloc_node_composed_sched_node
      the composed node to put for each memory node
 \var starpu_sched_specs::hwloc_socket_composed_sched_node
@@ -334,7 +336,8 @@ starpu_sched_node_heft_create parameters
      the composed node to put for each cache
      
 \var starpu_sched_specs::worker_composed_sched_node
-     a function that return a starpu_sched_node_composed_recipe to put on top of a worker of type \p archtype
+     a function that return a starpu_sched_node_composed_recipe to put on top of a worker of type \p archtype.
+     NULL is a valid return value, then no node will be added on top
 \var starpu_sched_specs::mix_heterogeneous_workers
      this flag is a dirty hack because of the poor expressivity of this interface. As example, if you want to build
      a heft node with a fifo node per numa node, and you also have GPUs, if this flag is set, GPUs will share those fifos.

+ 7 - 0
doc/doxygen/chapters/modularized_scheduler.doxy

@@ -1,3 +1,9 @@
+/*
+ * This file is part of the StarPU Handbook.
+ * Copyright (C) 2013 Simon Archipoff
+ * See the file version.doxy for copying conditions.
+ */
+
 /*! \page ModularizedScheduler Modularized Scheduler
 
 
@@ -59,4 +65,5 @@ A push call simply enqueue task in worker queue, no sort is performed
 here.
 If a worker call pop and get a parallel task, it will execute it with the
 combined worker it belong to.
+
 */

+ 16 - 0
include/starpu_sched_node.h

@@ -1,3 +1,19 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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.
+ */
+
 #ifndef __STARPU_SCHED_NODE_H__
 #define __STARPU_SCHED_NODE_H__
 #include <starpu.h>

+ 0 - 1
src/Makefile.am

@@ -241,7 +241,6 @@ libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = 		\
 	worker_collection/worker_list.c				\
 	sched_policies/node_worker.c				\
 	sched_policies/node_sched.c				\
-	sched_policies/node_eager.c				\
 	sched_policies/node_fifo.c 				\
 	sched_policies/node_work_stealing.c			\
 	sched_policies/prio_deque.c				\

+ 25 - 7
src/sched_policies/README

@@ -1,3 +1,17 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2013 Simon Archipoff
+#
+# 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.
 
 
 
@@ -12,7 +26,6 @@ The hypervisor must take all of them to modifying the scheduler.
 
 
 
-
 Creation/Destruction
 
 All the struct starpu_sched_node * starpu_sched_node_foo_create()
@@ -28,8 +41,6 @@ worker_node->workers_in_ctx should not be modified.
 
 
 
-
-
 Add/Remove workers
 
 I see 2 way for adding/removing workers of the scheduler
@@ -48,11 +59,18 @@ node. We also have a problem for shared object. The first way seems to
 be better.
 
 
+Hierarchical construction
+
+Bugs everywhere, works only in simple and particulars cases.
+Its difficult to guess where we should plug accelerators because we cant rely on
+hwloc topology. Hierarchical heft seems to work on simple machines with numa nodes
+and GPUs
+this fail if hwloc_socket_composed_sched_node or hwloc_cache_composed_sched_node is not
+NULL
+
+
 Various things
 
 In several place realloc is used (in prio_deque and for
 starpu_sched_node_add_child), because we should not have a lot
-different priority level nor adding too many childs.
-
-Estimated_end is defined differently for work stealing and fifo.
-I dont know which approach is better.
+different priority level nor adding too many childs.

+ 19 - 2
src/sched_policies/bitmap.c

@@ -1,8 +1,25 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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>
+#include <starpu_sched_node.h>
+
 #include <limits.h>
 #include <string.h>
 #include <stdlib.h>
-#include <starpu.h>
-#include <starpu_sched_node.h>
 
 #ifndef LONG_BIT
 #define LONG_BIT (sizeof(unsigned long) * 8)

+ 17 - 0
src/sched_policies/node_best_implementation.c

@@ -1,5 +1,22 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
 #include <starpu_scheduler.h>
+
 #include <float.h>
 
 

+ 16 - 0
src/sched_policies/node_composed.c

@@ -1,3 +1,19 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
 #include <common/list.h>
 

+ 0 - 46
src/sched_policies/node_eager.c

@@ -1,46 +0,0 @@
-#include <common/thread.h>
-#include <core/sched_policy.h>
-#include <starpu_sched_node.h>
-#include "fifo_queues.h"
-
-
-
-static void initialize_eager_center_policy(unsigned sched_ctx_id)
-{
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
-	struct starpu_sched_tree *t = starpu_sched_tree_create(sched_ctx_id);
- 	t->root = starpu_sched_node_fifo_create(NULL);
-	unsigned i;
-	for(i = 0; i < starpu_worker_get_count() + starpu_combined_worker_get_count(); i++)
-	{
-		struct starpu_sched_node * node = starpu_sched_node_worker_get(i);
-		if(!node)
-			continue;
-		node->fathers[sched_ctx_id] = t->root;
-		t->root->add_child(t->root, node);
-	}
-	starpu_sched_tree_update_workers(t);
-	starpu_sched_ctx_set_policy_data(sched_ctx_id, (void*)t);
-}
-
-static void deinitialize_eager_center_policy(unsigned sched_ctx_id)
-{
-	struct starpu_sched_tree *tree = (struct starpu_sched_tree*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
-	starpu_sched_tree_destroy(tree);
-	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
-}
-
-struct starpu_sched_policy _starpu_sched_tree_eager_policy =
-{
-	.init_sched = initialize_eager_center_policy,
-	.deinit_sched = deinitialize_eager_center_policy,
-	.add_workers = starpu_sched_tree_add_workers,
-	.remove_workers = starpu_sched_tree_remove_workers,
-	.push_task = starpu_sched_tree_push_task,
-	.pop_task = starpu_sched_tree_pop_task,
-	.pre_exec_hook = starpu_sched_node_worker_pre_exec_hook,
-	.post_exec_hook = starpu_sched_node_worker_post_exec_hook,
-	.pop_every_task = NULL,//pop_every_task_eager_policy,
-	.policy_name = "tree",
-	.policy_description = "test tree policy"
-};

+ 61 - 1
src/sched_policies/node_fifo.c

@@ -1,7 +1,24 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
-#include "prio_deque.h"
 #include <starpu_scheduler.h>
 
+#include "prio_deque.h"
+
 
 struct _starpu_fifo_data
 {
@@ -149,3 +166,46 @@ struct starpu_sched_node * starpu_sched_node_fifo_create(void * arg STARPU_ATTRI
 	node->deinit_data = fifo_node_deinit_data;
 	return node;
 }
+
+
+
+
+static void initialize_eager_center_policy(unsigned sched_ctx_id)
+{
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	struct starpu_sched_tree *t = starpu_sched_tree_create(sched_ctx_id);
+ 	t->root = starpu_sched_node_fifo_create(NULL);
+	unsigned i;
+	for(i = 0; i < starpu_worker_get_count() + starpu_combined_worker_get_count(); i++)
+	{
+		struct starpu_sched_node * node = starpu_sched_node_worker_get(i);
+		if(!node)
+			continue;
+		node->fathers[sched_ctx_id] = t->root;
+		t->root->add_child(t->root, node);
+	}
+	starpu_sched_tree_update_workers(t);
+	starpu_sched_ctx_set_policy_data(sched_ctx_id, (void*)t);
+}
+
+static void deinitialize_eager_center_policy(unsigned sched_ctx_id)
+{
+	struct starpu_sched_tree *tree = (struct starpu_sched_tree*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
+	starpu_sched_tree_destroy(tree);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
+}
+
+struct starpu_sched_policy _starpu_sched_tree_eager_policy =
+{
+	.init_sched = initialize_eager_center_policy,
+	.deinit_sched = deinitialize_eager_center_policy,
+	.add_workers = starpu_sched_tree_add_workers,
+	.remove_workers = starpu_sched_tree_remove_workers,
+	.push_task = starpu_sched_tree_push_task,
+	.pop_task = starpu_sched_tree_pop_task,
+	.pre_exec_hook = starpu_sched_node_worker_pre_exec_hook,
+	.post_exec_hook = starpu_sched_node_worker_post_exec_hook,
+	.pop_every_task = NULL,//pop_every_task_eager_policy,
+	.policy_name = "tree",
+	.policy_description = "test tree policy"
+};

+ 17 - 1
src/sched_policies/node_random.c

@@ -1,5 +1,21 @@
-#include <core/workers.h>
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
+#include <core/workers.h>
 
 static double compute_relative_speedup(struct starpu_sched_node * node)
 {

+ 19 - 1
src/sched_policies/node_sched.c

@@ -1,10 +1,28 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013 Simon Archipoff
+ *
+ * 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 <core/jobs.h>
 #include <core/workers.h>
 #include <starpu_sched_node.h>
 #include <starpu_thread_util.h>
-#include "sched_node.h"
+
 #include <float.h>
 
+#include "sched_node.h"
+
 
 /* wake up worker workerid
  * if called by a worker it dont try to wake up himself

+ 20 - 1
src/sched_policies/node_work_stealing.c

@@ -1,8 +1,27 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
-#include "prio_deque.h"
 #include <starpu_scheduler.h>
 #include <starpu.h>
+
 #include <float.h>
+
+#include "prio_deque.h"
+
 struct _starpu_work_stealing_data
 {
 /* keep track of the work performed from the beginning of the algorithm to make

+ 22 - 0
src/sched_policies/node_worker.c

@@ -1,5 +1,27 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011  Télécom-SudParis
+ * Copyright (C) 2011-2012  INRIA
+ * Copyright (C) 2013  Simon Archipoff
+
+ *
+ * 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_sched_node.h>
 #include <core/workers.h>
+
 #include <float.h>
 
 /* data structure for worker's queue look like this :

+ 18 - 1
src/sched_policies/prio_deque.c

@@ -1,6 +1,23 @@
-#include "prio_deque.h"
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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 <core/workers.h>
 
+#include "prio_deque.h"
+
 
 void _starpu_prio_deque_init(struct _starpu_prio_deque * pdeque)
 {

+ 15 - 0
src/sched_policies/prio_deque.h

@@ -1,3 +1,18 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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.
+ */
 #ifndef __PRIO_DEQUE_H__
 #define __PRIO_DEQUE_H__
 #include <starpu.h>

+ 19 - 0
src/sched_policies/sched_node.h

@@ -1,7 +1,26 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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.
+ */
+
 #ifndef __SCHED_NODE_H__
 #define __SCHED_NODE_H__
+
 #include <starpu_sched_node.h>
 
+
+/* lock and unlock drivers for modifying schedulers */
 void _starpu_sched_node_lock_all_workers(void);
 void _starpu_sched_node_unlock_all_workers(void);
 void _starpu_sched_node_lock_worker(int workerid);

+ 43 - 11
src/sched_policies/scheduler_maker.c

@@ -1,9 +1,36 @@
-#include "sched_node.h"
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2013  Simon Archipoff
+ *
+ * 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_sched_node.h>
 #include <common/list.h>
-#include <stdarg.h>
 #include <core/workers.h>
 
+#include "sched_node.h"
+
+
+
+/* The scheduler is built by a recursive function called on the hwloc topology with a starpu_sched_specs structure,
+ * each call return a set of starpu_sched_node, not a single one, because you may have a topology like that :
+ * MACHINE -- MEMORY NODE -- SOCKET
+ *                        \- SOCKET
+ * and you have defined a node for MACHINE, and a node for SOCKET, but not for MEMORY NODE then the recursive call
+ * on MEMORY NODE will return 2 starpu_sched_node for those 2 sockets
+ *
+ *
+ */
 
 struct sched_node_list
 {
@@ -25,6 +52,7 @@ static void add_node(struct sched_node_list *list, struct starpu_sched_node * no
 	list->arr[list->size] = node;
 	list->size++;
 }
+/* this is the function that actualy built the scheduler, but without workers */
 static struct sched_node_list helper_make_scheduler(hwloc_obj_t obj, struct starpu_sched_specs specs, unsigned sched_ctx_id)
 {
 	STARPU_ASSERT(obj);
@@ -72,7 +100,7 @@ static struct sched_node_list helper_make_scheduler(hwloc_obj_t obj, struct star
 	add_node(&l, node);
 	return l;
 }
-
+/* return the firt node in prefix order such as node->obj == obj, or NULL */
 struct starpu_sched_node * _find_sched_node_with_obj(struct starpu_sched_node * node, hwloc_obj_t obj)
 {
 	if(node == NULL)
@@ -89,23 +117,27 @@ struct starpu_sched_node * _find_sched_node_with_obj(struct starpu_sched_node *
 	return NULL;
 }
 
-
-static int is_same_kind_of_all(struct starpu_sched_node * root, struct _starpu_worker * w)
+/* return true if all workers in the tree have the same perf_arch as w_ref,
+ * if there is no worker it return true
+ */
+static int is_same_kind_of_all(struct starpu_sched_node * root, struct _starpu_worker * w_ref)
 {
 	if(starpu_sched_node_is_worker(root))
 	{
-		struct _starpu_worker * w_ = root->data;
-		return w_->perf_arch == w->perf_arch;
+		struct _starpu_worker * w = root->data;
+		return w->perf_arch == w_ref->perf_arch;
 	}
 	
 	int i;
 	for(i = 0;i < root->nchilds; i++)
-		if(!is_same_kind_of_all(root->childs[i], w))
+		if(!is_same_kind_of_all(root->childs[i], w_ref))
 			return 0;
 	return 1;
 }
-
-struct starpu_sched_node * find_mem_node(struct starpu_sched_node * root, struct starpu_sched_node * worker_node, unsigned sched_ctx_id)
+/* buggy function
+ * return the starpu_sched_node linked to the supposed memory node of worker_node
+ */
+static struct starpu_sched_node * find_mem_node(struct starpu_sched_node * root, struct starpu_sched_node * worker_node)
 {
 	struct starpu_sched_node * node = worker_node;
 	while(node->obj->type != HWLOC_OBJ_NODE
@@ -125,7 +157,7 @@ struct starpu_sched_node * find_mem_node(struct starpu_sched_node * root, struct
 
 static struct starpu_sched_node * where_should_we_plug_this(struct starpu_sched_node *root, struct starpu_sched_node * worker_node, struct starpu_sched_specs specs, unsigned sched_ctx_id)
 {
-	struct starpu_sched_node * mem = find_mem_node(root ,worker_node, sched_ctx_id);
+	struct starpu_sched_node * mem = find_mem_node(root ,worker_node);
 	if(specs.mix_heterogeneous_workers || mem->fathers[sched_ctx_id] == NULL)
 		return mem;
 	hwloc_obj_t obj = mem->obj;