Pārlūkot izejas kodu

sched_ctx_hypervisor has been renamed in sc_hypervisor

Nathalie Furmento 12 gadi atpakaļ
vecāks
revīzija
ccb670cd34

+ 1 - 1
Makefile.am

@@ -44,7 +44,7 @@ if BUILD_STARPUFFT
 SUBDIRS += starpufft
 endif
 
-if STARPU_BUILD_SCHED_CTX_HYPERVISOR
+if STARPU_BUILD_SC_HYPERVISOR
 SUBDIRS += sc_hypervisor
 endif
 

+ 8 - 8
configure.ac

@@ -263,26 +263,26 @@ 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],
+AC_ARG_ENABLE([sc_hypervisor],
+  [AS_HELP_STRING([--enable-sct-hypervisor],
     [enable resizing contexts (experimental)])],
   [enable_sc_hypervisor="yes"],
   [enable_sc_hypervisor="no"])
 
 #for pkgconfig
-AC_SUBST(STARPU_SCHED_CTX_HYPERVISOR)
+AC_SUBST(STARPU_SC_HYPERVISOR)
 if test "x$enable_sc_hypervisor" = "xyes"; then
-  AC_DEFINE(STARPU_USE_SCHED_CTX_HYPERVISOR, [1], [enable sc_hypervisor lib])
-#   PKG_CHECK_MODULES([SCHED_CTX_HYPERVISOR], [libsc_hypervisor], [], build_sc_hypervisor="yes")
-   STARPU_SCHED_CTX_HYPERVISOR="-lsc_hypervisor"
+  AC_DEFINE(STARPU_USE_SC_HYPERVISOR, [1], [enable sc_hypervisor lib])
+#   PKG_CHECK_MODULES([SC_HYPERVISOR], [libsc_hypervisor], [], build_sc_hypervisor="yes")
+   STARPU_SC_HYPERVISOR="-lsc_hypervisor"
    build_sc_hypervisor="yes"
 else
    build_sc_hypervisor="no"
 fi
 
 
-AM_CONDITIONAL([STARPU_BUILD_SCHED_CTX_HYPERVISOR], [test "x$build_sc_hypervisor" = "xyes"])
-AM_CONDITIONAL([STARPU_USE_SCHED_CTX_HYPERVISOR], [test "x$build_sc_hypervisor" = "xyes"])
+AM_CONDITIONAL([STARPU_BUILD_SC_HYPERVISOR], [test "x$build_sc_hypervisor" = "xyes"])
+AM_CONDITIONAL([STARPU_USE_SC_HYPERVISOR], [test "x$build_sc_hypervisor" = "xyes"])
 ###############################################################################
 #                                                                             #
 #                                 CPUs settings                               #

+ 1 - 1
doc/Makefile.am

@@ -27,7 +27,7 @@ chapters =	\
 	chapters/perf-feedback.texi \
 	chapters/perf-optimization.texi \
 	chapters/scaling-vector-example.texi \
-	chapters/sched_ctx_hypervisor.texi \
+	chapters/sc_hypervisor.texi \
 	chapters/sched_ctx.texi \
 	chapters/socl.texi \
 	chapters/tips-tricks.texi \

+ 2 - 2
doc/chapters/configuration.texi

@@ -300,8 +300,8 @@ Disable the build of examples.
 @end defvr
 
 
-@defvr {Configure option} --enable-sched-ctx-hypervisor
-Enables the Scheduling Context Hypervisor plugin(@pxref{Scheduling Context Hypervisor}).
+@defvr {Configure option} --enable-sc-hypervisor
+Enable the Scheduling Context Hypervisor plugin(@pxref{Scheduling Context Hypervisor}).
 By default, it is disabled.
 @end defvr
 

+ 30 - 30
doc/chapters/hypervisor_api.texi

@@ -19,14 +19,14 @@
 @section Managing the hypervisor
 There is a single hypervisor that is in charge of resizing contexts and the resizing strategy is chosen at the initialization of the hypervisor. A single resize can be done at a time.
 
-@deftypefun {struct starpu_sched_ctx_performance_counters *} sched_ctx_hypervisor_init ({struct sched_ctx_hypervisor_policy *} @var{policy})
+@deftypefun {struct starpu_sched_ctx_performance_counters *} sc_hypervisor_init ({struct sc_hypervisor_policy *} @var{policy})
 Initializes the hypervisor to use the strategy provided as parameter and creates the performance counters (see @pxref{Performance Counters}).
 These performance counters represent actually some callbacks that will be used by the contexts to notify the information needed by the hypervisor.
 @end deftypefun
 
 Note: The Hypervisor is actually a worker that takes this role once certain conditions trigger the resizing process (there is no additional thread assigned to the hypervisor).
 
-@deftypefun void sched_ctx_hypervisor_shutdown (void)
+@deftypefun void sc_hypervisor_shutdown (void)
 The hypervisor and all information concerning it is cleaned. There is no synchronization between this function and starpu_shutdown. Thus, this should be done after starpu_shutdown(),
 because the performance counters will still need allocated callback functions.
 @end deftypefun
@@ -35,11 +35,11 @@ because the performance counters will still need allocated callback functions.
 @section Registering Scheduling Contexts to the hypervisor
 Scheduling Contexts that have to be resized by the hypervisor must be first registered to the hypervisor. Whenever we want to exclude contexts from the resizing process we have to unregister them from the hypervisor.
 
-@deftypefun void sched_ctx_hypervisor_register_ctx (unsigned @var{sched_ctx}, double @var{total_flops})
+@deftypefun void sc_hypervisor_register_ctx (unsigned @var{sched_ctx}, double @var{total_flops})
 Register the context to the hypervisor, and indicate the number of flops the context will execute (needed for Gflops rate based strategy @pxref{Resizing strategies} or any other custom strategy needing it, for the others we can pass 0.0)
 @end deftypefun
 
-@deftypefun void sched_ctx_hypervisor_unregister_ctx (unsigned @var{sched_ctx})
+@deftypefun void sc_hypervisor_unregister_ctx (unsigned @var{sched_ctx})
 Unregister the context from the hypervisor
 @end deftypefun
 
@@ -47,67 +47,67 @@ Unregister the context from the hypervisor
 @section The user's input in the resizing process
 The user can totally forbid the resizing of a certain context or can then change his mind and allow it (in this case the resizing is managed by the hypervisor, that can forbid it or allow it)
 
-@deftypefun void sched_ctx_hypervisor_stop_resize (unsigned @var{sched_ctx})
+@deftypefun void sc_hypervisor_stop_resize (unsigned @var{sched_ctx})
 Forbid resizing of a context
 @end deftypefun
 
-@deftypefun void sched_ctx_hypervisor_start_resize (unsigned @var{sched_ctx})
+@deftypefun void sc_hypervisor_start_resize (unsigned @var{sched_ctx})
 Allow resizing of a context
 @end deftypefun
 
 The user can then provide information to the hypervisor concerning the conditions of resizing.
 
-@deftypefun void sched_ctx_hypervisor_ioctl (unsigned @var{sched_ctx}, ...)
+@deftypefun void sc_hypervisor_ioctl (unsigned @var{sched_ctx}, ...)
 Inputs conditions to the context @code{sched_ctx} with the following arguments.  The argument list must be zero-terminated.
 
 @defmac HYPERVISOR_MAX_IDLE
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 3 arguments:
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 3 arguments:
 an array of int for the workerids to apply the condition, an int to indicate the size of the array, and a double value indicating
 the maximum idle time allowed for a worker before the resizing process should be triggered
 @end defmac
 
 @defmac HYPERVISOR_PRIORITY
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 3 arguments:
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 3 arguments:
 an array of int for the workerids to apply the condition, an int to indicate the size of the array, and an int value indicating
 the priority of the workers previously mentioned.
 The workers with the smallest priority are moved the first.
 @end defmac
 
 @defmac HYPERVISOR_MIN_WORKERS
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument(int) indicating
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument(int) indicating
 the minimum number of workers a context should have, underneath this limit the context cannot execute.
 @end defmac
 
 @defmac HYPERVISOR_MAX_WORKERS
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument(int) indicating
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument(int) indicating
 the maximum number of workers a context should have, above this limit the context would not be able to scale
 @end defmac
 
 @defmac HYPERVISOR_GRANULARITY
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument(int) indicating
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument(int) indicating
 the granularity of the resizing process (the number of workers should be moved from the context once it is resized)
 This parameter is ignore for the Gflops rate based strategy @pxref{Resizing strategies}, the number of workers that have to be moved is calculated by the strategy.
 @end defmac
 
 @defmac HYPERVISOR_FIXED_WORKERS
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 2 arguments:
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 2 arguments:
 an array of int for the workerids to apply the condition and an int to indicate the size of the array.
 These workers are not allowed to be moved from the context.
 @end defmac
 
 @defmac HYPERVISOR_MIN_TASKS
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument (int)
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument (int)
 that indicated the minimum number of tasks that have to be executed before the context could be resized.
 This parameter is ignored for the Application Driven strategy @pxref{Resizing strategies} where the user indicates exactly when the resize should be done.
 @end defmac
 
 @defmac HYPERVISOR_NEW_WORKERS_MAX_IDLE
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument, a double value indicating
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument, a double value indicating
 the maximum idle time allowed for workers that have just been moved from other contexts in the current context.
 @end defmac
 
 @defmac HYPERVISOR_TIME_TO_APPLY
-This macro is used when calling sched_ctx_hypervisor_ioctl and must be followed by 1 argument (int) indicating the tag
+This macro is used when calling sc_hypervisor_ioctl and must be followed by 1 argument (int) indicating the tag
 an executed task should have such that this configuration should be taken into account.
 @end defmac
 @end deftypefun
@@ -154,7 +154,7 @@ it may sometimes be desirable to implement custom
 policies to address specific problems.  The API described below allows
 users to write their own resizing policy.
 
-@deftp {Data Type} {struct sched_ctx_hypervisor_policy}
+@deftp {Data Type} {struct sc_hypervisor_policy}
 This structure contains all the methods that implement a hypervisor resizing policy.
 
 @table @asis
@@ -177,7 +177,7 @@ It is called whenever a tag task has just been executed. The table of resize req
 
 The Hypervisor provides also a structure with configuration information of each context, which can be used to construct new resize strategies.
 
-@deftp {Data Type} {struct sched_ctx_hypervisor_policy_config }
+@deftp {Data Type} {struct sc_hypervisor_policy_config }
 This structure contains all configuration information of a context
 
 @table @asis
@@ -201,14 +201,14 @@ Indicates the maximum idle time accepted before a resize is triggered for the wo
 Additionally, the hypervisor provides a structure with information obtained from StarPU by means of the performance counters
 
 
-@deftp {Data Type} {struct sched_ctx_hypervisor_wrapper}
+@deftp {Data Type} {struct sc_hypervisor_wrapper}
 This structure is a wrapper of the contexts available in StarPU
 and contains all information about a context obtained by incrementing the performance counters
 
 @table @asis
 @item @code{unsigned sched_ctx}
 The context wrapped
-@item @code{struct sched_ctx_hypervisor_policy_config *config}
+@item @code{struct sc_hypervisor_policy_config *config}
 The corresponding resize configuration
 @item @code{double current_idle_time[STARPU_NMAXWORKERS]}
 The idle time counter of each worker of the context
@@ -226,12 +226,12 @@ The number of flops executed by each worker of the context from last resize
 The number of flops that still have to be executed by the workers in the context
 @item @code{double start_time}
 The time when he started executed
-@item @code{struct sched_ctx_hypervisor_resize_ack resize_ack}
+@item @code{struct sc_hypervisor_resize_ack resize_ack}
 The structure confirming the last resize finished and a new one can be done
 @end table
 @end deftp
 
-@deftp {Data Type} {struct sched_ctx_hypervisor_resize_ack}
+@deftp {Data Type} {struct sc_hypervisor_resize_ack}
 This structures checks if the workers moved to another context are actually taken into account in that context
 @table @asis
 @item @code{int receiver_sched_ctx}
@@ -247,31 +247,31 @@ If the value corresponding to a worker is 1, this one is taken into account in t
 
 The following functions can be used in the resizing strategies.
 
-@deftypefun void sched_ctx_hypervisor_move_workers (unsigned @var{sender_sched_ctx}, unsigned @var{receiver_sched_ctx}, {int *}@var{workers_to_move}, unsigned @var{nworkers_to_move}, unsigned @var{now});
+@deftypefun void sc_hypervisor_move_workers (unsigned @var{sender_sched_ctx}, unsigned @var{receiver_sched_ctx}, {int *}@var{workers_to_move}, unsigned @var{nworkers_to_move}, unsigned @var{now});
 Moves workers from one context to another
 @end deftypefun
 
-@deftypefun {struct sched_ctx_hypervisor_policy_config *} sched_ctx_hypervisor_get_config (unsigned @var{sched_ctx});
+@deftypefun {struct sc_hypervisor_policy_config *} sc_hypervisor_get_config (unsigned @var{sched_ctx});
 Returns the configuration structure of a context
 @end deftypefun
 
-@deftypefun {int *} sched_ctx_hypervisor_get_sched_ctxs ();
+@deftypefun {int *} sc_hypervisor_get_sched_ctxs ();
 Gets the contexts managed by the hypervisor
 @end deftypefun
 
-@deftypefun int sched_ctx_hypervisor_get_nsched_ctxs ();
+@deftypefun int sc_hypervisor_get_nsched_ctxs ();
 Gets the number of contexts managed by the hypervisor
 @end deftypefun
 
-@deftypefun {struct sched_ctx_hypervisor_wrapper *} sched_ctx_hypervisor_get_wrapper (unsigned @var{sched_ctx});
+@deftypefun {struct sc_hypervisor_wrapper *} sc_hypervisor_get_wrapper (unsigned @var{sched_ctx});
 Returns the wrapper corresponding the context @code{sched_ctx}
 @end deftypefun
 
-@deftypefun double sched_ctx_hypervisor_get_elapsed_flops_per_sched_ctx ({struct sched_ctx_hypervisor_wrapper *} @var{sc_w});
+@deftypefun double sc_hypervisor_get_elapsed_flops_per_sched_ctx ({struct sc_hypervisor_wrapper *} @var{sc_w});
 Returns the flops of a context elapsed from the last resize
 @end deftypefun
 
-@deftypefun {char *} sched_ctx_hypervisor_get_policy ();
+@deftypefun {char *} sc_hypervisor_get_policy ();
 Returns the name of the resizing policy the hypervisor uses
 @end deftypefun
 
@@ -281,7 +281,7 @@ Returns the name of the resizing policy the hypervisor uses
 @cartouche
 @smallexample
 
-struct sched_ctx_hypervisor_policy dummy_policy =
+struct sc_hypervisor_policy dummy_policy =
 @{
        .handle_poped_task = dummy_handle_poped_task,
        .handle_pushed_task = dummy_handle_pushed_task,

+ 4 - 4
doc/chapters/sched_ctx_hypervisor.texi

@@ -69,14 +69,14 @@ Then the user has to indicate that when a task with the specified tag is execute
 
 @cartouche
 @smallexample
-sched_ctx_hypervisor_resize(sched_ctx, 2);
+sc_hypervisor_resize(sched_ctx, 2);
 @end smallexample
 @end cartouche
 
 The user can use the same tag to change the resizing configuration of the contexts if he considers it necessary.
 @cartouche
 @smallexample
-sched_ctx_hypervisor_ioctl(sched_ctx,
+sc_hypervisor_ioctl(sched_ctx,
                     HYPERVISOR_MIN_WORKERS, 6,
                     HYPERVISOR_MAX_WORKERS, 12,
                     HYPERVISOR_TIME_TO_APPLY, 2,
@@ -92,7 +92,7 @@ for a period longer than the one imposed by the user (see @pxref{The user's inpu
 @smallexample
 int workerids[3] = @{1, 3, 10@};
 int workerids2[9] = @{0, 2, 4, 5, 6, 7, 8, 9, 11@};
-sched_ctx_hypervisor_ioctl(sched_ctx_id,
+sc_hypervisor_ioctl(sched_ctx_id,
             HYPERVISOR_MAX_IDLE, workerids, 3, 10000.0,
             HYPERVISOR_MAX_IDLE, workerids2, 9, 50000.0,
             NULL);
@@ -104,7 +104,7 @@ The velocity of each of them is considered and once one of them is significantly
 In order to do these computations the user has to input the total number of instructions needed to be executed by the
 parallel kernels and the number of instruction to be executed by each task.
 The number of flops to be executed by a context are passed as parameter when they are registered to the hypervisor,
- (@code{sched_ctx_hypervisor_register_ctx(sched_ctx_id, flops)}) and the one to be executed by each task are passed when the task is submitted.
+ (@code{sc_hypervisor_register_ctx(sched_ctx_id, flops)}) and the one to be executed by each task are passed when the task is submitted.
 The corresponding field in the @code{starpu_task} data structure is @code{flops} and
 the corresponding macro in @code{starpu_insert_task} function is @code{STARPU_FLOPS}. When the task is executed
 the resizing process is triggered.

+ 1 - 1
doc/starpu.texi

@@ -192,7 +192,7 @@ was last updated on @value{UPDATED}.
 
 @node Scheduling Context Hypervisor
 @chapter Scheduling Context Hypervisor
-@include chapters/sched_ctx_hypervisor.texi
+@include chapters/sc_hypervisor.texi
 
 @c ---------------------------------------------------------------------
 @c StarPU API

+ 1 - 1
include/starpu_config.h.in

@@ -72,7 +72,7 @@
 #undef STARPU_NMAXWORKERS
 #undef STARPU_NMAX_SCHED_CTXS
 #undef STARPU_MAXIMPLEMENTATIONS
-#undef STARPU_USE_SCHED_CTX_HYPERVISOR
+#undef STARPU_USE_SC_HYPERVISOR
 #undef STARPU_HAVE_GLPK_H
 
 #undef STARPU_HAVE_LIBNUMA

+ 2 - 2
include/starpu_sched_ctx.h

@@ -90,12 +90,12 @@ struct starpu_sched_ctx_performance_counters
 	void (*notify_delete_context)(unsigned sched_ctx);
 };
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 /* indicates to starpu the pointer to the performance counte */
 void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, struct starpu_sched_ctx_performance_counters *perf_counters);
 /* callback that lets the scheduling policy tell the hypervisor that a task was pushed on a worker */
 void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 /* allow the hypervisor to let starpu know he's initialised */
 void starpu_sched_ctx_notify_hypervisor_exists(void);

+ 3 - 3
libstarpu.pc.in

@@ -1,7 +1,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 # Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
-# Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+# Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
 #
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
@@ -23,6 +23,6 @@ Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@ -DSTARPU_USE_DEPRECATED_API
-Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_LDFLAGS@ @STARPU_OPENCL_LDFLAGS@ @STARPU_SCHED_CTX_HYPERVISOR@
+Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_LDFLAGS@ @STARPU_OPENCL_LDFLAGS@ @STARPU_SC_HYPERVISOR@
 Libs.private: @LDFLAGS@ @LIBS@
-Requires: @HWLOC_REQUIRES@
+Requires: @HWLOC_REQUIRES@

+ 2 - 2
sc_hypervisor/include/sc_hypervisor.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef SCHED_CTX_HYPERVISOR_H
-#define SCHED_CTX_HYPERVISOR_H
+#ifndef SC_HYPERVISOR_H
+#define SC_HYPERVISOR_H
 
 #include <starpu.h>
 #include <sc_hypervisor_config.h>

+ 2 - 2
sc_hypervisor/include/sc_hypervisor_config.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef SCHED_CTX_HYPERVISOR_CONFIG_H
-#define SCHED_CTX_HYPERVISOR_CONFIG_H
+#ifndef SC_HYPERVISOR_CONFIG_H
+#define SC_HYPERVISOR_CONFIG_H
 
 #include <sc_hypervisor.h>
 

+ 2 - 2
sc_hypervisor/include/sc_hypervisor_lp.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef SCHED_CTX_HYPERVISOR_LP_H
-#define SCHED_CTX_HYPERVISOR_LP_H
+#ifndef SC_HYPERVISOR_LP_H
+#define SC_HYPERVISOR_LP_H
 
 #include <sc_hypervisor.h>
 #include <starpu_config.h>

+ 2 - 2
sc_hypervisor/include/sc_hypervisor_monitoring.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef SCHED_CTX_HYPERVISOR_MONITORING_H
-#define SCHED_CTX_HYPERVISOR_MONITORING_H
+#ifndef SC_HYPERVISOR_MONITORING_H
+#define SC_HYPERVISOR_MONITORING_H
 
 #include <sc_hypervisor.h>
 

+ 2 - 2
sc_hypervisor/include/sc_hypervisor_policy.h

@@ -14,8 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#ifndef SCHED_CTX_HYPERVISOR_POLICY_H
-#define SCHED_CTX_HYPERVISOR_POLICY_H
+#ifndef SC_HYPERVISOR_POLICY_H
+#define SC_HYPERVISOR_POLICY_H
 
 #include <sc_hypervisor.h>
 

+ 4 - 4
src/core/jobs.c

@@ -144,14 +144,14 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 
 	_STARPU_PTHREAD_MUTEX_UNLOCK(&j->sync_mutex);
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	int workerid = starpu_worker_get_id();
 	int i;
 	size_t data_size = 0;
 	for(i = 0; i < STARPU_NMAXBUFS; i++)
 		if(task->handles[i] != NULL)
 			data_size += _starpu_data_get_size(task->handles[i]);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 	/* We release handle reference count */
 	if (task->cl)
@@ -225,9 +225,9 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 	if(j->task_size == 1 && task->cl != NULL && !j->internal)
 	{
 		_starpu_sched_post_exec_hook(task);
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 		_starpu_sched_ctx_call_poped_task_cb(workerid, task, data_size, j->footprint);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 	}
 
 	_STARPU_TRACE_TASK_DONE(j);

+ 7 - 7
src/core/sched_ctx.c

@@ -424,7 +424,7 @@ unsigned starpu_sched_ctx_create_inside_interval(const char *policy_name, const
 	sched_ctx->max_ngpus = max_ngpus;
 
 	_starpu_update_workers_without_ctx(sched_ctx->workers->workerids, sched_ctx->workers->nworkers, sched_ctx->id, 0);
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	sched_ctx->perf_counters = NULL;
 #endif
 	return sched_ctx->id;
@@ -437,13 +437,13 @@ unsigned starpu_sched_ctx_create(const char *policy_name, int *workerids,
 	sched_ctx = _starpu_create_sched_ctx(policy_name, workerids, nworkers, 0, sched_name);
 
 	_starpu_update_workers_with_ctx(sched_ctx->workers->workerids, sched_ctx->workers->nworkers, sched_ctx->id);
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	sched_ctx->perf_counters = NULL;
 #endif
 	return sched_ctx->id;
 }
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, struct starpu_sched_ctx_performance_counters *perf_counters)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
@@ -472,11 +472,11 @@ static void _starpu_delete_sched_ctx(struct _starpu_sched_ctx *sched_ctx)
 void starpu_sched_ctx_delete(unsigned sched_ctx_id)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	if(sched_ctx != NULL && sched_ctx_id != 0 && sched_ctx_id != STARPU_NMAX_SCHED_CTXS
 	   && sched_ctx->perf_counters != NULL)
 		sched_ctx->perf_counters->notify_delete_context(sched_ctx_id);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 	unsigned inheritor_sched_ctx_id = sched_ctx->inheritor;
 	struct _starpu_sched_ctx *inheritor_sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx->inheritor);
@@ -1037,7 +1037,7 @@ void starpu_sched_ctx_finished_submit(unsigned sched_ctx_id)
 	return;
 }
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 
 void _starpu_sched_ctx_call_poped_task_cb(int workerid, struct starpu_task *task, size_t data_size, uint32_t footprint)
 {
@@ -1055,7 +1055,7 @@ void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id)
 	   && sched_ctx->perf_counters != NULL)
 		sched_ctx->perf_counters->notify_pushed_task(sched_ctx_id, workerid);
 }
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 int starpu_sched_get_min_priority(void)
 {

+ 4 - 4
src/core/sched_ctx.h

@@ -92,10 +92,10 @@ struct _starpu_sched_ctx
      	int min_priority;
 	int max_priority;
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	/* a structure containing a series of performance counters determining the resize procedure */
 	struct starpu_sched_ctx_performance_counters *perf_counters;
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 };
 
 struct _starpu_machine_config;
@@ -144,9 +144,9 @@ void _starpu_worker_gets_out_of_ctx(unsigned sched_ctx_id, struct _starpu_worker
 /* Check if the worker belongs to another sched_ctx */
 unsigned _starpu_worker_belongs_to_a_sched_ctx(int workerid, unsigned sched_ctx_id);
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 /* Notifies the hypervisor that a tasks was poped from the workers' list */
 void _starpu_sched_ctx_call_poped_task_cb(int workerid, struct starpu_task *task, size_t data_size, uint32_t footprint);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 #endif // __SCHED_CONTEXT_H__

+ 6 - 6
src/core/sched_policy.c

@@ -222,9 +222,9 @@ static int _starpu_push_task_on_specific_worker(struct starpu_task *task, int wo
 			sched_ctx->sched_policy->push_task_notify(task, workerid, sched_ctx->id);
 	}
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	starpu_sched_ctx_call_pushed_task_cb(workerid, task->sched_ctx);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 	if (is_basic_worker)
 	{
@@ -605,7 +605,7 @@ pick:
 		}
 	  }
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	struct _starpu_sched_ctx *sched_ctx = NULL;
 	struct starpu_sched_ctx_performance_counters *perf_counters = NULL;
 	int j;
@@ -624,7 +624,7 @@ pick:
 			}
 		}
 	}
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 
 	if (!task)
@@ -716,11 +716,11 @@ void _starpu_sched_post_exec_hook(struct starpu_task *task)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(task->sched_ctx);
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	if(task->hypervisor_tag > 0 && sched_ctx != NULL &&
 	   sched_ctx->id != 0 && sched_ctx->perf_counters != NULL)
 		sched_ctx->perf_counters->notify_post_exec_hook(sched_ctx->id, task->hypervisor_tag);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 	if (sched_ctx->sched_policy->post_exec_hook)
 		sched_ctx->sched_policy->post_exec_hook(task);

+ 1 - 1
src/core/task.c

@@ -213,7 +213,7 @@ int _starpu_submit_job(struct _starpu_job *j)
 	_starpu_increment_nsubmitted_tasks();
 	_starpu_increment_nsubmitted_tasks_of_sched_ctx(j->task->sched_ctx);
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(j->task->sched_ctx);
 	if(sched_ctx != NULL && j->task->sched_ctx != _starpu_get_initial_sched_ctx()->id && j->task->sched_ctx != STARPU_NMAX_SCHED_CTXS
 	   && sched_ctx->perf_counters != NULL)

+ 2 - 2
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -275,9 +275,9 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 	starpu_pthread_cond_t *sched_cond;
 	starpu_worker_get_sched_condition(best_workerid, &sched_mutex, &sched_cond);
 
-#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SC_HYPERVISOR
 	starpu_sched_ctx_call_pushed_task_cb(best_workerid, sched_ctx_id);
-#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SC_HYPERVISOR
 
 	_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
 

+ 1 - 1
starpu-1.0.pc.in

@@ -29,6 +29,6 @@ Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@ -DSTARPU_USE_DEPRECATED_ONE_ZERO_API
-Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_OPENCL_LDFLAGS@ @STARPU_CUDA_LDFLAGS@ @STARPU_SCHED_CTX_HYPERVISOR@
+Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_OPENCL_LDFLAGS@ @STARPU_CUDA_LDFLAGS@ @STARPU_SC_HYPERVISOR@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@

+ 1 - 1
starpu-1.1.pc.in

@@ -29,6 +29,6 @@ Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@
-Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_OPENCL_LDFLAGS@ @STARPU_CUDA_LDFLAGS@ @STARPU_SCHED_CTX_HYPERVISOR@
+Libs: -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_OPENCL_LDFLAGS@ @STARPU_CUDA_LDFLAGS@ @STARPU_SC_HYPERVISOR@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@

+ 2 - 2
tools/dev/starpu_check_documented.py

@@ -28,12 +28,12 @@ for docfile in os.listdir('doc/chapters'):
         loadFunctionsAndDatatypes(functions, datatypes, "doc/chapters/"+docfile)
 
 for function in functions:
-    x = os.system("fgrep -l \"" + function[0] + "\" include/*.h mpi/include/*.h starpufft/*h sched_ctx_hypervisor/include/*.h > /dev/null")
+    x = os.system("fgrep -l \"" + function[0] + "\" include/*.h mpi/include/*.h starpufft/*h sc_hypervisor/include/*.h > /dev/null")
     if x != 0:
         print "Function <" + bcolors.FAILURE + function[0] + bcolors.NORMAL + " > documented in <" + function[1] + "> does not exist in StarPU's API"
 
 for datatype in datatypes:
-    x = os.system("fgrep -l \"" + datatype[0] + "\" include/*.h mpi/include/*.h starpufft/*h sched_ctx_hypervisor/include/*.h > /dev/null")
+    x = os.system("fgrep -l \"" + datatype[0] + "\" include/*.h mpi/include/*.h starpufft/*h sc_hypervisor/include/*.h > /dev/null")
     if x != 0:
         print "Datatype <" + bcolors.FAILURE + datatype[0] + bcolors.NORMAL + "> documented in <" + datatype[1] + "> does not exist in StarPU's API"