Andra Hugo 13 年 前
コミット
8d62590c9d
共有3 個のファイルを変更した6 個の追加5 個の削除を含む
  1. 1 1
      examples/axpy/axpy.c
  2. 2 0
      examples/scheduler/schedulers.sh
  3. 3 4
      src/sched_policies/random_policy.c

+ 1 - 1
examples/axpy/axpy.c

@@ -117,7 +117,7 @@ struct starpu_opencl_program opencl_program;
 
 int main(int argc, char **argv)
 {
-	int ret, exit_value;
+	int ret, exit_value = 0;
 
 	/* Initialize StarPU */
 	ret = starpu_init(NULL);

+ 2 - 0
examples/scheduler/schedulers.sh

@@ -23,6 +23,8 @@ check_success()
     fi
 }
 
+[ -x ./cholesky/cholesky_tag ] || exit 77
+
 SCHEDULERS=`STARPU_SCHED="help" ./basic_examples/hello_world 2>&1 | awk '/->/ {print $1}'`
 
 for sched in $SCHEDULERS

+ 3 - 4
src/sched_policies/random_policy.c

@@ -1,8 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
- * Copyright (C) 2011  INRIA
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  * 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
@@ -18,6 +17,7 @@
 
 /* Policy attributing tasks randomly to workers */
 
+#include <starpu_rand.h>
 #include <core/workers.h>
 #include <core/sched_ctx.h>
 #include <sched_policies/fifo_queues.h>
@@ -113,8 +113,7 @@ static void random_remove_workers(unsigned sched_ctx_id, int *workerids, unsigne
 	for (i = 0; i < nworkers; i++)
 	{
 		workerid = workerids[i];
-		struct _starpu_worker *workerarg = _starpu_get_worker_struct(workerid);
-		starpu_worker_set_sched_condition(sched_ctx_id, workerid, &workerarg->sched_mutex, &workerarg->sched_cond);
+		starpu_worker_set_sched_condition(sched_ctx_id, workerid, NULL, NULL);
 	}
 
 }