Andra Hugo 12 роки тому
батько
коміт
380ee600e7

+ 1 - 1
configure.ac

@@ -824,7 +824,7 @@ AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debug mode])],
 AC_MSG_RESULT($enable_debug)
 
 if test x$enable_debug = xyes; then
-	CFLAGS="$CFLAGS -O0 -Werror"
+	CFLAGS="$CFLAGS -O0"
 	AC_DEFINE(STARPU_SPINLOCK_CHECK, [1], [check spinlock use])
 else
 	CFLAGS="-O3 $CFLAGS"

+ 1 - 1
include/starpu_top.h

@@ -209,7 +209,7 @@ void starpu_top_update_data_float(const struct starpu_top_data* data,
 void starpu_top_debug_log(const char* message);
 void starpu_top_debug_lock(const char* message);
 
-int _starpu_top_status_get(void);
+int _starpu_top_status_get();
 
 void _starpu_top_task_prevision(struct starpu_task *task,
 								int devid,

+ 2 - 2
sched_ctx_hypervisor/src/hypervisor_policies/lp_tools.c

@@ -3,7 +3,7 @@
 
 #ifdef HAVE_GLPK_H
 
-static double _glp_get_nworkers_per_ctx(int ns, int nw, double v[ns][nw], double flops[ns], double res[ns][nw], double total_nw[nw])
+static double _glp_get_nworkers_per_ctx(int ns, int nw, double v[ns][nw], double flops[ns], double res[ns][nw], int  total_nw[nw])
 {
 	int s, w;
 	glp_prob *lp;
@@ -272,7 +272,7 @@ void _lp_redistribute_resources_in_ctxs(int ns, int nw, int res_rounded[ns][nw],
 
 			if(w == 1)
 			{
-				unsigned nworkers_ctx = get_nworkers_ctx(sched_ctxs[s], arch);
+				int nworkers_ctx = get_nworkers_ctx(sched_ctxs[s], arch);
 				if(nworkers_ctx > res_rounded[s][w])
 				{
 					int nworkers_to_move = nworkers_ctx - res_rounded[s][w];

+ 5 - 5
sched_ctx_hypervisor/src/hypervisor_policies/policy_tools.c

@@ -83,7 +83,7 @@ int* _get_first_workers_in_list(int *workers, int nall_workers,  unsigned *nwork
 }
 
 /* get first nworkers with the highest idle time in the context */
-int* _get_first_workers(unsigned sched_ctx, unsigned *nworkers, enum starpu_archtype arch)
+int* _get_first_workers(unsigned sched_ctx, int *nworkers, enum starpu_archtype arch)
 {
 	struct sched_ctx_wrapper* sc_w = sched_ctx_hypervisor_get_wrapper(sched_ctx);
 	struct policy_config *config = sched_ctx_hypervisor_get_config(sched_ctx);
@@ -188,7 +188,7 @@ unsigned _get_potential_nworkers(struct policy_config *config, unsigned sched_ct
 /* compute the number of workers that should be moved depending:
    - on the min/max number of workers in a context imposed by the user, 
    - on the resource granularity imposed by the user for the resizing process*/
-unsigned _get_nworkers_to_move(unsigned req_sched_ctx)
+int _get_nworkers_to_move(unsigned req_sched_ctx)
 {
        	struct policy_config *config = sched_ctx_hypervisor_get_config(req_sched_ctx);
 	unsigned nworkers = starpu_get_nworkers_of_sched_ctx(req_sched_ctx);
@@ -241,7 +241,7 @@ unsigned _resize(unsigned sender_sched_ctx, unsigned receiver_sched_ctx, unsigne
 		ret = pthread_mutex_trylock(&act_hypervisor_mutex);
 	if(ret != EBUSY)
 	{					
-		unsigned nworkers_to_move = _get_nworkers_to_move(sender_sched_ctx);
+		int nworkers_to_move = _get_nworkers_to_move(sender_sched_ctx);
 		if(nworkers_to_move > 0)
 		{
 			unsigned poor_sched_ctx = STARPU_NMAX_SCHED_CTXS;
@@ -383,12 +383,12 @@ int _velocity_gap_btw_ctxs()
 }
 
 
-void _get_total_nw(int *workers, int nworkers, int ntypes_of_workers, double total_nw[ntypes_of_workers])
+void _get_total_nw(int *workers, int nworkers, int ntypes_of_workers, int total_nw[ntypes_of_workers])
 {
 	int current_nworkers = workers == NULL ? starpu_worker_get_count() : nworkers;
 	int w;
 	for(w = 0; w < ntypes_of_workers; w++)
-		total_nw[w] = 0.0;
+		total_nw[w] = 0;
 
 	for(w = 0; w < current_nworkers; w++)
 	{

+ 3 - 3
sched_ctx_hypervisor/src/hypervisor_policies/policy_tools.h

@@ -20,13 +20,13 @@ struct bound_task_pool
 
 unsigned _find_poor_sched_ctx(unsigned req_sched_ctx, int nworkers_to_move);
 
-int* _get_first_workers(unsigned sched_ctx, unsigned *nworkers, enum starpu_archtype arch);
+int* _get_first_workers(unsigned sched_ctx, int *nworkers, enum starpu_archtype arch);
 
 int* _get_first_workers_in_list(int *workers, int nall_workers,  unsigned *nworkers, enum starpu_archtype arch);
 
 unsigned _get_potential_nworkers(struct policy_config *config, unsigned sched_ctx, enum starpu_archtype arch);
 
-unsigned _get_nworkers_to_move(unsigned req_sched_ctx);
+int _get_nworkers_to_move(unsigned req_sched_ctx);
 
 unsigned _resize(unsigned sender_sched_ctx, unsigned receiver_sched_ctx, unsigned force_resize, unsigned now);
 
@@ -38,4 +38,4 @@ double _get_velocity_per_worker_type(struct sched_ctx_wrapper* sc_w, enum starpu
 
 int _velocity_gap_btw_ctxs(void);
 
-void _get_total_nw(int *workers, int nworkers, int ntypes_of_workers, double total_nw[ntypes_of_workers]);
+void _get_total_nw(int *workers, int nworkers, int ntypes_of_workers, int total_nw[ntypes_of_workers]);