浏览代码

modified benchs in order to avoid duplication, manag concurency of add/remove workers to/from ctx, hypervisor manages the resize of ctxs

Andra Hugo 14 年之前
父节点
当前提交
8d1d5c0a77
共有 46 个文件被更改,包括 2424 次插入814 次删除
  1. 4 0
      Makefile.am
  2. 18 0
      configure.ac
  3. 0 34
      examples/Makefile.am
  4. 12 0
      examples/cholesky/cholesky.h
  5. 5 1
      examples/cholesky/cholesky_implicit.c
  6. 0 186
      examples/cholesky_no_ctxs/cholesky_no_ctxs.c
  7. 51 2
      examples/sched_ctx_utils/sched_ctx_utils.c
  8. 15 1
      include/starpu_scheduler.h
  9. 12 12
      tests/cholesky_no_ctxs/all_sched.sh
  10. 715 0
      sched_ctx_hypervisor/Makefile.in
  11. 26 0
      sched_ctx_hypervisor/TAGS
  12. 711 0
      sched_ctx_hypervisor/examples/Makefile.in
  13. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/.dirstamp
  14. 9 13
      examples/cholesky_no_ctxs/cholesky/cholesky.h
  15. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_grain_tag.c
  16. 27 29
      examples/cholesky_no_ctxs/cholesky/cholesky_implicit.c
  17. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_implicit_all_machine.c
  18. 2 2
      examples/cholesky_no_ctxs/cholesky/cholesky_kernels.c
  19. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_models.c
  20. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_tag.c
  21. 0 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_tile_tag.c
  22. 225 0
      sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky_2ctxs
  23. 二进制
      sched_ctx_hypervisor/examples/cholesky_2ctxs/core
  24. 24 0
      sched_ctx_hypervisor/include/sched_ctx_hypervisor.h
  25. 220 137
      src/core/sched_ctx.c
  26. 21 3
      src/core/sched_ctx.h
  27. 28 13
      src/core/sched_policy.c
  28. 2 2
      src/core/workers.c
  29. 2 1
      src/core/workers.h
  30. 9 13
      src/sched_policies/deque_modeling_policy_data_aware.c
  31. 6 10
      src/sched_policies/eager_central_policy.c
  32. 5 9
      src/sched_policies/eager_central_priority_policy.c
  33. 54 56
      src/sched_policies/heft.c
  34. 1 1
      src/sched_policies/parallel_greedy.c
  35. 3 7
      src/sched_policies/random_policy.c
  36. 4 8
      src/sched_policies/work_stealing_policy.c
  37. 0 137
      tests/cholesky_2ctxs/sched.sh
  38. 14 11
      tests/cholesky_2ctxs/all_sched.sh
  39. 0 0
      tests/cholesky_ctxs/comp.sh
  40. 8 8
      tests/cholesky_2ctxs/comp_all.sh
  41. 58 0
      tests/cholesky_ctxs/evaluate_expression.sh
  42. 0 0
      tests/cholesky_ctxs/gnuplot_efficiency.sh
  43. 0 0
      tests/cholesky_ctxs/gnuplot_gflopsrate.sh
  44. 63 0
      tests/cholesky_ctxs/sched_no_ctxs.sh
  45. 70 0
      tests/cholesky_ctxs/sched_with_ctxs.sh
  46. 0 118
      tests/cholesky_no_ctxs/sched.sh

+ 4 - 0
Makefile.am

@@ -39,6 +39,10 @@ if BUILD_GCC_PLUGIN
 SUBDIRS += gcc-plugin
 endif
 
+if BUILD_SCHED_CTX_HYPERVISOR
+SUBDIRS += sched_ctx_hypervisor
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libstarpu.pc
 

+ 18 - 0
configure.ac

@@ -171,6 +171,21 @@ AC_ARG_ENABLE(max_sched_ctxs, [AS_HELP_STRING([--enable-max-sched-ctxs=<number>]
 AC_MSG_RESULT($max_sched_ctxs)
 AC_DEFINE_UNQUOTED(STARPU_NMAX_SCHED_CTXS, [$max_sched_ctxs], [Maximum number of sched_ctxs supported])
 
+AC_ARG_ENABLE([sched_ctx_hypervisor],
+  [AS_HELP_STRING([--enable-sched-ctx-hypervisor],
+    [enable resizing contexts (experimental)])],
+  [enable_sched_ctx_hypervisor="$enableval"],
+  [enable_sched_ctx_hypervisor="no"])
+
+if test "x$enable_sched_ctx_hypervisor" = "xyes"; then
+   AC_DEFINE(STARPU_USE_SCHED_CTX_HYPERVISOR, [1], [enable sched_ctx_hypervisor lib])
+   build_sched_ctx_hypervisor="yes"
+else
+   build_sched_ctx_hypervisor="no"
+fi
+
+AM_CONDITIONAL([BUILD_SCHED_CTX_HYPERVISOR], [test "x$build_sched_ctx_hypervisor" = "xyes"])
+AM_CONDITIONAL([STARPU_USE_SCHED_CTX_HYPERVISOR], [test "x$build_sched_ctx_hypervisor" = "xyes"])
 ###############################################################################
 #                                                                             #
 #                                 CPUs settings                               #
@@ -1420,6 +1435,9 @@ AC_OUTPUT([
 	gcc-plugin/tests/Makefile
 	gcc-plugin/tests/run-test
 	gcc-plugin/examples/Makefile
+	sched_ctx_hypervisor/Makefile
+	sched_ctx_hypervisor/src/Makefile
+	sched_ctx_hypervisor/examples/Makefile
 ])
 
 AC_MSG_NOTICE([

+ 0 - 34
examples/Makefile.am

@@ -56,8 +56,6 @@ EXTRA_DIST = 					\
 	lu/xlu_kernels.c			\
 	lu/lu_example.c				\
 	sched_ctx_utils/sched_ctx_utils.c		\
-	cholesky_2ctxs/cholesky_2ctxs.c			\
-	cholesky_no_ctxs/cholesky_no_ctxs.c			\
 	incrementer/incrementer_kernels_opencl_kernel.cl 	\
 	basic_examples/variable_kernels_opencl_kernel.cl	\
 	matvecmult/matvecmult_kernel.cl				\
@@ -540,38 +538,6 @@ endif
 endif
 
 
-###########################
-# 2 Cholesky in 2 ctxs  example #
-###########################
-if !NO_BLAS_LIB
-
-examplebin_PROGRAMS += 				\
-	cholesky_2ctxs/cholesky_2ctxs
-
-cholesky_2ctxs_cholesky_2ctxs_SOURCES =			\
-	cholesky_2ctxs/cholesky_2ctxs.c			\
-	cholesky_2ctxs/cholesky/cholesky_implicit.c		\
-	cholesky_2ctxs/cholesky/cholesky_models.c		\
-	cholesky_2ctxs/cholesky/cholesky_kernels.c		\
-	common/blas.c
-endif
-
-###########################
-# 2 Cholesky in no ctx example #
-###########################
-if !NO_BLAS_LIB
-
-examplebin_PROGRAMS += 				\
-	cholesky_no_ctxs/cholesky_no_ctxs
-
-cholesky_no_ctxs_cholesky_no_ctxs_SOURCES =			\
-	cholesky_no_ctxs/cholesky_no_ctxs.c			\
-	cholesky_no_ctxs/cholesky/cholesky_implicit.c		\
-	cholesky_no_ctxs/cholesky/cholesky_models.c		\
-	cholesky_no_ctxs/cholesky/cholesky_kernels.c		\
-	common/blas.c
-endif
-
 ################
 # Heat example #
 ################

+ 12 - 0
examples/cholesky/cholesky.h

@@ -63,6 +63,8 @@ static unsigned noprio = 0;
 static unsigned check = 0;
 static unsigned with_ctxs = 0;
 static unsigned with_noctxs = 0;
+static unsigned chole1 = 0;
+static unsigned chole2 = 0;
 
 void chol_cpu_codelet_update_u11(void **, void *);
 void chol_cpu_codelet_update_u21(void **, void *);
@@ -90,6 +92,16 @@ static void __attribute__((unused)) parse_args(int argc, char **argv)
 			with_noctxs = 1;
 			break;
 		}
+		
+		if (strcmp(argv[i], "-chole1") == 0) {
+			chole1 = 1;
+			break;
+		}
+
+		if (strcmp(argv[i], "-chole2") == 0) {
+			chole2 = 1;
+			break;
+		}
 
 		if (strcmp(argv[i], "-size") == 0) {
 			char *argptr;

+ 5 - 1
examples/cholesky/cholesky_implicit.c

@@ -131,7 +131,7 @@ static void _cholesky(starpu_data_handle dataA, unsigned nblocks)
 
 	double flop = (1.0f*n*n*n)/3.0f;
 
-	if(with_ctxs || with_noctxs)
+	if(with_ctxs || with_noctxs || chole1 || chole2)
 		update_sched_ctx_timing_results((flop/timing/1000.0f), (timing/1000000.0f));
 	else
 	{
@@ -295,6 +295,10 @@ int main(int argc, char **argv)
 	}
 	else if(with_noctxs)
 		start_2benchs(execute_cholesky);
+	else if(chole1)
+		start_1stbench(execute_cholesky);
+	else if(chole2)
+		start_2ndbench(execute_cholesky);
 	else
 		execute_cholesky(size, nblocks);
 

+ 0 - 186
examples/cholesky_no_ctxs/cholesky_no_ctxs.c

@@ -1,186 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2011  INRIA
- *
- * 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 "cholesky/cholesky.h"
-#include <pthread.h>
-
-typedef struct {
-  int start;
-  int argc;
-  char **argv;
-} params;
-
-typedef struct {
-  double flops;
-  double avg_timing;
-} retvals;
-
-#define NSAMPLES 3
-pthread_barrier_t barrier;
-
-void* func_cholesky3(void *val){
-  params *p = (params*)val;
-
-  int i;
-  retvals *rv  = (retvals*)malloc(sizeof(retvals));
-  rv->flops = 0;
-  rv->avg_timing = 0;
-  double timing = 0;
-
-  for(i = 0; i < NSAMPLES; i++)
-    {
-      rv->flops += run_cholesky_implicit(p->start, p->argc, p->argv, &timing, &barrier);
-      rv->avg_timing += timing;
-    }
-
-  rv->flops /= NSAMPLES;
-  rv->avg_timing /= NSAMPLES;
-
-  return (void*)rv;
-}
-
-void cholesky_vs_cholesky(params *p1, params *p2, unsigned chole1, unsigned chole2){
-  if(!chole1 && !chole2) 
-    {
-      /* 2 cholesky in a single ctx */
-      starpu_init(NULL);
-      starpu_helper_cublas_init();
-      
-      pthread_t tid2[2];
-      pthread_barrier_init(&barrier, NULL, 2);
-      
-      struct timeval start;
-      struct timeval end;
-      
-      gettimeofday(&start, NULL);
-  
-      pthread_create(&tid2[0], NULL, (void*)func_cholesky3, (void*)p1);
-      pthread_create(&tid2[1], NULL, (void*)func_cholesky3, (void*)p2);
-      
-      void *gflops_cholesky4;
-      void *gflops_cholesky5;
-      
-      pthread_join(tid2[0], &gflops_cholesky4);
-      pthread_join(tid2[1], &gflops_cholesky5);
-      
-      gettimeofday(&end, NULL);
-      
-      starpu_helper_cublas_shutdown();
-      starpu_shutdown();
-      double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-      timing /= 1000000;
-      //      timing /= 60;
-      
-      printf("%2.2f %2.2f ", ((retvals*)gflops_cholesky4)->flops, ((retvals*)gflops_cholesky5)->flops);
-      printf("%2.2f %2.2f %2.2f\n", ((retvals*)gflops_cholesky4)->avg_timing, ((retvals*)gflops_cholesky5)->avg_timing, timing);
-      free(gflops_cholesky4);
-      free(gflops_cholesky5);
-    }
-  else if(chole1 && !chole2)
-    {
-      starpu_init(NULL);
-      starpu_helper_cublas_init();
-      
-      pthread_t tid2[2];
-      pthread_barrier_init(&barrier, NULL, 2);
-      
-      struct timeval start;
-      struct timeval end;
-      
-      gettimeofday(&start, NULL);
-  
-      pthread_create(&tid2[0], NULL, (void*)func_cholesky3, (void*)p1);
-      
-      void *gflops_cholesky4;
-      
-      pthread_join(tid2[0], &gflops_cholesky4);
-      
-      gettimeofday(&end, NULL);
-      
-      starpu_helper_cublas_shutdown();
-      starpu_shutdown();
-      double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-      timing /= 1000000;
-      //      timing /= 60;
-
-      printf("%2.2f %2.2f ", ((retvals*)gflops_cholesky4)->flops, 0.0);
-      printf("%2.2f %2.2f %2.2f\n", ((retvals*)gflops_cholesky4)->avg_timing, 0.0, timing);
-      free(gflops_cholesky4);
-    }
-  else if(!chole1 && chole2)
-    {
-      starpu_init(NULL);
-      starpu_helper_cublas_init();
-      
-      pthread_t tid2[2];
-      pthread_barrier_init(&barrier, NULL, 2);
-      
-      struct timeval start;
-      struct timeval end;
-      
-      gettimeofday(&start, NULL);
-  
-      pthread_create(&tid2[1], NULL, (void*)func_cholesky3, (void*)p2);
-      
-      void *gflops_cholesky5;
-     
-      pthread_join(tid2[1], &gflops_cholesky5);
-      
-      gettimeofday(&end, NULL);
-      
-      starpu_helper_cublas_shutdown();
-      starpu_shutdown();
-      double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-      timing /= 1000000;
-      //      timing /= 60;
-      
-      printf("%2.2f %2.2f ", 0.0, ((retvals*)gflops_cholesky5)->flops);
-    
-      printf("%2.2f %2.2f %2.2f\n", 0.0, ((retvals*)gflops_cholesky5)->avg_timing, timing);
-
-      free(gflops_cholesky5);
-    }
-}
-
-
-int main(int argc, char **argv)
-{
-  unsigned chole1 = 0, chole2 = 0;
-  params p1;
-  p1.start = 1;
-  p1.argc = 5;
-  p1.argv = argv;
-
-  params p2;
-  p2.start = 5;
-  p2.argc = 9;
-  p2.argv = argv;
- 
-  int i;
-  for (i = 9; i < argc; i++) {
-    if (strcmp(argv[i], "-chole1") == 0) {
-      chole1 = 1;
-    }
-    
-    if (strcmp(argv[i], "-chole2") == 0) {
-      chole2 = 1;
-    }    
-  }
-
-  cholesky_vs_cholesky(&p1, &p2, chole1, chole2);
-
-  return 0;
-}

+ 51 - 2
examples/sched_ctx_utils/sched_ctx_utils.c

@@ -125,10 +125,59 @@ void start_2benchs(void (*bench)(unsigned, unsigned))
 	double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
 	timing /= 1000000;
 
-	printf("%2.2f %2.2f ", rv[0].flops, rv[0].flops);
-	printf("%2.2f %2.2f %2.2f\n", rv[1].avg_timing, rv[2].avg_timing, timing);
+	printf("%2.2f %2.2f ", rv[0].flops, rv[1].flops);
+	printf("%2.2f %2.2f %2.2f\n", rv[0].avg_timing, rv[1].avg_timing, timing);
 
 }
+
+void start_1stbench(void (*bench)(unsigned, unsigned))
+{
+	p1.bench = bench;
+	p1.size = size1;
+	p1.nblocks = nblocks1;
+	
+	struct timeval start;
+	struct timeval end;
+
+	gettimeofday(&start, NULL);
+
+	start_bench((void*)&p1);
+
+	gettimeofday(&end, NULL);
+
+	pthread_mutex_destroy(&mut);
+  
+	double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
+	timing /= 1000000;
+
+	printf("%2.2f %2.2f ", rv[0].flops);
+	printf("%2.2f %2.2f %2.2f\n", rv[0].avg_timing, timing);
+}
+
+void start_2ndbench(void (*bench)(unsigned, unsigned))
+{
+	p2.bench = bench;
+	p2.size = size2;
+	p2.nblocks = nblocks2;
+	
+	struct timeval start;
+	struct timeval end;
+
+	gettimeofday(&start, NULL);
+
+	start_bench((void*)&p2);
+
+	gettimeofday(&end, NULL);
+
+	pthread_mutex_destroy(&mut);
+  
+	double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
+	timing /= 1000000;
+
+	printf("%2.2f %2.2f ", rv[1].flops);
+	printf("%2.2f %2.2f %2.2f\n", rv[1].avg_timing, timing);
+}
+
 void construct_contexts(void (*bench)(unsigned, unsigned))
 {
 	int nprocs1 = cpu1 + gpu + gpu1;

+ 15 - 1
include/starpu_scheduler.h

@@ -72,7 +72,7 @@ struct starpu_sched_policy_s {
 	void (*init_sched)(unsigned ctx_id);
 
 	/* Initialize the scheduling policy only for certain workers. */
-	void (*init_sched_for_workers)(unsigned ctx_id, unsigned n_added_workers);
+	void (*init_sched_for_workers)(unsigned ctx_id, int *workerids, unsigned nworkers);
 
 	/* Cleanup the scheduling policy. */
 	void (*deinit_sched)(unsigned ctx_id);
@@ -107,6 +107,15 @@ struct starpu_sched_policy_s {
 	const char *policy_description;
 };
 
+struct starpu_sched_ctx_hypervisor_criteria {
+	void (*update_current_idle_time)(unsigned sched_ctx, int worker, double idle_time, unsigned current_nprocs);
+	void (*update_current_working_time)(unsigned sched_ctx, int worker, double working_time, unsigned current_nprocs);
+};
+
+#ifdef STARPU_BUILD_SCHED_CTX_HYPERVISOR
+unsigned starpu_create_sched_ctx_with_criteria(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_name, struct starpu_sched_ctx_hypervisor_criteria *criteria);
+#endif //STARPU_BUILD_SCHED_CTX_HYPERVISOR
+
 unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_name);
 
 void starpu_delete_sched_ctx(unsigned sched_ctx_id, unsigned inheritor_sched_ctx_id);
@@ -115,6 +124,11 @@ void starpu_add_workers_to_sched_ctx(int *workerids_ctx, int nworkers_ctx, unsig
 
 void starpu_remove_workers_from_sched_ctx(int *workerids_ctx, int nworkers_ctx, unsigned sched_ctx);
 
+int* starpu_get_workers_of_ctx(unsigned sched_ctx);
+
+void starpu_require_resize(unsigned sched_ctx, int *workers_to_be_moved, unsigned nworkers_to_be_moved);
+
+
 /* When there is no available task for a worker, StarPU blocks this worker on a
 condition variable. This function specifies which condition variable (and the
 associated mutex) should be used to block (and to wake up) a worker. Note that

+ 12 - 12
tests/cholesky_no_ctxs/all_sched.sh

@@ -1,23 +1,23 @@
-#!/bin/bash 
-
-
 # StarPU --- Runtime system for heterogeneous multicore architectures.
-# 
-# Copyright (C) 2011  INRIA
-# 
+#
+# Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
+#
 # 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.
 
-#export STARPU_DIR=$HOME/sched_ctx/build
+SUBDIRS = src examples
+
+libsched_ctx_hypervisor_la_includedir=$(includedir)
+
+noinst_HEADERS = src/sched_ctx_hypervisor_intern.h
+
+include_HEADERS = include/sched_ctx_hypervisor.h
 
-source sched.sh 
-source sched.sh 1stchole -chole1
-source sched.sh 2ndchole -chole2

+ 715 - 0
sched_ctx_hypervisor/Makefile.in

@@ -0,0 +1,715 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
+#
+# 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.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = sched_ctx_hypervisor
+DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gcc.m4 $(top_srcdir)/m4/libs.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/common/config.h \
+	$(top_builddir)/include/starpu_config.h \
+	$(top_builddir)/gcc-plugin/src/starpu-gcc-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(includedir)"
+HEADERS = $(include_HEADERS) $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+ATLASDIR = @ATLASDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLAS_LIB = @BLAS_LIB@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_OR_MPICC = @CC_OR_MPICC@
+CFLAGS = @CFLAGS@
+COVERAGE = @COVERAGE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTWF_CFLAGS = @FFTWF_CFLAGS@
+FFTWF_LIBS = @FFTWF_LIBS@
+FFTWL_CFLAGS = @FFTWL_CFLAGS@
+FFTWL_LIBS = @FFTWL_LIBS@
+FFTW_CFLAGS = @FFTW_CFLAGS@
+FFTW_LIBS = @FFTW_LIBS@
+FGREP = @FGREP@
+FXTDIR = @FXTDIR@
+FXT_CFLAGS = @FXT_CFLAGS@
+FXT_LIBS = @FXT_LIBS@
+GCC_PLUGIN_INCLUDE_DIR = @GCC_PLUGIN_INCLUDE_DIR@
+GLOBAL_AM_CFLAGS = @GLOBAL_AM_CFLAGS@
+GORDON_CFLAGS = @GORDON_CFLAGS@
+GORDON_LIBS = @GORDON_LIBS@
+GORDON_REQUIRES = @GORDON_REQUIRES@
+GOTODIR = @GOTODIR@
+GREP = @GREP@
+GUILE = @GUILE@
+HAVE_FFTWFL = @HAVE_FFTWFL@
+HWLOC_CFLAGS = @HWLOC_CFLAGS@
+HWLOC_LIBS = @HWLOC_LIBS@
+HWLOC_REQUIRES = @HWLOC_REQUIRES@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGMA_CFLAGS = @MAGMA_CFLAGS@
+MAGMA_LIBS = @MAGMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MPICC = @MPICC@
+MPIEXEC = @MPIEXEC@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NVCC = @NVCC@
+NVCCFLAGS = @NVCCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+QMAKE = @QMAKE@
+QWT_PRI = @QWT_PRI@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STARPU_BLAS_LDFLAGS = @STARPU_BLAS_LDFLAGS@
+STARPU_BUILD_DIR = @STARPU_BUILD_DIR@
+STARPU_CUDA_CPPFLAGS = @STARPU_CUDA_CPPFLAGS@
+STARPU_CUDA_FORTRAN_LDFLAGS = @STARPU_CUDA_FORTRAN_LDFLAGS@
+STARPU_CUDA_LDFLAGS = @STARPU_CUDA_LDFLAGS@
+STARPU_CUFFT_LDFLAGS = @STARPU_CUFFT_LDFLAGS@
+STARPU_CURAND_LDFLAGS = @STARPU_CURAND_LDFLAGS@
+STARPU_DATA_STATS = @STARPU_DATA_STATS@
+STARPU_GLPK_LDFLAGS = @STARPU_GLPK_LDFLAGS@
+STARPU_HAVE_F77_H = @STARPU_HAVE_F77_H@
+STARPU_HAVE_FFTW = @STARPU_HAVE_FFTW@
+STARPU_HAVE_FFTWF = @STARPU_HAVE_FFTWF@
+STARPU_HAVE_HWLOC = @STARPU_HAVE_HWLOC@
+STARPU_HAVE_MAGMA = @STARPU_HAVE_MAGMA@
+STARPU_LIBNUMA_LDFLAGS = @STARPU_LIBNUMA_LDFLAGS@
+STARPU_MS_LIB = @STARPU_MS_LIB@
+STARPU_OPENCL_CPPFLAGS = @STARPU_OPENCL_CPPFLAGS@
+STARPU_OPENCL_DATAdir = @STARPU_OPENCL_DATAdir@
+STARPU_OPENCL_LDFLAGS = @STARPU_OPENCL_LDFLAGS@
+STARPU_OPENGL_RENDER = @STARPU_OPENGL_RENDER@
+STARPU_OPENGL_RENDER_LDFLAGS = @STARPU_OPENGL_RENDER_LDFLAGS@
+STARPU_PERF_DEBUG = @STARPU_PERF_DEBUG@
+STARPU_QWT_CPPFLAGS = @STARPU_QWT_CPPFLAGS@
+STARPU_SRC_DIR = @STARPU_SRC_DIR@
+STARPU_USE_CPU = @STARPU_USE_CPU@
+STARPU_USE_CUDA = @STARPU_USE_CUDA@
+STARPU_USE_FXT = @STARPU_USE_FXT@
+STARPU_USE_GORDON = @STARPU_USE_GORDON@
+STARPU_USE_OPENCL = @STARPU_USE_OPENCL@
+STATS = @STATS@
+STRIP = @STRIP@
+USE_MPI = @USE_MPI@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+mpicc_path = @mpicc_path@
+mpiexec_path = @mpiexec_path@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src examples
+libsched_ctx_hypervisor_la_includedir = $(includedir)
+noinst_HEADERS = src/sched_ctx_hypervisor_intern.h
+include_HEADERS = include/sched_ctx_hypervisor.h
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sched_ctx_hypervisor/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign sched_ctx_hypervisor/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-includeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 26 - 0
sched_ctx_hypervisor/TAGS

@@ -0,0 +1,26 @@
+
+src/sched_ctx_hypervisor_intern.h,974
+#define MAX_IDLE_TIME MAX_IDLE_TIME3,28
+#define MIN_WORKING_TIME MIN_WORKING_TIME4,54
+struct sched_ctx_wrapper {sched_ctx_wrapper6,84
+	unsigned sched_ctx;sched_ctx8,142
+	unsigned min_nprocs;min_nprocs11,210
+	unsigned max_nprocs;max_nprocs14,274
+	int priority[STARPU_NMAXWORKERS];priority19,437
+	double max_idle_time[STARPU_NMAXWORKERS];max_idle_time22,535
+	double min_working_time[STARPU_NMAXWORKERS];min_working_time25,646
+	double current_idle_time[STARPU_NMAXWORKERS];current_idle_time28,746
+	double current_working_time[STARPU_NMAXWORKERS];current_working_time31,850
+	unsigned current_nprocs;current_nprocs34,940
+struct sched_ctx_hypervisor {sched_ctx_hypervisor37,970
+	struct sched_ctx_wrapper sched_ctx_wrapper[STARPU_NMAX_SCHED_CTXS];sched_ctx_wrapper38,1000
+	int resize_granularity;resize_granularity39,1069
+	unsigned resize;resize40,1094
+	unsigned num_ctxs;num_ctxs41,1112
+struct sched_ctx_hypervisor hypervisor;hypervisor44,1136
+
+include/sched_ctx_hypervisor.h,0
+
+/home/ahugo/sched_ctx_branch3/sched_ctx/sched_ctx_hypervisor/src/TAGS,include
+
+/home/ahugo/sched_ctx_branch3/sched_ctx/sched_ctx_hypervisor/examples/TAGS,include

+ 711 - 0
sched_ctx_hypervisor/examples/Makefile.in

@@ -0,0 +1,711 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
+#
+# 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.
+#AUTOMAKE_OPTIONS = subdir-objects
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+@NO_BLAS_LIB_FALSE@noinst_PROGRAMS =  \
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs/cholesky_2ctxs$(EXEEXT)
+subdir = sched_ctx_hypervisor/examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gcc.m4 $(top_srcdir)/m4/libs.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/common/config.h \
+	$(top_builddir)/include/starpu_config.h \
+	$(top_builddir)/gcc-plugin/src/starpu-gcc-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am__cholesky_2ctxs_cholesky_2ctxs_SOURCES_DIST =  \
+	cholesky_2ctxs/cholesky_2ctxs.c \
+	cholesky_2ctxs/cholesky/cholesky_implicit.c \
+	cholesky_2ctxs/cholesky/cholesky_models.c \
+	cholesky_2ctxs/cholesky/cholesky_kernels.c \
+	$(top_srcdir)/examples/common/blas.c
+@NO_BLAS_LIB_FALSE@am_cholesky_2ctxs_cholesky_2ctxs_OBJECTS =  \
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs.$(OBJEXT) \
+@NO_BLAS_LIB_FALSE@	cholesky_implicit.$(OBJEXT) \
+@NO_BLAS_LIB_FALSE@	cholesky_models.$(OBJEXT) \
+@NO_BLAS_LIB_FALSE@	cholesky_kernels.$(OBJEXT) blas.$(OBJEXT)
+cholesky_2ctxs_cholesky_2ctxs_OBJECTS =  \
+	$(am_cholesky_2ctxs_cholesky_2ctxs_OBJECTS)
+@NO_BLAS_LIB_FALSE@cholesky_2ctxs_cholesky_2ctxs_DEPENDENCIES = $(top_srcdir)/sched_ctx_hypervisor/src/libsched_ctx_hypervisor.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__dirstamp = $(am__leading_dot)dirstamp
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/common -I$(top_builddir)/include -I$(top_builddir)/gcc-plugin/src
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(cholesky_2ctxs_cholesky_2ctxs_SOURCES)
+DIST_SOURCES = $(am__cholesky_2ctxs_cholesky_2ctxs_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+ATLASDIR = @ATLASDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLAS_LIB = @BLAS_LIB@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_OR_MPICC = @CC_OR_MPICC@
+CFLAGS = @CFLAGS@
+COVERAGE = @COVERAGE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FFTWF_CFLAGS = @FFTWF_CFLAGS@
+FFTWF_LIBS = @FFTWF_LIBS@
+FFTWL_CFLAGS = @FFTWL_CFLAGS@
+FFTWL_LIBS = @FFTWL_LIBS@
+FFTW_CFLAGS = @FFTW_CFLAGS@
+FFTW_LIBS = @FFTW_LIBS@
+FGREP = @FGREP@
+FXTDIR = @FXTDIR@
+FXT_CFLAGS = @FXT_CFLAGS@
+FXT_LIBS = @FXT_LIBS@
+GCC_PLUGIN_INCLUDE_DIR = @GCC_PLUGIN_INCLUDE_DIR@
+GLOBAL_AM_CFLAGS = @GLOBAL_AM_CFLAGS@
+GORDON_CFLAGS = @GORDON_CFLAGS@
+GORDON_LIBS = @GORDON_LIBS@
+GORDON_REQUIRES = @GORDON_REQUIRES@
+GOTODIR = @GOTODIR@
+GREP = @GREP@
+GUILE = @GUILE@
+HAVE_FFTWFL = @HAVE_FFTWFL@
+HWLOC_CFLAGS = @HWLOC_CFLAGS@
+HWLOC_LIBS = @HWLOC_LIBS@
+HWLOC_REQUIRES = @HWLOC_REQUIRES@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = $(top_srcdir)/sched_ctx_hypervisor/src/libsched_ctx_hypervisor.la
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAGMA_CFLAGS = @MAGMA_CFLAGS@
+MAGMA_LIBS = @MAGMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MPICC = @MPICC@
+MPIEXEC = @MPIEXEC@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NVCC = @NVCC@
+NVCCFLAGS = @NVCCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+QMAKE = @QMAKE@
+QWT_PRI = @QWT_PRI@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STARPU_BLAS_LDFLAGS = @STARPU_BLAS_LDFLAGS@
+STARPU_BUILD_DIR = @STARPU_BUILD_DIR@
+STARPU_CUDA_CPPFLAGS = @STARPU_CUDA_CPPFLAGS@
+STARPU_CUDA_FORTRAN_LDFLAGS = @STARPU_CUDA_FORTRAN_LDFLAGS@
+STARPU_CUDA_LDFLAGS = @STARPU_CUDA_LDFLAGS@
+STARPU_CUFFT_LDFLAGS = @STARPU_CUFFT_LDFLAGS@
+STARPU_CURAND_LDFLAGS = @STARPU_CURAND_LDFLAGS@
+STARPU_DATA_STATS = @STARPU_DATA_STATS@
+STARPU_GLPK_LDFLAGS = @STARPU_GLPK_LDFLAGS@
+STARPU_HAVE_F77_H = @STARPU_HAVE_F77_H@
+STARPU_HAVE_FFTW = @STARPU_HAVE_FFTW@
+STARPU_HAVE_FFTWF = @STARPU_HAVE_FFTWF@
+STARPU_HAVE_HWLOC = @STARPU_HAVE_HWLOC@
+STARPU_HAVE_MAGMA = @STARPU_HAVE_MAGMA@
+STARPU_LIBNUMA_LDFLAGS = @STARPU_LIBNUMA_LDFLAGS@
+STARPU_MS_LIB = @STARPU_MS_LIB@
+STARPU_OPENCL_CPPFLAGS = @STARPU_OPENCL_CPPFLAGS@
+STARPU_OPENCL_DATAdir = @STARPU_OPENCL_DATAdir@
+STARPU_OPENCL_LDFLAGS = @STARPU_OPENCL_LDFLAGS@
+STARPU_OPENGL_RENDER = @STARPU_OPENGL_RENDER@
+STARPU_OPENGL_RENDER_LDFLAGS = @STARPU_OPENGL_RENDER_LDFLAGS@
+STARPU_PERF_DEBUG = @STARPU_PERF_DEBUG@
+STARPU_QWT_CPPFLAGS = @STARPU_QWT_CPPFLAGS@
+STARPU_SRC_DIR = @STARPU_SRC_DIR@
+STARPU_USE_CPU = @STARPU_USE_CPU@
+STARPU_USE_CUDA = @STARPU_USE_CUDA@
+STARPU_USE_FXT = @STARPU_USE_FXT@
+STARPU_USE_GORDON = @STARPU_USE_GORDON@
+STARPU_USE_OPENCL = @STARPU_USE_OPENCL@
+STATS = @STATS@
+STRIP = @STRIP@
+USE_MPI = @USE_MPI@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+mpicc_path = @mpicc_path@
+mpiexec_path = @mpiexec_path@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_LDFLAGS = $(top_builddir)/src/libstarpu.la 
+AM_CPPFLAGS = \
+  -I$(top_srcdir)/include				\
+  -I$(top_srcdir)/examples				\
+  -I$(top_builddir)/include				\
+  -I$(top_srcdir)/sched_ctx_hypervisor/include		\
+  $(STARPU_OPENCL_CPPFLAGS) $(STARPU_CUDA_CPPFLAGS)
+
+@NO_BLAS_LIB_FALSE@cholesky_2ctxs_cholesky_2ctxs_SOURCES = \
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs/cholesky_2ctxs.c			\
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs/cholesky/cholesky_implicit.c		\
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs/cholesky/cholesky_models.c		\
+@NO_BLAS_LIB_FALSE@	cholesky_2ctxs/cholesky/cholesky_kernels.c		\
+@NO_BLAS_LIB_FALSE@	$(top_srcdir)/examples/common/blas.c
+
+@NO_BLAS_LIB_FALSE@cholesky_2ctxs_cholesky_2ctxs_LDADD = \
+@NO_BLAS_LIB_FALSE@	$(top_srcdir)/sched_ctx_hypervisor/src/libsched_ctx_hypervisor.la
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sched_ctx_hypervisor/examples/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign sched_ctx_hypervisor/examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+cholesky_2ctxs/$(am__dirstamp):
+	@$(MKDIR_P) cholesky_2ctxs
+	@: > cholesky_2ctxs/$(am__dirstamp)
+cholesky_2ctxs/cholesky_2ctxs$(EXEEXT): $(cholesky_2ctxs_cholesky_2ctxs_OBJECTS) $(cholesky_2ctxs_cholesky_2ctxs_DEPENDENCIES) cholesky_2ctxs/$(am__dirstamp)
+	@rm -f cholesky_2ctxs/cholesky_2ctxs$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(cholesky_2ctxs_cholesky_2ctxs_OBJECTS) $(cholesky_2ctxs_cholesky_2ctxs_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blas.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky_2ctxs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky_implicit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky_kernels.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky_models.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+cholesky_2ctxs.o: cholesky_2ctxs/cholesky_2ctxs.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_2ctxs.o -MD -MP -MF $(DEPDIR)/cholesky_2ctxs.Tpo -c -o cholesky_2ctxs.o `test -f 'cholesky_2ctxs/cholesky_2ctxs.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky_2ctxs.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_2ctxs.Tpo $(DEPDIR)/cholesky_2ctxs.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky_2ctxs.c' object='cholesky_2ctxs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_2ctxs.o `test -f 'cholesky_2ctxs/cholesky_2ctxs.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky_2ctxs.c
+
+cholesky_2ctxs.obj: cholesky_2ctxs/cholesky_2ctxs.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_2ctxs.obj -MD -MP -MF $(DEPDIR)/cholesky_2ctxs.Tpo -c -o cholesky_2ctxs.obj `if test -f 'cholesky_2ctxs/cholesky_2ctxs.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky_2ctxs.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky_2ctxs.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_2ctxs.Tpo $(DEPDIR)/cholesky_2ctxs.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky_2ctxs.c' object='cholesky_2ctxs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_2ctxs.obj `if test -f 'cholesky_2ctxs/cholesky_2ctxs.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky_2ctxs.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky_2ctxs.c'; fi`
+
+cholesky_implicit.o: cholesky_2ctxs/cholesky/cholesky_implicit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_implicit.o -MD -MP -MF $(DEPDIR)/cholesky_implicit.Tpo -c -o cholesky_implicit.o `test -f 'cholesky_2ctxs/cholesky/cholesky_implicit.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_implicit.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_implicit.Tpo $(DEPDIR)/cholesky_implicit.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_implicit.c' object='cholesky_implicit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_implicit.o `test -f 'cholesky_2ctxs/cholesky/cholesky_implicit.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_implicit.c
+
+cholesky_implicit.obj: cholesky_2ctxs/cholesky/cholesky_implicit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_implicit.obj -MD -MP -MF $(DEPDIR)/cholesky_implicit.Tpo -c -o cholesky_implicit.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_implicit.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_implicit.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_implicit.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_implicit.Tpo $(DEPDIR)/cholesky_implicit.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_implicit.c' object='cholesky_implicit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_implicit.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_implicit.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_implicit.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_implicit.c'; fi`
+
+cholesky_models.o: cholesky_2ctxs/cholesky/cholesky_models.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_models.o -MD -MP -MF $(DEPDIR)/cholesky_models.Tpo -c -o cholesky_models.o `test -f 'cholesky_2ctxs/cholesky/cholesky_models.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_models.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_models.Tpo $(DEPDIR)/cholesky_models.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_models.c' object='cholesky_models.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_models.o `test -f 'cholesky_2ctxs/cholesky/cholesky_models.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_models.c
+
+cholesky_models.obj: cholesky_2ctxs/cholesky/cholesky_models.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_models.obj -MD -MP -MF $(DEPDIR)/cholesky_models.Tpo -c -o cholesky_models.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_models.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_models.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_models.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_models.Tpo $(DEPDIR)/cholesky_models.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_models.c' object='cholesky_models.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_models.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_models.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_models.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_models.c'; fi`
+
+cholesky_kernels.o: cholesky_2ctxs/cholesky/cholesky_kernels.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_kernels.o -MD -MP -MF $(DEPDIR)/cholesky_kernels.Tpo -c -o cholesky_kernels.o `test -f 'cholesky_2ctxs/cholesky/cholesky_kernels.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_kernels.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_kernels.Tpo $(DEPDIR)/cholesky_kernels.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_kernels.c' object='cholesky_kernels.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_kernels.o `test -f 'cholesky_2ctxs/cholesky/cholesky_kernels.c' || echo '$(srcdir)/'`cholesky_2ctxs/cholesky/cholesky_kernels.c
+
+cholesky_kernels.obj: cholesky_2ctxs/cholesky/cholesky_kernels.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cholesky_kernels.obj -MD -MP -MF $(DEPDIR)/cholesky_kernels.Tpo -c -o cholesky_kernels.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_kernels.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_kernels.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_kernels.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cholesky_kernels.Tpo $(DEPDIR)/cholesky_kernels.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='cholesky_2ctxs/cholesky/cholesky_kernels.c' object='cholesky_kernels.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cholesky_kernels.obj `if test -f 'cholesky_2ctxs/cholesky/cholesky_kernels.c'; then $(CYGPATH_W) 'cholesky_2ctxs/cholesky/cholesky_kernels.c'; else $(CYGPATH_W) '$(srcdir)/cholesky_2ctxs/cholesky/cholesky_kernels.c'; fi`
+
+blas.o: $(top_srcdir)/examples/common/blas.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT blas.o -MD -MP -MF $(DEPDIR)/blas.Tpo -c -o blas.o `test -f '$(top_srcdir)/examples/common/blas.c' || echo '$(srcdir)/'`$(top_srcdir)/examples/common/blas.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/blas.Tpo $(DEPDIR)/blas.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/examples/common/blas.c' object='blas.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o blas.o `test -f '$(top_srcdir)/examples/common/blas.c' || echo '$(srcdir)/'`$(top_srcdir)/examples/common/blas.c
+
+blas.obj: $(top_srcdir)/examples/common/blas.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT blas.obj -MD -MP -MF $(DEPDIR)/blas.Tpo -c -o blas.obj `if test -f '$(top_srcdir)/examples/common/blas.c'; then $(CYGPATH_W) '$(top_srcdir)/examples/common/blas.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/examples/common/blas.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/blas.Tpo $(DEPDIR)/blas.Po
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/examples/common/blas.c' object='blas.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o blas.obj `if test -f '$(top_srcdir)/examples/common/blas.c'; then $(CYGPATH_W) '$(top_srcdir)/examples/common/blas.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/examples/common/blas.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf cholesky_2ctxs/.libs cholesky_2ctxs/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f cholesky_2ctxs/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+@NO_BLAS_LIB_FALSE@	$(STARPU_BLAS_LDFLAGS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 0 - 0
sched_ctx_hypervisor/examples/cholesky_2ctxs/.dirstamp


+ 9 - 13
examples/cholesky_no_ctxs/cholesky/cholesky.h

@@ -2,7 +2,6 @@
  *
  * Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
  * Copyright (C) 2010  Centre National de la Recherche Scientifique
- * Copyright (C) 2011  INRIA
  *
  * 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
@@ -55,8 +54,8 @@
 #define BLAS3_FLOP(n1,n2,n3)    \
         (2*((uint64_t)n1)*((uint64_t)n2)*((uint64_t)n3))
 
-/* static unsigned size = 4*1024; */
-/* static unsigned nblocks = 16; */
+//static unsigned size = 4*1024;
+//static unsigned nblocks = 16;
 static unsigned nbigblocks = 8;
 static unsigned pinned = 0;
 static unsigned noprio = 0;
@@ -72,27 +71,24 @@ void chol_cublas_codelet_update_u21(void *descr[], void *_args);
 void chol_cublas_codelet_update_u22(void *descr[], void *_args);
 #endif
 
-int run_cholesky_grain_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
-double run_cholesky_implicit(int start, int argc, char **argv, double *timing, pthread_barrier_t *barrier);
-int run_cholesky_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
-double run_cholesky_tile_tag(struct starpu_sched_ctx *sched_ctx, int argc, char **argv);
+double run_cholesky_implicit(unsigned sched_ctx, int start, int argc, char **argv, double *timing, pthread_barrier_t *barrier);
 
 extern struct starpu_perfmodel_t chol_model_11;
 extern struct starpu_perfmodel_t chol_model_21;
 extern struct starpu_perfmodel_t chol_model_22;
 
-static void __attribute__((unused)) parse_args(int argc, char **argv, int *size, int *nblocks)
+static void __attribute__((unused)) parse_args(int argc, char **argv, unsigned *size, unsigned *nblocks)
 {
 	int i;
 	for (i = 1; i < argc; i++) {
 		if (strcmp(argv[i], "-size") == 0) {
 		        char *argptr;
-			size = strtol(argv[++i], &argptr, 10);
+			(*size) = strtol(argv[++i], &argptr, 10);
 		}
 
 		if (strcmp(argv[i], "-nblocks") == 0) {
 		        char *argptr;
-			nblocks = strtol(argv[++i], &argptr, 10);
+			(*nblocks) = strtol(argv[++i], &argptr, 10);
 		}
 
 		if (strcmp(argv[i], "-nbigblocks") == 0) {
@@ -118,18 +114,18 @@ static void __attribute__((unused)) parse_args(int argc, char **argv, int *size,
 	}
 }
 
-static void __attribute__((unused)) parse_args_2kernels(int start, int argc, char **argv, int *size, int *nblocks)
+static void __attribute__((unused)) parse_args_ctx(int start, int argc, char **argv, unsigned *size, unsigned *nblocks)
 {
 	int i;
 	for (i = start; i < argc; i++) {
 		if (strcmp(argv[i], "-size") == 0) {
 		        char *argptr;
-			*size = strtol(argv[++i], &argptr, 10);
+			(*size) = strtol(argv[++i], &argptr, 10);
 		}
 
 		if (strcmp(argv[i], "-nblocks") == 0) {
 		        char *argptr;
-			*nblocks = strtol(argv[++i], &argptr, 10);
+			(*nblocks) = strtol(argv[++i], &argptr, 10);
 		}
 
 		if (strcmp(argv[i], "-nbigblocks") == 0) {

examples/cholesky_no_ctxs/cholesky/cholesky_grain_tag.c → sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_grain_tag.c


+ 27 - 29
examples/cholesky_no_ctxs/cholesky/cholesky_implicit.c

@@ -3,7 +3,6 @@
  * Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
- * Copyright (C) 2011  INRIA
  *
  * 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,7 +17,6 @@
  */
 
 #include "cholesky.h"
-
 /*
  *	Create the codelets
  */
@@ -70,7 +68,7 @@ static void callback_turn_spmd_on(void *arg __attribute__ ((unused)))
 	cl22.type = STARPU_SPMD;
 }
 
-static double _cholesky(starpu_data_handle dataA, unsigned nblocks, double *timing)
+static double _cholesky(starpu_data_handle dataA, unsigned nblocks, unsigned sched_ctx, double *timing)
 {
 	struct timeval start;
 	struct timeval end;
@@ -79,6 +77,7 @@ static double _cholesky(starpu_data_handle dataA, unsigned nblocks, double *timi
 
 	int prio_level = noprio?STARPU_DEFAULT_PRIO:STARPU_MAX_PRIO;
 
+
 	gettimeofday(&start, NULL);
 
 	/* create all the DAG nodes */
@@ -95,7 +94,6 @@ static double _cholesky(starpu_data_handle dataA, unsigned nblocks, double *timi
 		for (j = k+1; j<nblocks; j++)
 		{
                         starpu_data_handle sdatakj = starpu_data_get_sub_data(dataA, 2, k, j);
-
 			starpu_insert_task(&cl21,
 					   STARPU_PRIORITY, (j == k+1)?prio_level:STARPU_DEFAULT_PRIO,
 					   STARPU_R, sdatakk,
@@ -108,6 +106,7 @@ static double _cholesky(starpu_data_handle dataA, unsigned nblocks, double *timi
                                 {
 					starpu_data_handle sdataki = starpu_data_get_sub_data(dataA, 2, k, i);
 					starpu_data_handle sdataij = starpu_data_get_sub_data(dataA, 2, i, j);
+					
 					starpu_insert_task(&cl22,
 							   STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 							   STARPU_R, sdataki,
@@ -132,14 +131,12 @@ static double _cholesky(starpu_data_handle dataA, unsigned nblocks, double *timi
 	double flop = (1.0f*n*n*n)/3.0f;
 
 	double gflops = (flop/(*timing)/1000.0f);
-	
-	(*timing) /= 1000000.0f; //(sec)
-	//printf("%2.2f\n", *timing);
-	//	(*timing) /= 60.0f; //(min)
+	(*timing) /= 1000000.0f; //sec
+	//	(*timing) /= 60.0f; //min
 	return gflops;
 }
 
-static double cholesky(float *matA, unsigned size, unsigned ld, unsigned nblocks, double *timing)
+static double cholesky(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned sched_ctx, double *timing)
 {
 	starpu_data_handle dataA;
 
@@ -147,40 +144,40 @@ static double cholesky(float *matA, unsigned size, unsigned ld, unsigned nblocks
 	 * one block is now determined by 2 unsigned (i,j) */
 	starpu_matrix_data_register(&dataA, 0, (uintptr_t)matA, ld, size, size, sizeof(float));
 
-	struct starpu_data_filter f;
-		f.filter_func = starpu_vertical_block_filter_func;
-		f.nchildren = nblocks;
-		f.get_nchildren = NULL;
-		f.get_child_ops = NULL;
+	struct starpu_data_filter f = {
+		.filter_func = starpu_vertical_block_filter_func,
+		.nchildren = nblocks
+	};
 
-	struct starpu_data_filter f2;
-		f2.filter_func = starpu_block_filter_func;
-		f2.nchildren = nblocks;
-		f2.get_nchildren = NULL;
-		f2.get_child_ops = NULL;
+	struct starpu_data_filter f2 = {
+		.filter_func = starpu_block_filter_func,
+		.nchildren = nblocks
+	};
 
 	starpu_data_map_filters(dataA, 2, &f, &f2);
-
-	return _cholesky(dataA, nblocks, timing);
+	double gflops = _cholesky(dataA, nblocks, sched_ctx, timing);
+	starpu_data_unregister(dataA);
+	return gflops;
 }
 
-double run_cholesky_implicit(int start, int argc, char **argv, double *timing, pthread_barrier_t *barrier)
+double run_cholesky_implicit(unsigned sched_ctx, int start, int argc, char **argv, double *timing, pthread_barrier_t *barrier)
 {
 	/* create a simple definite positive symetric matrix example
 	 *
 	 *	Hilbert matrix : h(i,j) = 1/(i+j+1)
 	 * */
 
-	int size;
-	int nblocks;
-	parse_args_2kernels(start, argc, argv, &size, &nblocks);
+	unsigned size = 4 * 1024;
+	unsigned nblocks = 16;
+	parse_args_ctx(start, argc, argv, &size, &nblocks);
 
 	//	starpu_init(NULL);
 
 	//	starpu_helper_cublas_init();
 
 	float *mat;
-	starpu_data_malloc_pinned_if_possible((void **)&mat, (size_t)size*size*sizeof(float));
+
+	starpu_malloc((void **)&mat, (size_t)size*size*sizeof(float));
 
 	unsigned i,j;
 	for (i = 0; i < size; i++)
@@ -210,8 +207,9 @@ double run_cholesky_implicit(int start, int argc, char **argv, double *timing, p
 		printf("\n");
 	}
 #endif
-	//	pthread_barrier_wait(barrier);
-	double gflops = cholesky(mat, size, size, nblocks, timing);
+	//	if(barrier != NULL)
+	//	  pthread_barrier_wait(barrier);
+	double gflops = cholesky(mat, size, size, nblocks, sched_ctx, timing);
 
 #ifdef PRINT_OUTPUT
 	printf("Results :\n");
@@ -281,7 +279,7 @@ double run_cholesky_implicit(int start, int argc, char **argv, double *timing, p
 			}
 	        }
 	}
-
+	starpu_free((void *)mat);
 	//	starpu_helper_cublas_shutdown();
 	//	starpu_shutdown();
 

examples/cholesky_no_ctxs/cholesky/cholesky_implicit_all_machine.c → sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_implicit_all_machine.c


+ 2 - 2
examples/cholesky_no_ctxs/cholesky/cholesky_kernels.c

@@ -15,9 +15,9 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include <starpu_config.h>
+//#include <starpu_config.h>
 #include "cholesky.h"
-#include "../../common/blas.h"
+//#include "../../common/blas.h"
 #ifdef STARPU_USE_CUDA
 #include <starpu_cuda.h>
 #endif

examples/cholesky_no_ctxs/cholesky/cholesky_models.c → sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_models.c


examples/cholesky_no_ctxs/cholesky/cholesky_tag.c → sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_tag.c


examples/cholesky_no_ctxs/cholesky/cholesky_tile_tag.c → sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky/cholesky_tile_tag.c


文件差异内容过多而无法显示
+ 225 - 0
sched_ctx_hypervisor/examples/cholesky_2ctxs/cholesky_2ctxs


二进制
sched_ctx_hypervisor/examples/cholesky_2ctxs/core


+ 24 - 0
sched_ctx_hypervisor/include/sched_ctx_hypervisor.h

@@ -0,0 +1,24 @@
+#include <starpu.h>
+
+struct starpu_sched_ctx_hypervisor_criteria* sched_ctx_hypervisor_init(void);
+
+void sched_ctx_hypervisor_shutdown(void);
+
+void sched_ctx_hypervisor_handle_ctx(unsigned sched_ctx);
+
+void sched_ctx_hypervisor_ignore_ctx(unsigned sched_ctx);
+
+void sched_ctx_hypervisor_set_resize_interval(unsigned sched_ctx, unsigned min_nprocs, unsigned max_nprocs);
+
+void sched_ctx_hypervisor_set_resize_granularity(unsigned sched_ctx, unsigned granluarity);
+
+void sched_ctx_hypervisor_set_idle_max_value(unsigned sched_ctx, int max_idle_value, int *workers, int nworkers);
+
+void sched_ctx_hypervisor_set_work_min_value(unsigned sched_ctx, int min_working_value, int *workers, int nworkers); 
+
+void sched_ctx_hypervisor_increase_priority(unsigned sched_ctx, int priority_step, int *workers, int nworkers);
+
+void sched_ctx_hypervisor_update_current_idle_time(unsigned sched_ctx, int worker, double idle_time, unsigned current_nprocs);
+
+void sched_ctx_hypervisor_update_current_working_time(unsigned sched_ctx, int worker, double working_time, unsigned current_nprocs);
+

+ 220 - 137
src/core/sched_ctx.c

@@ -20,55 +20,54 @@
 
 pthread_key_t sched_ctx_key;
 
-static unsigned _starpu_get_first_free_sched_ctx(struct starpu_machine_config_s *config);
-static unsigned _starpu_worker_get_first_free_sched_ctx(struct starpu_worker_s *worker);
-static void _starpu_rearange_sched_ctx_workerids(struct starpu_sched_ctx *sched_ctx, int old_nworkers_ctx);
-
 struct sched_ctx_info {
 	unsigned sched_ctx_id;
 	struct starpu_sched_ctx *sched_ctx;
 	struct starpu_worker_s *worker;
 };
 
+static unsigned _starpu_get_first_free_sched_ctx(struct starpu_machine_config_s *config);
+static unsigned _starpu_worker_get_first_free_sched_ctx(struct starpu_worker_s *worker);
+static void _starpu_rearange_sched_ctx_workerids(struct starpu_sched_ctx *sched_ctx, int old_nworkers_ctx);
+static void _starpu_init_sched_ctx(struct starpu_sched_ctx *sched_ctx);
+static unsigned _starpu_worker_get_sched_ctx_id(struct starpu_worker_s *worker, unsigned sched_ctx_id);
+
 static void update_workers_func(void *buffers[] __attribute__ ((unused)), void *_args)
 {
 	struct sched_ctx_info *sched_ctx_info_args = (struct sched_ctx_info*)_args;
 	struct starpu_worker_s *worker = sched_ctx_info_args->worker;
 	struct starpu_sched_ctx *current_sched_ctx = sched_ctx_info_args->sched_ctx;
 	unsigned sched_ctx_id = sched_ctx_info_args->sched_ctx_id;
-
+	
 	if(current_sched_ctx != NULL)
 	  {
 		/* add context to worker */
-		worker->sched_ctx[sched_ctx_info_args->sched_ctx_id] = current_sched_ctx;
+		worker->sched_ctx[sched_ctx_id] = current_sched_ctx;
 		worker->nsched_ctxs++;
+		current_sched_ctx->workerids_to_add[worker->workerid] = NO_RESIZE;
 	  }
 	else
 	  {
 		/* remove context from worker */
-		int i;
-		for(i = 0; i < STARPU_NMAX_SCHED_CTXS; i++)
-			if(worker->sched_ctx[i] != NULL && worker->sched_ctx[i]->id == sched_ctx_id)
-			  {
-				worker->sched_ctx[i] = NULL;
-				worker->nsched_ctxs--;
-			  }
+		  worker->sched_ctx[sched_ctx_id]->workerids_to_remove[worker->workerid] = NO_RESIZE;
+		  worker->sched_ctx[sched_ctx_id] = NULL;
+		  worker->nsched_ctxs--;
 	  }
 }
 
+struct starpu_codelet_t sched_ctx_info_cl = {
+	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
+	.cuda_func = update_workers_func,
+	.cpu_func = update_workers_func,
+		.opencl_func = update_workers_func,
+	.nbuffers = 0
+};
+
 static void _starpu_update_workers(int *workerids, int nworkers, 
 				   int sched_ctx_id, struct starpu_sched_ctx *sched_ctx)
 {
 	struct starpu_task *tasks[nworkers];
 
-	struct starpu_codelet_t sched_ctx_info_cl = {
-		.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-		.cuda_func = update_workers_func,
-		.cpu_func = update_workers_func,
-		.opencl_func = update_workers_func,
-		.nbuffers = 0
-	};
-
 	int i, ret;
 	struct starpu_worker_s *worker[nworkers];
 	struct sched_ctx_info sched_info_args[nworkers];
@@ -78,7 +77,7 @@ static void _starpu_update_workers(int *workerids, int nworkers,
 		
 		sched_info_args[i].sched_ctx_id = sched_ctx_id == -1  ? 
 			_starpu_worker_get_first_free_sched_ctx(worker[i]) : 
-			(unsigned)sched_ctx_id;
+			_starpu_worker_get_sched_ctx_id(worker[i], sched_ctx_id);
 
 		sched_info_args[i].sched_ctx = sched_ctx;
 		sched_info_args[i].worker = worker[i];
@@ -95,25 +94,25 @@ static void _starpu_update_workers(int *workerids, int nworkers,
 
 		ret = _starpu_task_submit_internal(tasks[i]);
 		if (ret == -ENODEV)
-		  {
-		    /* if the worker is not able to execute this tasks, we
-		     * don't insist as this means the worker is not
-		     * designated by the "where" bitmap */
-		    starpu_task_destroy(tasks[i]);
-		    tasks[i] = NULL;
-		  }
+		{
+			/* if the worker is not able to execute this tasks, we
+			 * don't insist as this means the worker is not
+			 * designated by the "where" bitmap */
+			starpu_task_destroy(tasks[i]);
+			tasks[i] = NULL;
+		}
 	  }
-
+	
 	for (i = 0; i < nworkers; i++)
-	  {
-	    if (tasks[i])
-	      {
-		ret = starpu_task_wait(tasks[i]);
-		STARPU_ASSERT(!ret);
-		starpu_task_destroy(tasks[i]);
+	{
+		if (tasks[i])
+		{
+			ret = starpu_task_wait(tasks[i]);
+			STARPU_ASSERT(!ret);
+			starpu_task_destroy(tasks[i]);
 	      }
-	  }
-
+	}
+	
 }
 struct starpu_sched_ctx*  _starpu_create_sched_ctx(const char *policy_name, int *workerids, 
 				  int nworkers_ctx, unsigned is_initial_sched,
@@ -125,13 +124,13 @@ struct starpu_sched_ctx*  _starpu_create_sched_ctx(const char *policy_name, int
 	unsigned id = _starpu_get_first_free_sched_ctx(config);
 
 	struct starpu_sched_ctx *sched_ctx = &config->sched_ctxs[id];
+	_starpu_init_sched_ctx(sched_ctx);
 	sched_ctx->id = id;
 	int nworkers = config->topology.nworkers;
 	
 	STARPU_ASSERT(nworkers_ctx <= nworkers);
   
 	sched_ctx->nworkers = nworkers_ctx;
-	sched_ctx->temp_nworkers = -1;
 	PTHREAD_MUTEX_INIT(&sched_ctx->changing_ctx_mutex, NULL);
 
 	sched_ctx->sched_policy = malloc(sizeof(struct starpu_sched_policy_s));
@@ -186,15 +185,27 @@ struct starpu_sched_ctx*  _starpu_create_sched_ctx(const char *policy_name, int
 	return sched_ctx;
 }
 
-
 unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids, 
 			    int nworkers_ctx, const char *sched_name)
 {
 	struct starpu_sched_ctx *sched_ctx = _starpu_create_sched_ctx(policy_name, workerids, nworkers_ctx, 0, sched_name);
+
 	_starpu_update_workers(sched_ctx->workerids, sched_ctx->nworkers, -1, sched_ctx);
 	return sched_ctx->id;
 }
 
+#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+unsigned starpu_create_sched_ctx_with_criteria(const char *policy_name, int *workerids, 
+				 int nworkers_ctx, const char *sched_name,
+				 struct starpu_sched_ctx_hypervisor_criteria *criteria)
+{
+	unsigned sched_ctx_id = starpu_create_sched_ctx(policy_name, workerids, nworkers_ctx, sched_name);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
+	sched_ctx->criteria = criteria;
+	return sched_ctx_id;
+}
+#endif
+
 /* check if the worker already belongs to the context */
 static unsigned _starpu_worker_belongs_to_ctx(int workerid, struct starpu_sched_ctx *sched_ctx)
 {
@@ -208,13 +219,13 @@ static unsigned _starpu_worker_belongs_to_ctx(int workerid, struct starpu_sched_
 /* free all structures for the context */
 static void free_sched_ctx_mem(struct starpu_sched_ctx *sched_ctx)
 {
-	free(sched_ctx->sched_policy);
-	free(sched_ctx->sched_mutex);
-	free(sched_ctx->sched_cond);
 	/* just for debug in order to seg fault if we use these structures after del */
 	sched_ctx->sched_policy = NULL;
 	sched_ctx->sched_mutex = NULL;
 	sched_ctx->sched_cond = NULL;
+	free(sched_ctx->sched_policy);
+	free(sched_ctx->sched_mutex);
+	free(sched_ctx->sched_cond);
 	struct starpu_machine_config_s *config = _starpu_get_machine_config();
 	config->topology.nsched_ctxs--;
 	sched_ctx->id = STARPU_NMAX_SCHED_CTXS;
@@ -231,69 +242,85 @@ static void _starpu_add_workers_to_sched_ctx(int *new_workers, int nnew_workers,
 {
         struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
         int nworkers = config->topology.nworkers;
-        int nworkers_ctx =  sched_ctx->nworkers;
 	
-	int n_added_workers = 0;
-	int added_workers[nworkers];
-
         /*if null add the rest of the workers which don't already belong to this ctx*/
         if(new_workers == NULL)
-          {        
+	{        
 		int j;
                 for(j = 0; j < nworkers; j++)
-                        if(!_starpu_worker_belongs_to_ctx(j, sched_ctx))
-			  {
-                                sched_ctx->workerids[++nworkers_ctx] = j;
-				added_workers[n_added_workers] = j;
-			  }
-                          
-		n_added_workers = nworkers;
-          }
+                        if(!_starpu_worker_belongs_to_ctx(j, sched_ctx) &&
+			   sched_ctx->workerids_to_add[j] == NO_RESIZE)
+                                sched_ctx->workerids_to_add[j] = REQ_RESIZE;
+	}
         else
-          {
+	{
                 int i;
                 for(i = 0; i < nnew_workers; i++)
-                  {
+		{
                         /* take care the user does not ask for a resource that does not exist */
-                        STARPU_ASSERT( new_workers[i] >= 0 &&  new_workers[i] <= nworkers);
-
-			if(!_starpu_worker_belongs_to_ctx(new_workers[i], sched_ctx))
-			  {
-			    /* add worker to context */
-			    sched_ctx->workerids[ nworkers_ctx + n_added_workers] = new_workers[i];
-			    added_workers[n_added_workers] = new_workers[i];
-			    n_added_workers++;
-			  }
-                  }
-          }
-
-        sched_ctx->sched_policy->init_sched_for_workers(sched_ctx->id, n_added_workers);
+                        STARPU_ASSERT(new_workers[i] >= 0 &&  new_workers[i] <= nworkers);
 
-	_starpu_update_workers(added_workers, n_added_workers, -1, sched_ctx);
+			if(!_starpu_worker_belongs_to_ctx(new_workers[i], sched_ctx) &&
+			   sched_ctx->workerids_to_add[new_workers[i]] == NO_RESIZE)
+				sched_ctx->workerids_to_add[new_workers[i]] = REQ_RESIZE;
+		}
+	}
 
         return;
 }
 
-void starpu_delete_sched_ctx(unsigned sched_ctx_id, unsigned inheritor_sched_ctx_id)
+void _starpu_actually_add_workers_to_sched_ctx(struct starpu_sched_ctx *sched_ctx)
 {
-	if(!starpu_wait_for_all_tasks_of_sched_ctx(sched_ctx_id))
-	  {
+        struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
+        int nworkers = config->topology.nworkers;
+	int nworkers_ctx = sched_ctx->nworkers;
 
-		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
-		struct starpu_sched_ctx *inheritor_sched_ctx = _starpu_get_sched_ctx_structure(inheritor_sched_ctx_id);
+	int n_added_workers = 0;
+	int added_workers[nworkers];
 
-		_starpu_manage_delete_sched_ctx(sched_ctx);
+	unsigned modified = 0;
+	int workerid;
+	for(workerid = 0; workerid < nworkers; workerid++)
+		if(sched_ctx->workerids_to_add[workerid] == REQ_RESIZE)
+			if(!_starpu_worker_belongs_to_ctx(workerid, sched_ctx))
+			{
+				added_workers[n_added_workers++] = workerid;
+				sched_ctx->workerids[nworkers_ctx++] = workerid;
+				sched_ctx->workerids_to_add[workerid] = DO_RESIZE;
+				modified = 1;
+			}
+	
+	if(modified)
+	{
+		
+		sched_ctx->sched_policy->init_sched_for_workers(sched_ctx->id, added_workers, n_added_workers);
+		sched_ctx->nworkers += n_added_workers;
+		
+		_starpu_update_workers(added_workers, n_added_workers, -1, sched_ctx);
+	}
+        return;
+}
 
-		/*if both of them have all the ressources is pointless*/
-		/*trying to transfer ressources from one ctx to the other*/
-		struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
-		int nworkers = config->topology.nworkers;
+void starpu_delete_sched_ctx(unsigned sched_ctx_id, unsigned inheritor_sched_ctx_id)
+{
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
+	struct starpu_sched_ctx *inheritor_sched_ctx = _starpu_get_sched_ctx_struct(inheritor_sched_ctx_id);
+	
+	_starpu_manage_delete_sched_ctx(sched_ctx);
 
-		if(!(sched_ctx->nworkers == nworkers && sched_ctx->nworkers == inheritor_sched_ctx->nworkers))
-		  _starpu_add_workers_to_sched_ctx(sched_ctx->workerids, sched_ctx->nworkers, inheritor_sched_ctx);
+	/*if both of them have all the ressources is pointless*/
+	/*trying to transfer ressources from one ctx to the other*/
+	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
+	int nworkers = config->topology.nworkers;
+	
+	if(!(sched_ctx->nworkers == nworkers && sched_ctx->nworkers == inheritor_sched_ctx->nworkers))
+		_starpu_add_workers_to_sched_ctx(sched_ctx->workerids, sched_ctx->nworkers, inheritor_sched_ctx);
+	
+	if(!starpu_wait_for_all_tasks_of_sched_ctx(sched_ctx_id))
+	{
 		free_sched_ctx_mem(sched_ctx);
-
-	  }		
+		
+	}	
 	return;	
 }
 
@@ -303,7 +330,7 @@ void _starpu_delete_all_sched_ctxs()
 	unsigned i;
 	for(i = 0; i < STARPU_NMAX_SCHED_CTXS; i++)
 	  {
-		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(i);
+		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(i);
 		_starpu_barrier_counter_destroy(&sched_ctx->tasks_barrier);
 		if(sched_ctx->id != STARPU_NMAX_SCHED_CTXS)
 			free_sched_ctx_mem(sched_ctx);
@@ -311,18 +338,19 @@ void _starpu_delete_all_sched_ctxs()
 	return;
 }
 
-void starpu_add_workers_to_sched_ctx(int *workerids, int nworkers,
+void starpu_add_workers_to_sched_ctx(int *workers_to_add, int nworkers_to_add,
 				     unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
-	_starpu_add_workers_to_sched_ctx(workerids, nworkers, sched_ctx);
-
+	printf("add workers\n");
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
+	_starpu_add_workers_to_sched_ctx(workers_to_add, nworkers_to_add, sched_ctx);
 	return;
 }
 
-static void _starpu_remove_workers_from_sched_ctx(int *workerids, int nworkers_to_remove, struct starpu_sched_ctx *sched_ctx)
+static void _starpu_remove_workers_from_sched_ctx(int *workerids, int nworkers_to_remove, 
+						  struct starpu_sched_ctx *sched_ctx)
 {
-  	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
+	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
 	int nworkers = config->topology.nworkers;
 	int nworkers_ctx =  sched_ctx->nworkers;
 
@@ -330,59 +358,69 @@ static void _starpu_remove_workers_from_sched_ctx(int *workerids, int nworkers_t
 
 	int i, workerid;
 
-	int nremoved_workers = 0;
-	int removed_workers[nworkers];
-
 	/*if null remove all the workers that belong to this ctx*/
 	if(workerids == NULL)
-	  {
+	{
 		for(i = 0; i < nworkers_ctx; i++)
-		  {
-			removed_workers[i] = sched_ctx->workerids[i];
-			sched_ctx->workerids[i] = -1;
-		  }
-
-		sched_ctx->nworkers = 0;
-		nremoved_workers = nworkers_ctx;
-	  } 
+			if(sched_ctx->workerids_to_remove[i] == NO_RESIZE)
+				sched_ctx->workerids_to_remove[i] = REQ_RESIZE;
+	} 
 	else 
-	  {
-		for(i = 0; i < nworkers_to_remove; i++)
-		  {
-		    	workerid = workerids[i]; 
+	{
+		for(i = 0; i < nworkers_ctx; i++)
+		{
+			workerid = workerids[i]; 
 			/* take care the user does not ask for a resource that does not exist */
 			STARPU_ASSERT( workerid >= 0 &&  workerid <= nworkers);
-			removed_workers[i] = sched_ctx->workerids[i];
+			if(sched_ctx->workerids_to_add[workerid] == NO_RESIZE)
+				sched_ctx->workerids_to_remove[workerid] = REQ_RESIZE;
+		}
+	}
 
-			int j;
-			/* don't leave the workerid with a correct value even if we don't use it anymore */
-			for(j = 0; j < nworkers_ctx; j++)
-				if(sched_ctx->workerids[j] == workerid)				 
-					sched_ctx->workerids[j] = -1;
-		  }
+	return;
+}
+
+void _starpu_actually_remove_workers_from_sched_ctx(struct starpu_sched_ctx *sched_ctx)
+{
+	int nworkers_ctx =  sched_ctx->nworkers;
 
-		nremoved_workers = nworkers_to_remove;
-		sched_ctx->nworkers -= nworkers_to_remove;
+	int i, workerid, worker_ctx;
+
+	unsigned modified = 0;
+	int nremoved_workers = 0;
+	int removed_workers[nworkers_ctx];
+
+	for(i = 0; i < nworkers_ctx; i++)
+	{
+		workerid = sched_ctx->workerids[i];
+		if(sched_ctx->workerids_to_remove[workerid] == REQ_RESIZE)
+		{
+			removed_workers[nremoved_workers++] = workerid;
+			sched_ctx->workerids[i] = -1;
+			sched_ctx->workerids_to_remove[workerid] = DO_RESIZE;
+			modified = 1;
+		}
+	}
+		
+	if(modified)
+	{
+		sched_ctx->nworkers -= nremoved_workers;
+		
 		/* reorder the worker's list of contexts in order to avoid 
 		   the holes in the list after removing some elements */
 		_starpu_rearange_sched_ctx_workerids(sched_ctx, nworkers_ctx);
-	  }
-
-	_starpu_update_workers(removed_workers, nremoved_workers, sched_ctx->id, NULL);
-
+		
+		_starpu_update_workers(removed_workers, nremoved_workers, sched_ctx->id, NULL);
+	}
+	
 	return;
 }
 
-void starpu_remove_workers_from_sched_ctx(int *workerids, int nworkers_to_remove, 
+void starpu_remove_workers_from_sched_ctx(int *workers_to_remove, int nworkers_to_remove, 
 					  unsigned sched_ctx_id)
 {
-	/* wait for the workers concerned by the change of contex    
-	 * to finish their work in the previous context */
-	if(!starpu_wait_for_all_tasks_of_workers(workerids, nworkers_to_remove))
-	{
-		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
-		_starpu_remove_workers_from_sched_ctx(workerids, nworkers_to_remove, sched_ctx);
-	}
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
+	_starpu_remove_workers_from_sched_ctx(workers_to_remove, nworkers_to_remove, sched_ctx);
 	return;
 }
 
@@ -398,6 +436,27 @@ void _starpu_init_all_sched_ctxs(struct starpu_machine_config_s *config)
 	return;
 }
 
+static void _starpu_init_sched_ctx(struct starpu_sched_ctx *sched_ctx)
+{
+	unsigned i;
+	for(i = 0; i < STARPU_NMAXWORKERS; i++)
+	{
+		sched_ctx->workerids[i] = -1;
+		sched_ctx->workerids_to_remove[i] = NO_RESIZE;
+		sched_ctx->workerids_to_add[i] = NO_RESIZE;
+	}
+	sched_ctx->nworkers = 0;
+}
+
+
+static void _starpu_init_workerids(int *workerids, unsigned *nworkers)
+{
+	unsigned i;
+	for(i = 0; i < *nworkers; i++)
+		workerids[i] = -1;
+	*nworkers = 0;
+}
+
 /* unused sched_ctx pointers of a worker are NULL */
 void _starpu_init_sched_ctx_for_worker(unsigned workerid)
 {
@@ -434,6 +493,16 @@ static unsigned _starpu_worker_get_first_free_sched_ctx(struct starpu_worker_s *
 	return STARPU_NMAX_SCHED_CTXS;
 }
 
+static unsigned _starpu_worker_get_sched_ctx_id(struct starpu_worker_s *worker, unsigned sched_ctx_id)
+{
+	unsigned i;
+	for(i = 0; i < STARPU_NMAX_SCHED_CTXS; i++)
+		if(worker->sched_ctx[i] != NULL && worker->sched_ctx[i]->id == sched_ctx_id)
+			return i;
+	STARPU_ASSERT(0);
+	return STARPU_NMAX_SCHED_CTXS;
+}
+
 static int _starpu_get_first_free_worker(int *workerids, int nworkers)
 {
 	int i;
@@ -448,18 +517,22 @@ static int _starpu_get_first_free_worker(int *workerids, int nworkers)
    and have instead {5, 7, -1, -1, -1} 
    it is easier afterwards to iterate the array
 */
-static void _starpu_rearange_sched_ctx_workerids(struct starpu_sched_ctx *sched_ctx, int nworkers_ctx)
+static void _starpu_rearange_sched_ctx_workerids(struct starpu_sched_ctx *sched_ctx, int old_nworkers)
 {
 	int first_free_id = -1;
 	int i;
-	for(i = 0; i < nworkers_ctx; i++)
+	for(i = 0; i < old_nworkers; i++)
 	  {
 		if(sched_ctx->workerids[i] != -1)
 		  {
-			first_free_id = _starpu_get_first_free_worker(sched_ctx->workerids, nworkers_ctx);
+			first_free_id = _starpu_get_first_free_worker(sched_ctx->workerids,old_nworkers);
 			if(first_free_id != -1)
 			  {
 				sched_ctx->workerids[first_free_id] = sched_ctx->workerids[i];
+				sched_ctx->sched_mutex[first_free_id] = sched_ctx->sched_mutex[i];
+				sched_ctx->sched_cond[first_free_id] = sched_ctx->sched_cond[i];
+				sched_ctx->sched_mutex[i] = NULL;
+				sched_ctx->sched_cond[i] = NULL;
 				sched_ctx->workerids[i] = -1;
 			  }
 		  }
@@ -517,7 +590,7 @@ void _starpu_increment_nsubmitted_tasks_of_worker(int workerid)
 
 int starpu_wait_for_all_tasks_of_sched_ctx(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	
 	if (STARPU_UNLIKELY(!_starpu_worker_may_perform_blocking_calls()))
 	  return -EDEADLK;
@@ -527,19 +600,19 @@ int starpu_wait_for_all_tasks_of_sched_ctx(unsigned sched_ctx_id)
 
 void _starpu_decrement_nsubmitted_tasks_of_sched_ctx(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	_starpu_barrier_counter_decrement_until_empty_counter(&sched_ctx->tasks_barrier);
 }
 
 void _starpu_increment_nsubmitted_tasks_of_sched_ctx(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	_starpu_barrier_counter_increment(&sched_ctx->tasks_barrier);
 }
 
 int _starpu_get_index_in_ctx_of_workerid(unsigned sched_ctx_id, unsigned workerid)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	
 	int nworkers_ctx = sched_ctx->nworkers;
 
@@ -563,6 +636,13 @@ pthread_cond_t *_starpu_get_sched_cond(struct starpu_sched_ctx *sched_ctx, int w
 	return (workerid_ctx == -1 ? NULL : sched_ctx->sched_cond[workerid_ctx]);
 }
 
+int* starpu_get_workers_of_ctx(unsigned sched_ctx_id)
+{
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
+	return sched_ctx->workerids;
+}
+
+
 void starpu_set_sched_ctx(unsigned *sched_ctx)
 {
 	pthread_setspecific(sched_ctx_key, (void*)sched_ctx);
@@ -580,3 +660,6 @@ unsigned _starpu_get_nsched_ctxs()
 	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
 	return config->topology.nsched_ctxs;
 }
+
+
+

+ 21 - 3
src/core/sched_ctx.h

@@ -23,6 +23,10 @@
 #include <common/barrier_counter.h>
 #include <profiling/profiling.h>
 
+#define NO_RESIZE -1
+#define REQ_RESIZE 0
+#define DO_RESIZE 1
+
 struct starpu_sched_ctx {
 	/* id of the context used in user mode*/
 	unsigned id;
@@ -38,13 +42,16 @@ struct starpu_sched_ctx {
 	
 	/* list of indices of workers */
 	int workerids[STARPU_NMAXWORKERS]; 
+
+	/* list of workers, those checked have to be deleted */
+	int workerids_to_remove[STARPU_NMAXWORKERS]; 
+
+	/* list of workers, those checked have to be added */
+	int workerids_to_add[STARPU_NMAXWORKERS]; 
 	
 	/* number of threads in contex */
 	int nworkers; 
 
-	/* temporary variable for number of threads in contex */
-	int temp_nworkers; 
-  
 	/* mutext for temp_nworkers_in_ctx*/
 	pthread_mutex_t changing_ctx_mutex;
 
@@ -59,6 +66,10 @@ struct starpu_sched_ctx {
 
 	/* table of sched mutex corresponding to each worker in this ctx */
 	pthread_mutex_t **sched_mutex;
+#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+	/* a structure containing a series of criteria determining the resize procedure */
+	struct starpu_sched_ctx_hypervisor_criteria *criteria;
+#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 };
 
 struct starpu_machine_config_s;
@@ -95,4 +106,11 @@ pthread_cond_t *_starpu_get_sched_cond(struct starpu_sched_ctx *sched_ctx, int w
 
 /* Get the total number of sched_ctxs created till now */
 unsigned _starpu_get_nsched_ctxs();
+
+/* Treat add workers requests */
+void _starpu_actually_add_workers_to_sched_ctx(struct starpu_sched_ctx *sched_ctx);
+
+/* Treat remove workers requests */
+void _starpu_actually_remove_workers_from_sched_ctx(struct starpu_sched_ctx *sched_ctx);
+
 #endif // __SCHED_CONTEXT_H__

+ 28 - 13
src/core/sched_policy.c

@@ -308,18 +308,10 @@ int _starpu_push_task(starpu_job_t j, unsigned job_is_already_locked)
 		ret = _starpu_push_task_on_specific_worker(task, task->workerid);
 	}
 	else {
-		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(task->sched_ctx);
+		struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(task->sched_ctx);
 		STARPU_ASSERT(sched_ctx->sched_policy->push_task);
-		/* update the number of threads of the context before pushing a task to 
-		   the context in order to avoid doing it during the computation of the
-		   best worker */
-		PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-		if(sched_ctx->temp_nworkers != -1)
-		  {
-		    sched_ctx->nworkers = sched_ctx->temp_nworkers;
-		    sched_ctx->temp_nworkers = -1;
-		  }
-		PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
+		_starpu_actually_add_workers_to_sched_ctx(sched_ctx);
+		_starpu_actually_remove_workers_from_sched_ctx(sched_ctx);
 
 		ret = sched_ctx->sched_policy->push_task(task, sched_ctx->id);
 	}
@@ -358,7 +350,8 @@ struct starpu_task *_starpu_pop_task(struct starpu_worker_s *worker)
 		  {
 		    sched_ctx = worker->sched_ctx[i];
 		    
-		    if(sched_ctx != NULL)
+		    if(sched_ctx != NULL && 
+		       sched_ctx->workerids_to_add[worker->workerid] == NO_RESIZE)
 		      {
 			sched_ctx_mutex = _starpu_get_sched_mutex(sched_ctx, worker->workerid);
 			if(sched_ctx_mutex != NULL)
@@ -394,6 +387,28 @@ struct starpu_task *_starpu_pop_task(struct starpu_worker_s *worker)
 		}
 	}
 
+#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+	/* if task is NULL, the work is idle for this round
+	   therefore we let the sched_ctx_manager know in order 
+	   to decide a possible resize */
+	if(!task)
+	{
+		unsigned i;
+		struct starpu_sched_ctx *sched_ctx = NULL;
+		for(i = 0; i < STARPU_NMAX_SCHED_CTXS; i++)
+		{
+			sched_ctx = worker->sched_ctx[i];
+			if(sched_ctx != NULL && sched_ctx->id != 0)
+			{
+				if(sched_ctx != NULL && sched_ctx->criteria != NULL)
+				{
+					sched_ctx->criteria->update_current_idle_time(sched_ctx->id, worker->workerid, 1.0, sched_ctx->nworkers);
+				}
+			}
+		}
+	}
+#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+
 	return task;
 }
 
@@ -407,7 +422,7 @@ struct starpu_task *_starpu_pop_every_task(struct starpu_sched_ctx *sched_ctx)
 
 void _starpu_sched_post_exec_hook(struct starpu_task *task)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(task->sched_ctx);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(task->sched_ctx);
 	if (sched_ctx->sched_policy->post_exec_hook)
 		sched_ctx->sched_policy->post_exec_hook(task, sched_ctx->id);
 }

+ 2 - 2
src/core/workers.c

@@ -182,7 +182,7 @@ static void _starpu_launch_drivers(struct starpu_machine_config_s *config)
 		workerarg->worker_size = 1;
 		workerarg->combined_workerid = workerarg->workerid;
 		workerarg->current_rank = 0;
-
+		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 */
@@ -677,7 +677,7 @@ struct starpu_worker_s *_starpu_get_worker_struct(unsigned id)
 	return &config.workers[id];
 }
 
-struct starpu_sched_ctx *_starpu_get_sched_ctx_structure(unsigned id)
+struct starpu_sched_ctx *_starpu_get_sched_ctx_struct(unsigned id)
 {
 	STARPU_ASSERT(id <= STARPU_NMAX_SCHED_CTXS);
 	return &config.sched_ctxs[id];

+ 2 - 1
src/core/workers.h

@@ -85,6 +85,7 @@ struct starpu_worker_s {
 
 	struct _starpu_barrier_counter_t tasks_barrier; /* wait for the tasks submitted */
        
+	unsigned has_prev_init; /* had already been inited in another ctx */
 #ifdef __GLIBC__
 	cpu_set_t initial_cpu_set;
 	cpu_set_t current_cpu_set;
@@ -203,7 +204,7 @@ struct starpu_worker_s *_starpu_get_worker_struct(unsigned id);
 
 /* Returns the starpu_sched_ctx structure that descriebes the state of the 
  * specified ctx */
-struct starpu_sched_ctx *_starpu_get_sched_ctx_structure(unsigned id);
+struct starpu_sched_ctx *_starpu_get_sched_ctx_struct(unsigned id);
 
 
 struct starpu_combined_worker_s *_starpu_get_combined_worker_struct(unsigned id);

+ 9 - 13
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -119,7 +119,7 @@ static struct starpu_task *_starpu_fifo_pop_first_ready_task(struct starpu_fifo_
 
 static struct starpu_task *dmda_pop_ready_task(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	dmda_data *dt = (dmda_data*)sched_ctx->policy_data;
 
 	struct starpu_task *task;
@@ -155,7 +155,7 @@ static struct starpu_task *dmda_pop_ready_task(unsigned sched_ctx_id)
 
 static struct starpu_task *dmda_pop_task(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	dmda_data *dt = (dmda_data*)sched_ctx->policy_data;
 
 	struct starpu_task *task;
@@ -191,7 +191,7 @@ static struct starpu_task *dmda_pop_task(unsigned sched_ctx_id)
 
 static struct starpu_task *dmda_pop_every_task(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	dmda_data *dt = (dmda_data*)sched_ctx->policy_data;
 
 	struct starpu_task *new_list;
@@ -580,25 +580,25 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, struct starp
 
 static int dmda_push_sorted_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	return _dmda_push_task(task, 2, sched_ctx);
 }
 
 static int dm_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	return _dm_push_task(task, 0, sched_ctx);
 }
 
 static int dmda_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	return _dmda_push_task(task, 0, sched_ctx);
 }
 
 static void initialize_dmda_policy_for_workers(unsigned sched_ctx_id, unsigned nnew_workers) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	unsigned nworkers = sched_ctx->nworkers;
 	dmda_data *dt = (dmda_data*)sched_ctx->policy_data;
 
@@ -618,10 +618,6 @@ static void initialize_dmda_policy_for_workers(unsigned sched_ctx_id, unsigned n
 		PTHREAD_COND_INIT(sched_ctx->sched_cond[workerid_ctx], NULL);
 	}
 
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
 }
 
 static void initialize_dmda_policy(unsigned sched_ctx_id) 
@@ -632,7 +628,7 @@ static void initialize_dmda_policy(unsigned sched_ctx_id)
 	dt->_gamma = STARPU_DEFAULT_GAMMA;
 	dt->idle_power = 0.0;
 
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	unsigned nworkers = sched_ctx->nworkers;
 	sched_ctx->policy_data = (void*)dt;
 
@@ -673,7 +669,7 @@ static void initialize_dmda_sorted_policy(unsigned sched_ctx_id)
 
 static void deinitialize_dmda_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	dmda_data *dt = (dmda_data*)sched_ctx->policy_data;
 	int workerid_ctx;
         int nworkers = sched_ctx->nworkers;

+ 6 - 10
src/sched_policies/eager_central_policy.c

@@ -26,7 +26,7 @@
 
 static void initialize_eager_center_policy_for_workers(unsigned sched_ctx_id, unsigned nnew_workers) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	unsigned nworkers_ctx = sched_ctx->nworkers;
 	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
@@ -39,15 +39,11 @@ static void initialize_eager_center_policy_for_workers(unsigned sched_ctx_id, un
 		sched_ctx->sched_mutex[workerid_ctx] = sched_ctx->sched_mutex[0];
 		sched_ctx->sched_cond[workerid_ctx] = sched_ctx->sched_cond[0];
 	}
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
 }
 
 static void initialize_eager_center_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	/* there is only a single queue in that trivial design */
 	struct starpu_fifo_taskq_s *fifo =  _starpu_create_fifo();
@@ -70,7 +66,7 @@ static void deinitialize_eager_center_policy(unsigned sched_ctx_id)
 {
 	/* TODO check that there is no task left in the queue */
 
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_fifo_taskq_s *fifo = (struct starpu_fifo_taskq_s*)sched_ctx->policy_data;
 
 	/* deallocate the job queue */
@@ -86,7 +82,7 @@ static void deinitialize_eager_center_policy(unsigned sched_ctx_id)
 
 static int push_task_eager_policy(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	int i;
 	int workerid;
 	for(i = 0; i < sched_ctx->nworkers; i++){
@@ -100,7 +96,7 @@ static int push_task_eager_policy(struct starpu_task *task, unsigned sched_ctx_i
 
 static struct starpu_task *pop_every_task_eager_policy(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_fifo_taskq_s *fifo = (struct starpu_fifo_taskq_s*)sched_ctx->policy_data;
 	return _starpu_fifo_pop_every_task(fifo, sched_ctx->sched_mutex[0], starpu_worker_get_id());
 }
@@ -108,7 +104,7 @@ static struct starpu_task *pop_every_task_eager_policy(unsigned sched_ctx_id)
 static struct starpu_task *pop_task_eager_policy(unsigned sched_ctx_id)
 {
         unsigned workerid = starpu_worker_get_id();
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_fifo_taskq_s *fifo = (struct starpu_fifo_taskq_s*)sched_ctx->policy_data;
 	struct starpu_task *task =  _starpu_fifo_pop_task(fifo, workerid);
 

+ 5 - 9
src/sched_policies/eager_central_priority_policy.c

@@ -69,7 +69,7 @@ static void _starpu_destroy_priority_taskq(struct starpu_priority_taskq_s *prior
 
 static void initialize_eager_center_priority_policy_for_workers(unsigned sched_ctx_id, unsigned nnew_workers) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	unsigned nworkers_ctx = sched_ctx->nworkers;
 
 	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
@@ -84,15 +84,11 @@ static void initialize_eager_center_priority_policy_for_workers(unsigned sched_c
 		sched_ctx->sched_cond[workerid_ctx] = sched_ctx->sched_cond[0];
 	}
 
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
 }
 
 static void initialize_eager_center_priority_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	/* In this policy, we support more than two levels of priority. */
 	starpu_sched_set_min_priority(MIN_LEVEL);
@@ -120,7 +116,7 @@ static void initialize_eager_center_priority_policy(unsigned sched_ctx_id)
 static void deinitialize_eager_center_priority_policy(unsigned sched_ctx_id) 
 {
 	/* TODO check that there is no task left in the queue */
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_priority_taskq_s *taskq = (struct starpu_priority_taskq_s*)sched_ctx->policy_data;
 
 	/* deallocate the task queue */
@@ -136,7 +132,7 @@ static void deinitialize_eager_center_priority_policy(unsigned sched_ctx_id)
 
 static int _starpu_priority_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_priority_taskq_s *taskq = (struct starpu_priority_taskq_s*)sched_ctx->policy_data;
 
 	/* wake people waiting for a task */
@@ -160,7 +156,7 @@ static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
 {
 	struct starpu_task *task = NULL;
 
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct starpu_priority_taskq_s *taskq = (struct starpu_priority_taskq_s*)sched_ctx->policy_data;
 
 	/* block until some event happens */

+ 54 - 56
src/sched_policies/heft.c

@@ -54,42 +54,39 @@ void param_modified(struct starputop_param_t* d){
 	//just to show parameter modification
 	fprintf(stderr,"%s has been modified : %f !\n", d->name, d->value);
 }
-static void heft_init_for_workers(unsigned sched_ctx_id, unsigned nnew_workers)
+static void heft_init_for_workers(unsigned sched_ctx_id, int *workerids, unsigned nnew_workers)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	unsigned nworkers_ctx = sched_ctx->nworkers;
-
+	
 	struct starpu_machine_config_s *config = (struct starpu_machine_config_s *)_starpu_get_machine_config();
 	unsigned nworkers = config->topology.nworkers;
 
-	unsigned all_workers = nnew_workers == nworkers ? nworkers : nworkers_ctx + nnew_workers;
-
+	
 	unsigned workerid_ctx;
 	int workerid;
-	for (workerid_ctx = nworkers_ctx; workerid_ctx < all_workers; workerid_ctx++)
-	  {
-	    workerid = sched_ctx->workerids[workerid_ctx];
-	    struct starpu_worker_s *workerarg = _starpu_get_worker_struct(workerid);
-	    /* init these structures only once for each worker */
-	    if(workerarg->nsched_ctxs == 1)
-	      {
-		exp_start[workerid] = starpu_timing_now();
-		exp_len[workerid] = 0.0;
-		exp_end[workerid] = exp_start[workerid]; 
-		ntasks[workerid] = 0;
-	      }
-
-	    /* we push the tasks on the local lists of the workers
-	       therefore the synchronisations mechanisms of the strategy
-	       are the global ones */
-	    sched_ctx->sched_mutex[workerid_ctx] = workerarg->sched_mutex;
-	    sched_ctx->sched_cond[workerid_ctx] = workerarg->sched_cond;
-	  }
-
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
+	unsigned i;
+	for (i = 0; i < nnew_workers; i++)
+	{
+		workerid = workerids[i];
+		struct starpu_worker_s *workerarg = _starpu_get_worker_struct(workerid);
+		/* init these structures only once for each worker */
+		if(!workerarg->has_prev_init)
+		{
+			exp_start[workerid] = starpu_timing_now();
+			exp_len[workerid] = 0.0;
+			exp_end[workerid] = exp_start[workerid]; 
+			ntasks[workerid] = 0;
+			workerarg->has_prev_init = 1;
+		}
+		
+		/* we push the tasks on the local lists of the workers
+		   therefore the synchronisations mechanisms of the strategy
+		   are the global ones */
+		sched_ctx->sched_mutex[nworkers_ctx] = workerarg->sched_mutex;
+		sched_ctx->sched_cond[nworkers_ctx] = workerarg->sched_cond;
+		nworkers_ctx++;
+	}
 }
 static void heft_init(unsigned sched_ctx_id)
 {
@@ -99,7 +96,7 @@ static void heft_init(unsigned sched_ctx_id)
 	hd->_gamma = STARPU_DEFAULT_GAMMA;
 	hd->idle_power = 0.0;
 	
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	unsigned nworkers = sched_ctx->nworkers;
 	sched_ctx->policy_data = (void*)hd;
@@ -128,24 +125,25 @@ static void heft_init(unsigned sched_ctx_id)
 	unsigned workerid_ctx;
 
 	for (workerid_ctx = 0; workerid_ctx < nworkers; workerid_ctx++)
-	  {
-	    int workerid = sched_ctx->workerids[workerid_ctx];
-	    struct starpu_worker_s *workerarg = _starpu_get_worker_struct(workerid);
-	    /* init these structures only once for each worker */
-	    if(workerarg->nsched_ctxs == 1)
-	      {
-		exp_start[workerid] = starpu_timing_now();
-		exp_len[workerid] = 0.0;
-		exp_end[workerid] = exp_start[workerid]; 
-		ntasks[workerid] = 0;
-	      }
-	    /* we push the tasks on the local lists of the workers
-	       therefore the synchronisations mechanisms of the strategy
-	       are the global ones */
-	    sched_ctx->sched_mutex[workerid_ctx] = workerarg->sched_mutex;
-	    sched_ctx->sched_cond[workerid_ctx] = workerarg->sched_cond;
-
-	  }
+	{
+		int workerid = sched_ctx->workerids[workerid_ctx];
+		struct starpu_worker_s *workerarg = _starpu_get_worker_struct(workerid);
+		/* init these structures only once for each worker */
+		if(!workerarg->has_prev_init)
+		{
+			exp_start[workerid] = starpu_timing_now();
+			exp_len[workerid] = 0.0;
+			exp_end[workerid] = exp_start[workerid]; 
+			ntasks[workerid] = 0;
+			workerarg->has_prev_init = 1;
+		}
+		/* we push the tasks on the local lists of the workers
+		   therefore the synchronisations mechanisms of the strategy
+		   are the global ones */
+		sched_ctx->sched_mutex[workerid_ctx] = workerarg->sched_mutex;
+		sched_ctx->sched_cond[workerid_ctx] = workerarg->sched_cond;
+		
+	}
 }
 
 static void heft_post_exec_hook(struct starpu_task *task, unsigned sched_ctx_id)
@@ -249,18 +247,18 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 		worker = sched_ctx->workerids[worker_ctx];
 		for (nimpl = 0; nimpl <STARPU_MAXIMPLEMENTATIONS; nimpl++) 
 		{
-      		/* Sometimes workers didn't take the tasks as early as we expected */
-      		exp_start[worker] = STARPU_MAX(exp_start[worker], starpu_timing_now());
-      		exp_end[worker_ctx] = exp_start[worker] + exp_len[worker];
-      		if (exp_end[worker_ctx] > max_exp_end)
+			/* Sometimes workers didn't take the tasks as early as we expected */
+			exp_start[worker] = STARPU_MAX(exp_start[worker], starpu_timing_now());
+			exp_end[worker_ctx] = exp_start[worker] + exp_len[worker];
+			if (exp_end[worker_ctx] > max_exp_end)
  				max_exp_end = exp_end[worker_ctx];
-
+			
 			if (!starpu_worker_may_execute_task(worker, task, nimpl))
 			{
 				/* no one on that queue may execute this task */
 				continue;
 			}
-
+			
 			enum starpu_perf_archtype perf_arch = starpu_worker_get_perf_archtype(worker);
 			unsigned memory_node = starpu_worker_get_memory_node(worker);
 
@@ -330,7 +328,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 
 static int _heft_push_task(struct starpu_task *task, unsigned prio, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	heft_data *hd = (heft_data*)sched_ctx->policy_data;
 	unsigned worker, worker_ctx;
 	int best = -1, best_id_ctx = -1;
@@ -449,7 +447,7 @@ static int heft_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 
 static void heft_deinit(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	heft_data *ht = (heft_data*)sched_ctx->policy_data;	  
 	free(ht);
 }

+ 1 - 1
src/sched_policies/parallel_greedy.c

@@ -38,7 +38,7 @@ static int possible_combinations_size[STARPU_NMAXWORKERS][10];
 
 static void initialize_pgreedy_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	/* masters pick tasks from that queue */
 	fifo = _starpu_create_fifo();

+ 3 - 7
src/sched_policies/random_policy.c

@@ -69,14 +69,14 @@ static int _random_push_task(struct starpu_task *task, unsigned prio, struct sta
 
 static int random_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
     return _random_push_task(task, 0, sched_ctx);
 }
 
 static void initialize_random_policy_for_workers(unsigned sched_ctx_id, unsigned nnew_workers) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	unsigned nworkers_ctx = sched_ctx->nworkers;
 
@@ -94,15 +94,11 @@ static void initialize_random_policy_for_workers(unsigned sched_ctx_id, unsigned
 		sched_ctx->sched_mutex[workerid_ctx] = workerarg->sched_mutex;
 		sched_ctx->sched_cond[workerid_ctx] = workerarg->sched_cond;
 	}
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
 }
 
 static void initialize_random_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 	starpu_srand48(time(NULL));
 

+ 4 - 8
src/sched_policies/work_stealing_policy.c

@@ -135,7 +135,7 @@ static struct starpu_deque_jobq_s *select_workerq(work_stealing_data *ws, unsign
 #endif
 static struct starpu_task *ws_pop_task(unsigned sched_ctx_id)
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	work_stealing_data *ws = (work_stealing_data*)sched_ctx->policy_data;
 
 	struct starpu_task *task;
@@ -176,7 +176,7 @@ int ws_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 {
 	starpu_job_t j = _starpu_get_job_associated_to_task(task);
 
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	work_stealing_data *ws = (work_stealing_data*)sched_ctx->policy_data;
 
 	int workerid = starpu_worker_get_id();
@@ -202,7 +202,7 @@ int ws_push_task(struct starpu_task *task, unsigned sched_ctx_id)
 
 static void initialize_ws_policy_for_workers(unsigned sched_ctx_id, unsigned nnew_workers) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	work_stealing_data *ws = (work_stealing_data*)sched_ctx->policy_data;
 
 	unsigned nworkers_ctx = sched_ctx->nworkers;
@@ -220,15 +220,11 @@ static void initialize_ws_policy_for_workers(unsigned sched_ctx_id, unsigned nne
 		sched_ctx->sched_mutex[workerid_ctx] = sched_ctx->sched_mutex[0];
 		sched_ctx->sched_cond[workerid_ctx] = sched_ctx->sched_cond[0];
 	}
-	/* take into account the new number of threads at the next push */
-	PTHREAD_MUTEX_LOCK(&sched_ctx->changing_ctx_mutex);
-	sched_ctx->temp_nworkers = all_workers;
-	PTHREAD_MUTEX_UNLOCK(&sched_ctx->changing_ctx_mutex);
 }
 
 static void initialize_ws_policy(unsigned sched_ctx_id) 
 {
-	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_structure(sched_ctx_id);
+	struct starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	work_stealing_data *ws = (work_stealing_data*)malloc(sizeof(work_stealing_data));
 	sched_ctx->policy_data = (void*)ws;
 	

+ 0 - 137
tests/cholesky_2ctxs/sched.sh

@@ -1,137 +0,0 @@
-#!/bin/bash
-
-# StarPU --- Runtime system for heterogeneous multicore architectures.
-# 
-# Copyright (C) 2011  INRIA
-# 
-# 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.
-
-
-DIR=$PWD
-ROOTDIR=$DIR/../..
-TIMINGDIR=$DIR/timings-sched/
-mkdir -p $TIMINGDIR
-BENCH_NAME=cholesky_2ctxs
-nsamples=3
-
-filename=$TIMINGDIR/$BENCH_NAME_$1
-
-gpu=$2
-gpu1=$3
-gpu2=$4
-
-nmaxcpus=$STARPU_NCPUS
-echo $nmaxcpus
-
-nmincpus1=1
-nmincpus2=1
-
-if [ $gpu1 -gt 0 ]
-then
-    nmincpus1=0
-fi
-
-if [ $gpu2 -gt 0 ]
-then
-    nmincpus2=0
-fi
-
-
-blocks1=40
-blocks2=40
-
-size1=20000
-size2=10000
-#size1=$(($blocks1*1024))
-#size2=$(($blocks2*1024))
-
-for j in `seq $nmincpus1 1 $(($nmaxcpus-1))`
-do
-    if [ $j -gt $(($nmaxcpus-$nmincpus2)) ]
-    then
-	break
-    fi
-
-    ncpus1=$j
-    ncpus2=$(($nmaxcpus-$j))    
-    
-    OPTIONS="-pin -nblocks $blocks1 -size $size1 -nblocks $blocks2 -size $size2 -gpu $gpu -gpu1 $gpu1 -gpu2 $gpu2 -cpu1 $ncpus1 -cpu2 $ncpus2"
-
-    gflops1_avg=0
-    gflops2_avg=0
-
-    t1_avg=0
-    t2_avg=0
-    t_total_avg=0
-
-    exec_nsamples=$nsamples
-
-    for s in `seq 1 $nsamples`
-    do
-	echo "$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS"
-	
-	val=`$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS`
-
-	echo "$val"
-
-	val=`echo $val|tr " " "\n"`
-	
-	i=0
-	for x in $val
-	do
-	    if [ $i -eq 0 ]
-	    then
-		gflops1_avg=$(echo "$gflops1_avg + $x"|bc -l)
-	    fi
-	    if [ $i -eq 1 ]
-	    then
-		gflops2_avg=$(echo "$gflops2_avg+$x"|bc -l)
-	    fi
-	    if [ $i -eq 2 ]
-	    then
-		t1_avg=$(echo "$t1_avg+$x"|bc -l)
-	    fi
-	    
-	    if [ $i -eq 3 ]
-	    then
-		t2_avg=$(echo "$t2_avg+$x"|bc -l)
-	    fi
-
-	    if [ $i -eq 4 ]
-	    then
-		t_total_avg=$(echo "$t_total_avg+$x"|bc -l)
-	    fi
-	    i=$(($i+1))
-	done
-
-
-	if [ "$val" == "" ]
-	then
-	    echo "no val"
-	    exec_nsamples=$(($exec_nsamples-1))
-	fi
-	
-    done
-
-    gflops1_avg=$(echo "$gflops1_avg / $exec_nsamples"|bc -l)
-    gflops2_avg=$(echo "$gflops2_avg / $exec_nsamples"|bc -l)
-    t1_avg=$(echo "$t1_avg / $exec_nsamples"|bc -l)
-    t2_avg=$(echo "$t2_avg / $exec_nsamples"|bc -l)
-    t_total_avg=$(echo "$t_total_avg / $exec_nsamples"|bc -l)
-
-    echo "$exec_nsamples"
-    echo "$gpu $gpu1 $gpu2 $ncpus1 $ncpus2 `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`"
-    echo "$gpu $gpu1 $gpu2 $ncpus1 $ncpus2 `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`" >> $filename
-
-done
-
-

+ 14 - 11
tests/cholesky_2ctxs/all_sched.sh

@@ -20,17 +20,20 @@
 #export STARPU_DIR=$HOME/sched_ctx/build
 
 #source sched.sh isole 0 0 0 
+source sched_no_ctxs.sh
+source sched_no_ctxs.sh 1stchole -chole1
+source sched_no_ctxs.sh 2ndchole -chole2
+ 
+source sched_with_ctxs.sh isole 0 0 3 
+source sched_with_ctxs.sh isole 0 1 2
+source sched_with_ctxs.sh isole 0 2 1
+source sched_with_ctxs.sh isole 0 3 0   
 
-source sched.sh isole 0 0 3 
-source sched.sh isole 0 1 2
-source sched.sh isole 0 2 1
-source sched.sh isole 0 3 0   
+source sched_with_ctxs.sh 1gpu 1 0 2
+source sched_with_ctxs.sh 1gpu 1 1 1
+source sched_with_ctxs.sh 1gpu 1 2 0
 
-source sched.sh 1gpu 1 0 2
-source sched.sh 1gpu 1 1 1
-source sched.sh 1gpu 1 2 0
+source sched_with_ctxs.sh 2gpu 2 1 0
+source sched_with_ctxs.sh 2gpu 2 0 1
 
-source sched.sh 2gpu 2 1 0
-source sched.sh 2gpu 2 0 1
-
-source sched.sh 3gpu 3 0 0
+source sched_with_ctxs.sh 3gpu 3 0 0

tests/cholesky_2ctxs/comp.sh → tests/cholesky_ctxs/comp.sh


+ 8 - 8
tests/cholesky_2ctxs/comp_all.sh

@@ -15,15 +15,15 @@
 # 
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
+source all_sched.sh
+
 rm -rf res_*
 compute_effic=$1
 #for one matrix 20000 x 20000 and one of 10000 x 10000
 ninstr=2999999987712
-#no_ctx_prefix=../../../../trunk2/trunk/tests/cholesky_and_lu/timings-sched_attila
-no_ctx_prefix=../cholesky_no_ctxs/timings-sched
-ctx_prefix=timings-sched
+prefix=timings-sched
 
-source comp.sh $no_ctx_prefix/cholesky_no_ctxs res_cholesky_no_ctxs 0 $compute_effic $ninstr
+source comp.sh $prefix/cholesky_no_ctxs res_cholesky_no_ctxs 0 $compute_effic $ninstr
 
 bestval_noctx=0
 while read line
@@ -40,16 +40,16 @@ done < res_cholesky_no_ctxs
 
 echo $bestval_noctx
 
-source comp.sh $ctx_prefix/isole res_isole 1 $compute_effic $ninstr $bestval_noctx
+source comp.sh $prefix/isole res_isole 1 $compute_effic $ninstr $bestval_noctx
 
 #compute efficiency in a heterogeneous system
 #for the homogeneous one we can compute gflops rate per PU
 
 if [ $compute_effic -eq 1 ]
 then
-    source comp.sh $ctx_prefix/1gpu res_1gpu 1 $compute_effic $ninstr $bestval_noctx
-    source comp.sh $ctx_prefix/2gpu res_2gpu  1 $compute_effic $ninstr $bestval_noctx
-    source comp.sh $ctx_prefix/3gpu res_3gpu 1 $compute_effic $ninstr $bestval_noctx
+    source comp.sh $prefix/1gpu res_1gpu 1 $compute_effic $ninstr $bestval_noctx
+    source comp.sh $prefix/2gpu res_2gpu  1 $compute_effic $ninstr $bestval_noctx
+    source comp.sh $prefix/3gpu res_3gpu 1 $compute_effic $ninstr $bestval_noctx
 
     source gnuplot_efficiency.sh efficiency
 else

+ 58 - 0
tests/cholesky_ctxs/evaluate_expression.sh

@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+# 
+# Copyright (C) 2011  INRIA
+# 
+# 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.
+
+nsamples=3
+
+BENCH_NAME=$1
+OPTIONS=$2
+filename=$3
+print_options=$4
+
+gflops1_avg=0
+gflops2_avg=0
+
+t1_avg=0
+t2_avg=0
+t_total_avg=0
+
+for s in `seq 1 $nsamples`
+do
+    echo "$ROOTDIR/examples/$BENCH_NAME $OPTIONS"
+    
+    val=`$ROOTDIR/examples/$BENCH_NAME $OPTIONS`
+    
+    echo "$val"
+    
+    results=($val)
+    
+    gflops1_avg=$(echo "$gflops1_avg+${results[0]}"|bc -l)
+    gflops2_avg=$(echo "$gflops2_avg+${results[1]}"|bc -l)
+    t1_avg=$(echo "$t1_avg+${results[2]}"|bc -l)
+    t2_avg=$(echo "$t2_avg+${results[3]}"|bc -l)
+    t_total_avg=$(echo "$t_total_avg+${results[4]}"|bc -l)
+    
+done
+
+gflops1_avg=$(echo "$gflops1_avg / $nsamples"|bc -l)
+gflops2_avg=$(echo "$gflops2_avg / $nsamples"|bc -l)
+t1_avg=$(echo "$t1_avg / $nsamples"|bc -l)
+t2_avg=$(echo "$t2_avg / $nsamples"|bc -l)
+t_total_avg=$(echo "$t_total_avg / $nsamples"|bc -l)
+
+
+echo "$print_options `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`"
+echo "$print_options `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`" >> $filename

tests/cholesky_2ctxs/gnuplot_efficiency.sh → tests/cholesky_ctxs/gnuplot_efficiency.sh


tests/cholesky_2ctxs/gnuplot_gflopsrate.sh → tests/cholesky_ctxs/gnuplot_gflopsrate.sh


+ 63 - 0
tests/cholesky_ctxs/sched_no_ctxs.sh

@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+# 
+# Copyright (C) 2011  INRIA
+# 
+# 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.
+
+
+DIR=$PWD
+ROOTDIR=$DIR/../..
+TIMINGDIR=$DIR/timings-sched/$1
+mkdir -p $TIMINGDIR
+BENCH_NAME=cholesky/cholesky_implicit
+nsamples=5
+
+filename=$TIMINGDIR/cholesky_no_ctxs
+
+
+nmaxcpus=12
+nmincpus=1
+blocks1=40
+blocks2=40
+
+size1=20000
+size2=10000
+
+param=""
+if [ $2="" ];
+then
+    param="-with_noctxs"
+else
+    param=$2
+fi
+
+for j in `seq $nmincpus 1 $nmaxcpus`
+do
+    if [ $j -le 3 ]
+    then
+	export STARPU_NCUDA=$j
+    else
+	export STARPU_NCPUS=$(($j-3))
+    fi
+    
+    OPTIONS="$param -nblocks1 $blocks1 -size1 $size1 -nblocks2 $blocks2 -size2 $size2 $2"
+
+    source evaluate_expression.sh "$BENCH_NAME" "$OPTIONS" "$filename" "$j"
+
+done
+    
+
+
+
+

+ 70 - 0
tests/cholesky_ctxs/sched_with_ctxs.sh

@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+# 
+# Copyright (C) 2011  INRIA
+# 
+# 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.
+
+
+DIR=$PWD
+ROOTDIR=$DIR/../..
+TIMINGDIR=$DIR/timings-sched/
+mkdir -p $TIMINGDIR
+BENCH_NAME=cholesky/cholesky_implicit
+
+filename=$TIMINGDIR/$1
+
+gpu=$2
+gpu1=$3
+gpu2=$4
+
+nmaxcpus=$STARPU_NCPUS
+echo $nmaxcpus
+
+nmincpus1=1
+nmincpus2=1
+
+if [ $gpu1 -gt 0 ]
+then
+    nmincpus1=0
+fi
+
+if [ $gpu2 -gt 0 ]
+then
+    nmincpus2=0
+fi
+
+
+blocks1=40
+blocks2=40
+
+size1=20000
+size2=10000
+
+for j in `seq $nmincpus1 1 $(($nmaxcpus-1))`
+do
+    if [ $j -gt $(($nmaxcpus-$nmincpus2)) ]
+    then
+	break
+    fi
+
+    ncpus1=$j
+    ncpus2=$(($nmaxcpus-$j))    
+    
+    OPTIONS="-with_ctxs -nblocks1 $blocks1 -size1 $size1 -nblocks2 $blocks2 -size2 $size2 -gpu $gpu -gpu1 $gpu1 -gpu2 $gpu2 -cpu1 $ncpus1 -cpu2 $ncpus2"
+
+    source evaluate_expression.sh "$BENCH_NAME" "$OPTIONS" "$filename" "$gpu $gpu1 $gpu2 $ncpus1 $ncpus2"
+
+done
+
+

+ 0 - 118
tests/cholesky_no_ctxs/sched.sh

@@ -1,118 +0,0 @@
-#!/bin/bash
-
-# StarPU --- Runtime system for heterogeneous multicore architectures.
-# 
-# Copyright (C) 2011  INRIA
-# 
-# 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.
-
-
-DIR=$PWD
-ROOTDIR=$DIR/../..
-TIMINGDIR=$DIR/timings-sched/$1
-mkdir -p $TIMINGDIR
-BENCH_NAME=cholesky_no_ctxs
-nsamples=5
-
-filename=$TIMINGDIR/$BENCH_NAME
-
-
-nmaxcpus=12
-nmincpus=1
-blocks1=40
-blocks2=40
-
-size1=20000
-size2=10000
-#size1=$(($blocks1*1024))
-#size2=$(($blocks2*1024))
-
-
-for j in `seq $nmincpus 1 $nmaxcpus`
-do
-    if [ $j -le 3 ]
-    then
-	export STARPU_NCUDA=$j
-    else
-	export STARPU_NCPUS=$(($j-3))
-    fi
-    
-    OPTIONS="-pin -nblocks $blocks1 -size $size1 -nblocks $blocks2 -size $size2 $2"
-
-    gflops1_avg=0
-    gflops2_avg=0
-
-    t1_avg=0
-    t2_avg=0
-    t_total_avg=0
-
-    exec_nsamples=$nsamples
-    for s in `seq 1 $nsamples`
-    do
-	echo "$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS"
-    
-	val=`$ROOTDIR/examples/$BENCH_NAME/$BENCH_NAME $OPTIONS`
-    
-	echo "$val"
-
-	val=`echo $val|tr " " "\n"`
-
-        i=0
-	for x in $val
-        do
-            if [ $i -eq 0 ]
-            then
-                gflops1_avg=$(echo "$gflops1_avg + $x"|bc -l)
-            fi
-            if [ $i -eq 1 ]
-            then
-                gflops2_avg=$(echo "$gflops2_avg+$x"|bc -l)
-            fi
-            if [ $i -eq 2 ]
-            then
-                t1_avg=$(echo "$t1_avg+$x"|bc -l)
-            fi
-
-            if [ $i -eq 3 ]
-            then
-                t2_avg=$(echo "$t2_avg+$x"|bc -l)
-            fi
-
-            if [ $i -eq 4 ]
-            then
-                t_total_avg=$(echo "$t_total_avg+$x"|bc -l)
-            fi
-            i=$(($i+1))
-	done
-	if [ "$val" == "" ]
-        then
-            echo "no val"
-            exec_nsamples=$(($exec_nsamples-1))
-        fi
-
-    done
-
-    gflops1_avg=$(echo "$gflops1_avg / $exec_nsamples"|bc -l)
-    gflops2_avg=$(echo "$gflops2_avg / $exec_nsamples"|bc -l)
-    t1_avg=$(echo "$t1_avg / $exec_nsamples"|bc -l)
-    t2_avg=$(echo "$t2_avg / $exec_nsamples"|bc -l)
-    t_total_avg=$(echo "$t_total_avg / $exec_nsamples"|bc -l)
-
-    echo "$j `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`"
-    echo "$j `printf '%2.2f %2.2f %2.2f %2.2f %2.2f' $gflops1_avg $gflops2_avg $t1_avg $t2_avg $t_total_avg`" >> $filename
-
-done
-    
-
-
-
-