瀏覽代碼

Fix confusion between worker data and combined worker data

Samuel Thibault 6 年之前
父節點
當前提交
d18b46e830
共有 2 個文件被更改,包括 6 次插入5 次删除
  1. 4 3
      src/sched_policies/component_worker.c
  2. 2 2
      tools/gdbinit

+ 4 - 3
src/sched_policies/component_worker.c

@@ -685,12 +685,13 @@ static struct starpu_task *combined_worker_pull_task(struct starpu_sched_compone
 static double combined_worker_estimated_end(struct starpu_sched_component * component)
 {
 	STARPU_ASSERT(starpu_sched_component_is_combined_worker(component));
-	struct _starpu_worker_component_data * data = component->data;
+	struct _starpu_worker_component_data * d = component->data;
 	double max = 0.0;
 	unsigned i;
-	for(i = 0; i < data->parallel_worker.worker_size; i++)
+	for(i = 0; i < d->parallel_worker.worker_size; i++)
 	{
-		data = _worker_components[component->tree->sched_ctx_id][data->parallel_worker.workerids[i]]->data;
+		struct _starpu_worker_component_data * data;
+		data = _worker_components[component->tree->sched_ctx_id][d->parallel_worker.workerids[i]]->data;
 		double tmp = data->list->exp_end;
 		max = tmp > max ? tmp : max;
 	}

+ 2 - 2
tools/gdbinit

@@ -1,7 +1,7 @@
 
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2010-2018  Université de Bordeaux
+# Copyright (C) 2010-2019  Université de Bordeaux
 # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018  CNRS
 #
 # StarPU is free software; you can redistribute it and/or modify
@@ -796,7 +796,7 @@ define starpu-print-spaces
 end
 
 define starpu-sched-print-component
-    set $c = $arg1
+    set $c = (struct starpu_sched_component *) $arg1
     starpu-print-spaces $arg0
     printf "%s %s %s (struct starpu_sched_component *) %p\n", $c->name, $c->properties & STARPU_SCHED_COMPONENT_HOMOGENEOUS ? "homogeneous":"heterogeneous", $c->properties & STARPU_SCHED_COMPONENT_SINGLE_MEMORY_NODE ? "single-node" : "multi-node", $c
     if $c->push_task == fifo_push_task