Browse Source

sc_hypervisor: fix cppcheck warnings

Nathalie Furmento 8 years ago
parent
commit
514a24fefe

+ 4 - 4
sc_hypervisor/examples/app_driven_test/app_driven_test.c

@@ -49,7 +49,7 @@ void cpu_func(__attribute__((unused))void *buffers[], void *cl_arg)
 		pthread_mutex_unlock(&mut[params->sched_ctx - 1]);
 		pthread_mutex_unlock(&mut[params->sched_ctx - 1]);
 	}
 	}
 	if(params->task_tag != 0)
 	if(params->task_tag != 0)
-		FPRINTF(stdout, "Task with tag %d executed in ctx = %d %d counter_tests\n", params->task_tag, params->sched_ctx, val[params->sched_ctx - 1]);
+		FPRINTF(stdout, "Task with tag %d executed in ctx = %u %u counter_tests\n", params->task_tag, params->sched_ctx, val[params->sched_ctx - 1]);
 }
 }
 
 
 struct starpu_codelet cl = {0};
 struct starpu_codelet cl = {0};
@@ -85,7 +85,7 @@ void* submit_tasks_thread(void *arg)
 						   SC_HYPERVISOR_MIN_WORKERS, 2,
 						   SC_HYPERVISOR_MIN_WORKERS, 2,
 						   SC_HYPERVISOR_MAX_WORKERS, 12,
 						   SC_HYPERVISOR_MAX_WORKERS, 12,
 						   SC_HYPERVISOR_NULL);
 						   SC_HYPERVISOR_NULL);
-			printf("require resize for sched_ctx %d at tag %d\n", sched_ctx, tag);
+			printf("require resize for sched_ctx %u at tag %d\n", sched_ctx, tag);
 			/* specify that the contexts should be resized when the task having this
 			/* specify that the contexts should be resized when the task having this
 			   particular tag will finish executing */
 			   particular tag will finish executing */
 			sc_hypervisor_post_resize_request(sched_ctx, tag);
 			sc_hypervisor_post_resize_request(sched_ctx, tag);
@@ -167,7 +167,7 @@ int main()
 	starpu_shutdown();
 	starpu_shutdown();
 	sc_hypervisor_shutdown();
 	sc_hypervisor_shutdown();
 
 
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
 	return 0;
 	return 0;
 }
 }

+ 3 - 3
sc_hypervisor/examples/hierarchical_ctxs/resize_hierarchical_ctxs.c

@@ -156,8 +156,8 @@ int main()
 	starpu_shutdown();
 	starpu_shutdown();
 	sc_hypervisor_shutdown();
 	sc_hypervisor_shutdown();
 
 
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx3, val[2], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx3, val[2], NTASKS*NINCR);
 	return 0;
 	return 0;
 }
 }

+ 2 - 2
sc_hypervisor/examples/lp_test/lp_resize_test.c

@@ -131,7 +131,7 @@ int main()
 	starpu_shutdown();
 	starpu_shutdown();
 	sc_hypervisor_shutdown();
 	sc_hypervisor_shutdown();
 
 
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
 	return 0;
 	return 0;
 }
 }

+ 2 - 2
sc_hypervisor/examples/lp_test/lp_test.c

@@ -130,7 +130,7 @@ int main()
 	starpu_shutdown();
 	starpu_shutdown();
 	sc_hypervisor_shutdown();
 	sc_hypervisor_shutdown();
 
 
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
-	FPRINTF(stdout, "ctx = %d executed %d counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx1, val[0], NTASKS*NINCR);
+	FPRINTF(stdout, "ctx = %u executed %u counter_tests out of %d \n", sched_ctx2, val[1], NTASKS*NINCR);
 	return 0;
 	return 0;
 }
 }

+ 1 - 1
sc_hypervisor/src/hypervisor_policies/feft_lp_policy.c

@@ -27,7 +27,7 @@ static void _try_resizing(unsigned *sched_ctxs, int nsched_ctxs, int *workers, i
 	/* for vite */
 	/* for vite */
 	int ns = sched_ctxs == NULL ? sc_hypervisor_get_nsched_ctxs() : nsched_ctxs;
 	int ns = sched_ctxs == NULL ? sc_hypervisor_get_nsched_ctxs() : nsched_ctxs;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-	printf("resize_no = %d %d ctxs\n", resize_no, ns);
+	printf("resize_no = %u %d ctxs\n", resize_no, ns);
 #endif
 #endif
 	if(ns <= 0) return;
 	if(ns <= 0) return;
 
 

+ 1 - 1
sc_hypervisor/src/hypervisor_policies/gflops_rate_policy.c

@@ -259,7 +259,7 @@ static void gflops_rate_resize(unsigned sched_ctx)
 				struct sc_hypervisor_policy_config* config = sc_hypervisor_get_config(sched_ctx);
 				struct sc_hypervisor_policy_config* config = sc_hypervisor_get_config(sched_ctx);
 				config->min_nworkers = 0;
 				config->min_nworkers = 0;
 				config->max_nworkers = 0;
 				config->max_nworkers = 0;
-				printf("ctx %d finished & gives away the res to %d; slow_left %lf\n", sched_ctx, slowest_sched_ctx, slowest_flops_left_pct);
+				printf("ctx %u finished & gives away the res to %d; slow_left %lf\n", sched_ctx, slowest_sched_ctx, slowest_flops_left_pct);
 				sc_hypervisor_policy_resize(sched_ctx, slowest_sched_ctx, 1, 1);
 				sc_hypervisor_policy_resize(sched_ctx, slowest_sched_ctx, 1, 1);
 				sc_hypervisor_stop_resize(slowest_sched_ctx);
 				sc_hypervisor_stop_resize(slowest_sched_ctx);
 			}
 			}

+ 3 - 3
sc_hypervisor/src/hypervisor_policies/perf_count_policy.c

@@ -145,13 +145,13 @@ void print_results_for_ctx(unsigned sched_ctx, struct starpu_task *task)
         /* total_branch_instr[sched_ctx] += curr_total_branch_instr; */
         /* total_branch_instr[sched_ctx] += curr_total_branch_instr; */
         total_fps[sched_ctx] += curr_total_fps;
         total_fps[sched_ctx] += curr_total_fps;
 
 
-        printf("%d: Instrs %lf k curr instr %lf k\n", sched_ctx, (double)total_instr[sched_ctx]/1000,
+        printf("%u: Instrs %lf k curr instr %lf k\n", sched_ctx, (double)total_instr[sched_ctx]/1000,
                (double)curr_total_instr/1000);
                (double)curr_total_instr/1000);
-        printf("%d: Fps %lf k curr fps %lf k\n",  sched_ctx,
+        printf("%u: Fps %lf k curr fps %lf k\n",  sched_ctx,
 	       (double)total_fps[sched_ctx]/1000,
 	       (double)total_fps[sched_ctx]/1000,
 	       (double)curr_total_fps/1000);
 	       (double)curr_total_fps/1000);
 
 
-	printf("%d: Task Flops %lf k %s \n", sched_ctx, task->flops/1000, (task->cl && task->cl->model) ? task->cl->model->symbol : "task null");
+	printf("%u: Task Flops %lf k %s \n", sched_ctx, task->flops/1000, (task->cl && task->cl->model) ? task->cl->model->symbol : "task null");
         printf("-------------------------------------------\n");
         printf("-------------------------------------------\n");
 }
 }
 
 

+ 12 - 13
sc_hypervisor/src/policies_utils/dichotomy.c

@@ -1,16 +1,16 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011 - 2013  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                                                             
+ * Copyright (C) 2011 - 2013  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
  * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.     
- *                                                                                                                                         
+ * your option) any later version.
+ *
  * StarPU is distributed in the hope that it will be useful, but
  * StarPU is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *                                                        
+ *
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
@@ -37,7 +37,7 @@ unsigned sc_hypervisor_lp_execute_dichotomy(int ns, int nw, double w_in_s[ns][nw
 	double potential_tmid = tmid;
 	double potential_tmid = tmid;
 	double threashold = tmax*0.1;
 	double threashold = tmax*0.1;
 	gettimeofday(&start_time, NULL);
 	gettimeofday(&start_time, NULL);
-	
+
 	/* we fix tmax and we do not treat it as an unknown
 	/* we fix tmax and we do not treat it as an unknown
 	   we just vary by dichotomy its values*/
 	   we just vary by dichotomy its values*/
 	while(1)
 	while(1)
@@ -76,10 +76,10 @@ unsigned sc_hypervisor_lp_execute_dichotomy(int ns, int nw, double w_in_s[ns][nw
 		if(has_sol)
 		if(has_sol)
 		{
 		{
 			/* if the difference between tmax and tmid is smaller than
 			/* if the difference between tmax and tmid is smaller than
-			   a given threashold there is no point in searching more 
+			   a given threashold there is no point in searching more
 			   precision */
 			   precision */
 			tmax = tmid;
 			tmax = tmid;
-			potential_tmid = tmin + ((tmax-tmin)/2.0); 
+			potential_tmid = tmin + ((tmax-tmin)/2.0);
 			if((tmax - potential_tmid) < threashold)
 			if((tmax - potential_tmid) < threashold)
 			{
 			{
 				printf("had_sol but stop doing it for tmin %lf tmax %lf and potential tmid %lf \n", tmin, tmax, potential_tmid);
 				printf("had_sol but stop doing it for tmin %lf tmax %lf and potential tmid %lf \n", tmin, tmax, potential_tmid);
@@ -92,7 +92,7 @@ unsigned sc_hypervisor_lp_execute_dichotomy(int ns, int nw, double w_in_s[ns][nw
 			/* if we previously found a good sol and we keep failing
 			/* if we previously found a good sol and we keep failing
 			   we stop searching for a better sol */
 			   we stop searching for a better sol */
 			tmin = tmid;
 			tmin = tmid;
-			potential_tmid = tmin + ((tmax-tmin)/2.0); 
+			potential_tmid = tmin + ((tmax-tmin)/2.0);
 			if((tmax - potential_tmid) < threashold)
 			if((tmax - potential_tmid) < threashold)
 			{
 			{
 				printf("didn't have sol but stop doing it for tmin %lf tmax %lf and potential tmid %lf \n", tmin, tmax, potential_tmid);
 				printf("didn't have sol but stop doing it for tmin %lf tmax %lf and potential tmid %lf \n", tmin, tmax, potential_tmid);
@@ -111,7 +111,7 @@ unsigned sc_hypervisor_lp_execute_dichotomy(int ns, int nw, double w_in_s[ns][nw
 		res = lp_estimated_distrib_func(ns, nw, w_in_s, solve_lp_integer, found_tmid, specific_data);
 		res = lp_estimated_distrib_func(ns, nw, w_in_s, solve_lp_integer, found_tmid, specific_data);
 		found_sol = (res != 0.0);
 		found_sol = (res != 0.0);
 	}
 	}
-	printf("found sol %d for tmid %lf\n", found_sol, found_tmid);
+	printf("found sol %u for tmid %lf\n", found_sol, found_tmid);
 	gettimeofday(&end_time, NULL);
 	gettimeofday(&end_time, NULL);
 
 
 	long diff_s = end_time.tv_sec  - start_time.tv_sec;
 	long diff_s = end_time.tv_sec  - start_time.tv_sec;
@@ -121,4 +121,3 @@ unsigned sc_hypervisor_lp_execute_dichotomy(int ns, int nw, double w_in_s[ns][nw
 
 
 	return found_sol;
 	return found_sol;
 }
 }
-

+ 11 - 11
sc_hypervisor/src/policies_utils/lp_programs.c

@@ -30,7 +30,7 @@ double sc_hypervisor_lp_simulate_distrib_tasks(int ns, int nw, int nt, double w_
 	int t, w, s;
 	int t, w, s;
 	glp_prob *lp;
 	glp_prob *lp;
 
 
-	
+
 	lp = glp_create_prob();
 	lp = glp_create_prob();
 	glp_set_prob_name(lp, "StarPU theoretical bound");
 	glp_set_prob_name(lp, "StarPU theoretical bound");
 	glp_set_obj_dir(lp, GLP_MAX);
 	glp_set_obj_dir(lp, GLP_MAX);
@@ -262,7 +262,7 @@ double sc_hypervisor_lp_simulate_distrib_tasks(int ns, int nw, int nt, double w_
 	return res;
 	return res;
 }
 }
 
 
-double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw], double flops[ns], double res[ns][nw], 
+double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw], double flops[ns], double res[ns][nw],
 					       int  total_nw[nw], unsigned sched_ctxs[ns], double last_vmax)
 					       int  total_nw[nw], unsigned sched_ctxs[ns], double last_vmax)
 {
 {
 	int integer = 1;
 	int integer = 1;
@@ -333,7 +333,7 @@ double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw],
 					else
 					else
 						glp_set_col_bnds(lp, n, GLP_DB, config->min_nworkers*1.0, total_nw[w]*1.0);
 						glp_set_col_bnds(lp, n, GLP_DB, config->min_nworkers*1.0, total_nw[w]*1.0);
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-					printf("%d****************don't consider max %d but total %d in lp\n", sched_ctxs[s], config->max_nworkers, total_nw[w]);
+					printf("%u****************don't consider max %d but total %d in lp\n", sched_ctxs[s], config->max_nworkers, total_nw[w]);
 #endif
 #endif
 				}
 				}
 			}
 			}
@@ -434,7 +434,7 @@ double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw],
 		/*sum(all gpus) = 3*/
 		/*sum(all gpus) = 3*/
 		if(w == 0)
 		if(w == 0)
 			glp_set_row_bnds(lp, ns+w+1, GLP_FX, total_nw[0], total_nw[0]);
 			glp_set_row_bnds(lp, ns+w+1, GLP_FX, total_nw[0], total_nw[0]);
-		
+
 		/*sum(all cpus) = 9*/
 		/*sum(all cpus) = 9*/
 		if(w == 1)
 		if(w == 1)
 			glp_set_row_bnds(lp, ns+w+1, GLP_FX, total_nw[1], total_nw[1]);
 			glp_set_row_bnds(lp, ns+w+1, GLP_FX, total_nw[1], total_nw[1]);
@@ -461,7 +461,7 @@ double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw],
         if(stat == GLP_NOFEAS)
         if(stat == GLP_NOFEAS)
         {
         {
                 glp_delete_prob(lp);
                 glp_delete_prob(lp);
-		printf("no_sol\n");                                                                                                                                                             
+		printf("no_sol\n");
                 lp = NULL;
                 lp = NULL;
                 return 0.0;
                 return 0.0;
         }
         }
@@ -477,7 +477,7 @@ double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw],
                 /* if we don't have a solution return */
                 /* if we don't have a solution return */
                 if(stat == GLP_NOFEAS)
                 if(stat == GLP_NOFEAS)
                 {
                 {
-			printf("no int sol\n");                                                                                                                                                 
+			printf("no int sol\n");
                         glp_delete_prob(lp);
                         glp_delete_prob(lp);
                         lp = NULL;
                         lp = NULL;
                         return 0.0;
                         return 0.0;
@@ -508,7 +508,7 @@ double sc_hypervisor_lp_simulate_distrib_flops(int ns, int nw, double v[ns][nw],
 	return vmax;
 	return vmax;
 }
 }
 
 
-double sc_hypervisor_lp_simulate_distrib_flops_on_sample(int ns, int nw, double final_w_in_s[ns][nw], unsigned is_integer, double tmax, 
+double sc_hypervisor_lp_simulate_distrib_flops_on_sample(int ns, int nw, double final_w_in_s[ns][nw], unsigned is_integer, double tmax,
 							 double **speed, double flops[ns], double **final_flops_on_w)
 							 double **speed, double flops[ns], double **final_flops_on_w)
 {
 {
 	double w_in_s[ns][nw];
 	double w_in_s[ns][nw];
@@ -531,14 +531,14 @@ double sc_hypervisor_lp_simulate_distrib_flops_on_sample(int ns, int nw, double
 		double ar[ne];
 		double ar[ne];
 
 
 
 
-		/* Variables: number of flops assigned to worker w in context s, and 
+		/* Variables: number of flops assigned to worker w in context s, and
 		 the acknwoledgment that the worker w belongs to the context s */
 		 the acknwoledgment that the worker w belongs to the context s */
 		glp_add_cols(lp, 2*nw*ns);
 		glp_add_cols(lp, 2*nw*ns);
 #define colnum_sample(w, s) ((s)*nw+(w)+1)
 #define colnum_sample(w, s) ((s)*nw+(w)+1)
 		for(s = 0; s < ns; s++)
 		for(s = 0; s < ns; s++)
 			for(w = 0; w < nw; w++)
 			for(w = 0; w < nw; w++)
 				glp_set_obj_coef(lp, nw*ns+colnum_sample(w,s), 1.);
 				glp_set_obj_coef(lp, nw*ns+colnum_sample(w,s), 1.);
-		
+
 		for(s = 0; s < ns; s++)
 		for(s = 0; s < ns; s++)
 			for(w = 0; w < nw; w++)
 			for(w = 0; w < nw; w++)
 			{
 			{
@@ -580,7 +580,7 @@ double sc_hypervisor_lp_simulate_distrib_flops_on_sample(int ns, int nw, double
 				ar[n] = 1 / speed[s][w];
 				ar[n] = 1 / speed[s][w];
 
 
 				n++;
 				n++;
-				
+
 				/* x[s][w] = 1 | 0 */
 				/* x[s][w] = 1 | 0 */
 				ia[n] = curr_row_idx+s*nw+w+1;
 				ia[n] = curr_row_idx+s*nw+w+1;
 				ja[n] = nw*ns+colnum_sample(w,s);
 				ja[n] = nw*ns+colnum_sample(w,s);
@@ -627,7 +627,7 @@ double sc_hypervisor_lp_simulate_distrib_flops_on_sample(int ns, int nw, double
 				ar[n] = 1;
 				ar[n] = 1;
 				n++;
 				n++;
 			}
 			}
-			if(is_integer)				
+			if(is_integer)
 				glp_set_row_bnds(lp, curr_row_idx+w+1, GLP_FX, 1, 1);
 				glp_set_row_bnds(lp, curr_row_idx+w+1, GLP_FX, 1, 1);
 			else
 			else
 				glp_set_row_bnds(lp, curr_row_idx+w+1, GLP_FX, 1.0, 1.0);
 				glp_set_row_bnds(lp, curr_row_idx+w+1, GLP_FX, 1.0, 1.0);

+ 63 - 63
sc_hypervisor/src/policies_utils/lp_tools.c

@@ -20,14 +20,14 @@
 #include "sc_hypervisor_intern.h"
 #include "sc_hypervisor_intern.h"
 #include <starpu_config.h>
 #include <starpu_config.h>
 
 
-double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_workers, double res[nsched_ctxs][ntypes_of_workers], 
+double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_workers, double res[nsched_ctxs][ntypes_of_workers],
 					     int total_nw[ntypes_of_workers], struct types_of_workers *tw, unsigned *in_sched_ctxs)
 					     int total_nw[ntypes_of_workers], struct types_of_workers *tw, unsigned *in_sched_ctxs)
 {
 {
 	unsigned *sched_ctxs = in_sched_ctxs == NULL ? sc_hypervisor_get_sched_ctxs() : in_sched_ctxs;
 	unsigned *sched_ctxs = in_sched_ctxs == NULL ? sc_hypervisor_get_sched_ctxs() : in_sched_ctxs;
 #ifdef STARPU_HAVE_GLPK_H
 #ifdef STARPU_HAVE_GLPK_H
 	double v[nsched_ctxs][ntypes_of_workers];
 	double v[nsched_ctxs][ntypes_of_workers];
 	double flops[nsched_ctxs];
 	double flops[nsched_ctxs];
-	
+
 /* 	unsigned nhierarchy_levels = sc_hypervisor_get_nhierarchy_levels(); */
 /* 	unsigned nhierarchy_levels = sc_hypervisor_get_nhierarchy_levels(); */
 /* 	if(nhierarchy_levels <= 1) */
 /* 	if(nhierarchy_levels <= 1) */
 	sc_hypervisor_update_resize_interval(sched_ctxs, nsched_ctxs, total_nw[0]);
 	sc_hypervisor_update_resize_interval(sched_ctxs, nsched_ctxs, total_nw[0]);
@@ -41,7 +41,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 		int w;
 		int w;
 		for(w = 0; w < nw; w++)
 		for(w = 0; w < nw; w++)
-			v[i][w] = sc_hypervisor_get_speed(sc_w, sc_hypervisor_get_arch_for_index(w, tw)); 
+			v[i][w] = sc_hypervisor_get_speed(sc_w, sc_hypervisor_get_arch_for_index(w, tw));
 
 
 		double ready_flops = starpu_sched_ctx_get_nready_flops(sc_w->sched_ctx);
 		double ready_flops = starpu_sched_ctx_get_nready_flops(sc_w->sched_ctx);
 		unsigned nhierarchy_levels = sc_hypervisor_get_nhierarchy_levels();
 		unsigned nhierarchy_levels = sc_hypervisor_get_nhierarchy_levels();
@@ -49,7 +49,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 			ready_flops = sc_hypervisor_get_nready_flops_of_all_sons_of_sched_ctx(sc_w->sched_ctx);
 			ready_flops = sc_hypervisor_get_nready_flops_of_all_sons_of_sched_ctx(sc_w->sched_ctx);
 
 
 		int nready_tasks = starpu_sched_ctx_get_nready_tasks(sc_w->sched_ctx);
 		int nready_tasks = starpu_sched_ctx_get_nready_tasks(sc_w->sched_ctx);
-		
+
 		if(sc_w->to_be_sized)
 		if(sc_w->to_be_sized)
 		{
 		{
 			flops[i] = sc_w->remaining_flops/1000000000.0; /* in gflops*/
 			flops[i] = sc_w->remaining_flops/1000000000.0; /* in gflops*/
@@ -73,7 +73,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 		if(flops[i] < 0.0)
 		if(flops[i] < 0.0)
 			flops[i] = 0.0;
 			flops[i] = 0.0;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-		printf("%d: flops %lf remaining flops %lf ready flops %lf nready_tasks %d\n",
+		printf("%u: flops %lf remaining flops %lf ready flops %lf nready_tasks %d\n",
 		       sched_ctxs[i], flops[i], sc_w->remaining_flops/1000000000, ready_flops/1000000000, nready_tasks);
 		       sched_ctxs[i], flops[i], sc_w->remaining_flops/1000000000, ready_flops/1000000000, nready_tasks);
 #endif
 #endif
 
 
@@ -92,11 +92,11 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 			for(i = 0; i < nsched_ctxs; i++)
 			for(i = 0; i < nsched_ctxs; i++)
 			{
 			{
 				sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 				sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
-				
+
 				if(!sc_w->consider_max)
 				if(!sc_w->consider_max)
 				{
 				{
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-					printf("ctx %d: current speed is %lf and compare speed is min %lf max %lf\n", sched_ctxs[i], v[i][w], (0.1*avg_speed), (2*avg_speed));
+					printf("ctx %u: current speed is %lf and compare speed is min %lf max %lf\n", sched_ctxs[i], v[i][w], (0.1*avg_speed), (2*avg_speed));
 #endif
 #endif
 					if(v[i][w] < 0.1*avg_speed || v[i][w] > 2*avg_speed)
 					if(v[i][w] < 0.1*avg_speed || v[i][w] > 2*avg_speed)
 					{
 					{
@@ -104,7 +104,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 						consider_max_for_all = 1;
 						consider_max_for_all = 1;
 					}
 					}
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-					printf("ctx %d consider max %d \n", sched_ctxs[i], sc_w->consider_max);
+					printf("ctx %u consider max %d \n", sched_ctxs[i], sc_w->consider_max);
 #endif
 #endif
 				}
 				}
 
 
@@ -116,7 +116,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 					sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 					sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 					sc_w->consider_max = 1;
 					sc_w->consider_max = 1;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-					printf("ctx %d consider max %d anyway \n", sched_ctxs[i], sc_w->consider_max);
+					printf("ctx %u consider max %d anyway \n", sched_ctxs[i], sc_w->consider_max);
 #endif
 #endif
 				}
 				}
 			}
 			}
@@ -215,7 +215,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 		if(used_cpus < 0.8 * total_nw[0] && nselected > 1)
 		if(used_cpus < 0.8 * total_nw[0] && nselected > 1)
 		{
 		{
 			double old_ret = ret;
 			double old_ret = ret;
-			
+
 			if(nselected <= 0 || nselected == nsched_ctxs)
 			if(nselected <= 0 || nselected == nsched_ctxs)
 			{
 			{
 				nselected = nsched_ctxs;
 				nselected = nsched_ctxs;
@@ -228,10 +228,10 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 			}
 			}
 			else
 			else
 				total_nw[0] = available_cpus;
 				total_nw[0] = available_cpus;
-			
+
 			double selected_res[nselected][ntypes_of_workers];
 			double selected_res[nselected][ntypes_of_workers];
 			ret = sc_hypervisor_lp_simulate_distrib_flops(nselected, ntypes_of_workers, selected_v, selected_flops, selected_res, total_nw, selected_sched_ctxs, ret);
 			ret = sc_hypervisor_lp_simulate_distrib_flops(nselected, ntypes_of_workers, selected_v, selected_flops, selected_res, total_nw, selected_sched_ctxs, ret);
-			
+
 			if(ret != 0)
 			if(ret != 0)
 			{
 			{
 				int j;
 				int j;
@@ -252,7 +252,7 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 
 
 	}
 	}
 
 
-	/* if the lp could not give any workers to any context 
+	/* if the lp could not give any workers to any context
 	   just split the workers btw the contexts */
 	   just split the workers btw the contexts */
 	if(ret == 0.0)
 	if(ret == 0.0)
 	{
 	{
@@ -290,22 +290,22 @@ double sc_hypervisor_lp_get_nworkers_per_ctx(int nsched_ctxs, int ntypes_of_work
 				break;
 				break;
 			}
 			}
 		}
 		}
-		
+
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[i]);
-		
-/* if the hypervisor gave 0 workers to a context but the context still 
+
+/* if the hypervisor gave 0 workers to a context but the context still
    has some last flops or a ready task that does not even have any flops
    has some last flops or a ready task that does not even have any flops
    we give a worker (in shared mode) to the context in order to leave him
    we give a worker (in shared mode) to the context in order to leave him
    finish its work = we give -1.0 value instead of 0.0 and further on in
    finish its work = we give -1.0 value instead of 0.0 and further on in
    the distribution function we take this into account and revert the variable
    the distribution function we take this into account and revert the variable
-   to its 0.0 value */ 
+   to its 0.0 value */
 //		if(no_workers && (flops[i] != 0.0 || sc_w->nready_tasks > 0))
 //		if(no_workers && (flops[i] != 0.0 || sc_w->nready_tasks > 0))
 		if(no_workers)
 		if(no_workers)
 		{
 		{
 			for(w = 0; w < nw; w++)
 			for(w = 0; w < nw; w++)
 				res[i][w] = -1.0;
 				res[i][w] = -1.0;
 		}
 		}
-			
+
 //			if(optimal_v != 0.0)
 //			if(optimal_v != 0.0)
 		_set_optimal_v(sched_ctxs[i], optimal_v);
 		_set_optimal_v(sched_ctxs[i], optimal_v);
 	}
 	}
@@ -382,14 +382,14 @@ void sc_hypervisor_lp_round_double_to_int(int ns, int nw, double res[ns][nw], in
 					}
 					}
 				}
 				}
 			}
 			}
-			else 
+			else
 				res_rounded[s][w] = x;
 				res_rounded[s][w] = x;
 		}
 		}
 	}
 	}
 }
 }
 
 
-void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched_ctx_idx, 
-				   int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS], 
+void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched_ctx_idx,
+				   int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS],
 				   int tmp_nw_add[nw], int tmp_workers_add[nw][STARPU_NMAXWORKERS],
 				   int tmp_nw_add[nw], int tmp_workers_add[nw][STARPU_NMAXWORKERS],
 				   int res_rounded[ns][nw], double res[ns][nw], struct types_of_workers *tw)
 				   int res_rounded[ns][nw], double res[ns][nw], struct types_of_workers *tw)
 {
 {
@@ -404,8 +404,8 @@ void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched
 	for(w = 0; w < nw; w++)
 	for(w = 0; w < nw; w++)
 	{
 	{
 		enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
 		enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
-		
-		if(arch == STARPU_CPU_WORKER) 
+
+		if(arch == STARPU_CPU_WORKER)
 		{
 		{
 			int nworkers_ctx = sc_hypervisor_get_nworkers_ctx(sched_ctx, arch);
 			int nworkers_ctx = sc_hypervisor_get_nworkers_ctx(sched_ctx, arch);
 			if(nworkers_ctx > res_rounded[sched_ctx_idx][w])
 			if(nworkers_ctx > res_rounded[sched_ctx_idx][w])
@@ -444,7 +444,7 @@ void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched
 						int i;
 						int i;
 						for(i = 0; i < x; i++)
 						for(i = 0; i < x; i++)
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[i];
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[i];
-						
+
 					}
 					}
 					free(workers_to_move);
 					free(workers_to_move);
 				}
 				}
@@ -457,13 +457,13 @@ void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched
 						int i;
 						int i;
 						for(i = 0; i < x-1; i++)
 						for(i = 0; i < x-1; i++)
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[i];
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[i];
-						
+
 						if(diff > 0.8)
 						if(diff > 0.8)
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[x-1];
 							tmp_workers_move[w][tmp_nw_move[w]++] = workers_to_move[x-1];
 						else
 						else
 							if(diff > 0.3)
 							if(diff > 0.3)
 								tmp_workers_add[w][tmp_nw_add[w]++] = workers_to_move[x-1];
 								tmp_workers_add[w][tmp_nw_add[w]++] = workers_to_move[x-1];
-						
+
 					}
 					}
 					free(workers_to_move);
 					free(workers_to_move);
 				}
 				}
@@ -472,10 +472,10 @@ void _lp_find_workers_to_give_away(int nw, int ns, unsigned sched_ctx, int sched
 	}
 	}
 }
 }
 
 
-void _lp_find_workers_to_accept(int nw, int ns, unsigned sched_ctx, int sched_ctx_idx, 
-				int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS], 
+void _lp_find_workers_to_accept(int nw, int ns, unsigned sched_ctx, int sched_ctx_idx,
+				int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS],
 				int tmp_nw_add[nw], int tmp_workers_add[nw][STARPU_NMAXWORKERS],
 				int tmp_nw_add[nw], int tmp_workers_add[nw][STARPU_NMAXWORKERS],
-				int *nw_move, int workers_move[STARPU_NMAXWORKERS], 
+				int *nw_move, int workers_move[STARPU_NMAXWORKERS],
 				int *nw_add, int workers_add[STARPU_NMAXWORKERS],
 				int *nw_add, int workers_add[STARPU_NMAXWORKERS],
 				int res_rounded[ns][nw], double res[ns][nw], struct types_of_workers *tw)
 				int res_rounded[ns][nw], double res[ns][nw], struct types_of_workers *tw)
 {
 {
@@ -484,7 +484,7 @@ void _lp_find_workers_to_accept(int nw, int ns, unsigned sched_ctx, int sched_ct
 	for(w = 0; w < nw; w++)
 	for(w = 0; w < nw; w++)
 	{
 	{
 		enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
 		enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
-		
+
 		int nw_ctx2 = sc_hypervisor_get_nworkers_ctx(sched_ctx, arch);
 		int nw_ctx2 = sc_hypervisor_get_nworkers_ctx(sched_ctx, arch);
 		int nw_needed = res_rounded[sched_ctx_idx][w] - nw_ctx2;
 		int nw_needed = res_rounded[sched_ctx_idx][w] - nw_ctx2;
 
 
@@ -504,8 +504,8 @@ void _lp_find_workers_to_accept(int nw, int ns, unsigned sched_ctx, int sched_ct
 			}
 			}
 			tmp_nw_move[w] -=  *nw_move;
 			tmp_nw_move[w] -=  *nw_move;
 		}
 		}
-		
-		
+
+
 		double needed = res[sched_ctx_idx][w] - (nw_ctx2 * 1.0);
 		double needed = res[sched_ctx_idx][w] - (nw_ctx2 * 1.0);
 		int x = floor(needed);
 		int x = floor(needed);
 		double x_double = (double)x;
 		double x_double = (double)x;
@@ -529,7 +529,7 @@ void _lp_find_workers_to_accept(int nw, int ns, unsigned sched_ctx, int sched_ct
 	}
 	}
 }
 }
 
 
-void _lp_find_workers_to_remove(int nw, int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS], 
+void _lp_find_workers_to_remove(int nw, int tmp_nw_move[nw], int tmp_workers_move[nw][STARPU_NMAXWORKERS],
 				int *nw_move, int workers_move[STARPU_NMAXWORKERS])
 				int *nw_move, int workers_move[STARPU_NMAXWORKERS])
 {
 {
 	int w;
 	int w;
@@ -549,7 +549,7 @@ void _lp_find_workers_to_remove(int nw, int tmp_nw_move[nw], int tmp_workers_mov
 						break;
 						break;
 				}
 				}
 			}
 			}
-			
+
 		}
 		}
 	}
 	}
 }
 }
@@ -564,9 +564,9 @@ void sc_hypervisor_lp_redistribute_resources_in_ctxs(int ns, int nw, int res_rou
 
 
 		int tmp_workers_add[nw][STARPU_NMAXWORKERS];
 		int tmp_workers_add[nw][STARPU_NMAXWORKERS];
 		int tmp_nw_add[nw];
 		int tmp_nw_add[nw];
-		
 
 
-		for(w = 0; w < nw; w++)		
+
+		for(w = 0; w < nw; w++)
 		{
 		{
 			tmp_nw_move[w] = 0;
 			tmp_nw_move[w] = 0;
 			tmp_nw_add[w] = 0;
 			tmp_nw_add[w] = 0;
@@ -579,30 +579,30 @@ void sc_hypervisor_lp_redistribute_resources_in_ctxs(int ns, int nw, int res_rou
 		}
 		}
 
 
 		/* find workers that ctx s has to give away */
 		/* find workers that ctx s has to give away */
-		_lp_find_workers_to_give_away(nw, ns, sched_ctxs[s], s, 
-					      tmp_nw_move, tmp_workers_move, 
-					      tmp_nw_add, tmp_workers_add, res_rounded, 
+		_lp_find_workers_to_give_away(nw, ns, sched_ctxs[s], s,
+					      tmp_nw_move, tmp_workers_move,
+					      tmp_nw_add, tmp_workers_add, res_rounded,
 					      res, tw);
 					      res, tw);
 		for(s2 = 0; s2 < ns; s2++)
 		for(s2 = 0; s2 < ns; s2++)
 		{
 		{
 			if(sched_ctxs[s2] != sched_ctxs[s])
 			if(sched_ctxs[s2] != sched_ctxs[s])
 			{
 			{
-				/* find workers that ctx s2 wants to accept from ctx s 
+				/* find workers that ctx s2 wants to accept from ctx s
 				   the rest of it will probably accepted by another ctx */
 				   the rest of it will probably accepted by another ctx */
 				int workers_move[STARPU_NMAXWORKERS];
 				int workers_move[STARPU_NMAXWORKERS];
 				int nw_move = 0;
 				int nw_move = 0;
-				
+
 				int workers_add[STARPU_NMAXWORKERS];
 				int workers_add[STARPU_NMAXWORKERS];
 				int nw_add = 0;
 				int nw_add = 0;
-				
 
 
-				_lp_find_workers_to_accept(nw, ns, sched_ctxs[s2], s2, 
-							   tmp_nw_move, tmp_workers_move, 
+
+				_lp_find_workers_to_accept(nw, ns, sched_ctxs[s2], s2,
+							   tmp_nw_move, tmp_workers_move,
 							   tmp_nw_add, tmp_workers_add,
 							   tmp_nw_add, tmp_workers_add,
-							   &nw_move, workers_move, 
+							   &nw_move, workers_move,
 							   &nw_add, workers_add,
 							   &nw_add, workers_add,
 							   res_rounded, res, tw);
 							   res_rounded, res, tw);
-				
+
 				if(nw_move > 0)
 				if(nw_move > 0)
 				{
 				{
 					sc_hypervisor_move_workers(sched_ctxs[s], sched_ctxs[s2], workers_move, nw_move, !(_sc_hypervisor_use_lazy_resize()));
 					sc_hypervisor_move_workers(sched_ctxs[s], sched_ctxs[s2], workers_move, nw_move, !(_sc_hypervisor_use_lazy_resize()));
@@ -621,8 +621,8 @@ void sc_hypervisor_lp_redistribute_resources_in_ctxs(int ns, int nw, int res_rou
 		   to get rid of them just remove them from ctx s */
 		   to get rid of them just remove them from ctx s */
 		int workers_move[STARPU_NMAXWORKERS];
 		int workers_move[STARPU_NMAXWORKERS];
 		int nw_move = 0;
 		int nw_move = 0;
-				
-		_lp_find_workers_to_remove(nw, tmp_nw_move, tmp_workers_move, 
+
+		_lp_find_workers_to_remove(nw, tmp_nw_move, tmp_workers_move,
 					   &nw_move, workers_move);
 					   &nw_move, workers_move);
 
 
 		if(nw_move > 0)
 		if(nw_move > 0)
@@ -657,7 +657,7 @@ int _lp_get_unwanted_workers(int *workers_add, int nw_add, unsigned sched_ctx, i
 	return nw_remove;
 	return nw_remove;
 }
 }
 
 
-void sc_hypervisor_lp_distribute_resources_in_ctxs(unsigned* sched_ctxs, int ns, int nw, int res_rounded[ns][nw], 
+void sc_hypervisor_lp_distribute_resources_in_ctxs(unsigned* sched_ctxs, int ns, int nw, int res_rounded[ns][nw],
 						   double res[ns][nw], int *workers, int nworkers, struct types_of_workers *tw)
 						   double res[ns][nw], int *workers, int nworkers, struct types_of_workers *tw)
 {
 {
 	int s, w;
 	int s, w;
@@ -678,8 +678,8 @@ void sc_hypervisor_lp_distribute_resources_in_ctxs(unsigned* sched_ctxs, int ns,
 		for(w = 0; w < nw; w++)
 		for(w = 0; w < nw; w++)
 		{
 		{
 			enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
 			enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
-			
-			if(arch == STARPU_CPU_WORKER) 
+
+			if(arch == STARPU_CPU_WORKER)
 			{
 			{
 				int nworkers_to_add = res_rounded[s][w];
 				int nworkers_to_add = res_rounded[s][w];
 				if(target_res < 0.0)
 				if(target_res < 0.0)
@@ -731,7 +731,7 @@ void sc_hypervisor_lp_distribute_resources_in_ctxs(unsigned* sched_ctxs, int ns,
 					else
 					else
 						for(i = 0; i < x-1; i++)
 						for(i = 0; i < x-1; i++)
 							workers_add[nw_add++] = workers_to_add[i];
 							workers_add[nw_add++] = workers_to_add[i];
-					
+
 					free(workers_to_add);
 					free(workers_to_add);
 				}
 				}
 			}
 			}
@@ -744,7 +744,7 @@ void sc_hypervisor_lp_distribute_resources_in_ctxs(unsigned* sched_ctxs, int ns,
 	}
 	}
 }
 }
 
 
-void sc_hypervisor_lp_distribute_floating_no_resources_in_ctxs(unsigned* sched_ctxs, int ns, int nw, double res[ns][nw], 
+void sc_hypervisor_lp_distribute_floating_no_resources_in_ctxs(unsigned* sched_ctxs, int ns, int nw, double res[ns][nw],
 							       int *workers, int nworkers, struct types_of_workers *tw)
 							       int *workers, int nworkers, struct types_of_workers *tw)
 {
 {
 	int s, w;
 	int s, w;
@@ -765,8 +765,8 @@ void sc_hypervisor_lp_distribute_floating_no_resources_in_ctxs(unsigned* sched_c
 		for(w = 0; w < nw; w++)
 		for(w = 0; w < nw; w++)
 		{
 		{
 			enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
 			enum starpu_worker_archtype arch = sc_hypervisor_get_arch_for_index(w, tw);
-			
-			if(arch == STARPU_CPU_WORKER) 
+
+			if(arch == STARPU_CPU_WORKER)
 			{
 			{
 				int nworkers_to_add = ceil(res[s][w]);
 				int nworkers_to_add = ceil(res[s][w]);
 				double ceil_double = (double)nworkers_to_add;
 				double ceil_double = (double)nworkers_to_add;
@@ -823,7 +823,7 @@ void sc_hypervisor_lp_distribute_floating_no_resources_in_ctxs(unsigned* sched_c
 					else
 					else
 						for(i = 0; i < x-1; i++)
 						for(i = 0; i < x-1; i++)
 							workers_add[nw_add++] = workers_to_add[i];
 							workers_add[nw_add++] = workers_to_add[i];
-					
+
 					free(workers_to_add);
 					free(workers_to_add);
 				}
 				}
 			}
 			}
@@ -840,7 +840,7 @@ void sc_hypervisor_lp_distribute_floating_no_resources_in_ctxs(unsigned* sched_c
 void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][nw], unsigned *sched_ctxs_input, int *workers_input, unsigned do_size, struct types_of_workers *tw)
 void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][nw], unsigned *sched_ctxs_input, int *workers_input, unsigned do_size, struct types_of_workers *tw)
 {
 {
 	int w, s;
 	int w, s;
-	int ntypes_of_workers = tw->nw; 
+	int ntypes_of_workers = tw->nw;
 	double nworkers[ns][ntypes_of_workers];
 	double nworkers[ns][ntypes_of_workers];
 	int nworkers_rounded[ns][ntypes_of_workers];
 	int nworkers_rounded[ns][ntypes_of_workers];
 	for(s = 0; s < ns; s++)
 	for(s = 0; s < ns; s++)
@@ -850,9 +850,9 @@ void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][n
 			nworkers[s][w] = 0.0;
 			nworkers[s][w] = 0.0;
 			nworkers_rounded[s][w] = 0;
 			nworkers_rounded[s][w] = 0;
 		}
 		}
-		
+
 	}
 	}
-	
+
 	for(s = 0; s < ns; s++)
 	for(s = 0; s < ns; s++)
 	{
 	{
 		for(w = 0; w < nw; w++)
 		for(w = 0; w < nw; w++)
@@ -860,7 +860,7 @@ void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][n
 			enum starpu_worker_archtype arch = starpu_worker_get_type(w);
 			enum starpu_worker_archtype arch = starpu_worker_get_type(w);
 			int idx = sc_hypervisor_get_index_for_arch(arch, tw);
 			int idx = sc_hypervisor_get_index_for_arch(arch, tw);
 			nworkers[s][idx] += w_in_s[s][w];
 			nworkers[s][idx] += w_in_s[s][w];
-				
+
 			if(arch == STARPU_CUDA_WORKER)
 			if(arch == STARPU_CUDA_WORKER)
 			{
 			{
 				if(w_in_s[s][w] >= 0.3)
 				if(w_in_s[s][w] >= 0.3)
@@ -873,7 +873,7 @@ void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][n
 			}
 			}
 		}
 		}
 	}
 	}
-	
+
 	if(!do_size)
 	if(!do_size)
 		sc_hypervisor_lp_redistribute_resources_in_ctxs(ns, ntypes_of_workers, nworkers_rounded, nworkers, sched_ctxs_input, tw);
 		sc_hypervisor_lp_redistribute_resources_in_ctxs(ns, ntypes_of_workers, nworkers_rounded, nworkers, sched_ctxs_input, tw);
 	else
 	else
@@ -883,7 +883,7 @@ void sc_hypervisor_lp_place_resources_in_ctx(int ns, int nw, double w_in_s[ns][n
 		unsigned has_workers = 0;
 		unsigned has_workers = 0;
 		for(s = 0; s < ns; s++)
 		for(s = 0; s < ns; s++)
 		{
 		{
-			int nworkers_ctx = sc_hypervisor_get_nworkers_ctx(current_sched_ctxs[s], 
+			int nworkers_ctx = sc_hypervisor_get_nworkers_ctx(current_sched_ctxs[s],
 										 STARPU_ANY_WORKER);
 										 STARPU_ANY_WORKER);
 			if(nworkers_ctx != 0)
 			if(nworkers_ctx != 0)
 			{
 			{
@@ -928,7 +928,7 @@ void sc_hypervisor_lp_share_remaining_resources(int ns, unsigned *sched_ctxs,  i
 			for(w = 0; w < nw; w++)
 			for(w = 0; w < nw; w++)
 				_sc_hypervisor_allow_compute_idle(sched_ctxs[s], remaining_workers[w], 0);
 				_sc_hypervisor_allow_compute_idle(sched_ctxs[s], remaining_workers[w], 0);
 			sc_hypervisor_add_workers_to_sched_ctx(remaining_workers, nw, sched_ctxs[s]);
 			sc_hypervisor_add_workers_to_sched_ctx(remaining_workers, nw, sched_ctxs[s]);
-		}		
+		}
 	}
 	}
 }
 }
 
 

+ 23 - 23
sc_hypervisor/src/policies_utils/speed.c

@@ -24,7 +24,7 @@ double sc_hypervisor_get_ctx_speed(struct sc_hypervisor_wrapper* sc_w)
 	struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
 	struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(sc_w->sched_ctx);
         double elapsed_flops = sc_hypervisor_get_elapsed_flops_per_sched_ctx(sc_w);
         double elapsed_flops = sc_hypervisor_get_elapsed_flops_per_sched_ctx(sc_w);
 	double sample = config->ispeed_ctx_sample;
 	double sample = config->ispeed_ctx_sample;
-	
+
 
 
 	double total_elapsed_flops = sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(sc_w);
 	double total_elapsed_flops = sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(sc_w);
 	double total_flops = sc_w->total_flops;
 	double total_flops = sc_w->total_flops;
@@ -36,7 +36,7 @@ double sc_hypervisor_get_ctx_speed(struct sc_hypervisor_wrapper* sc_w)
 
 
 	double curr_time = starpu_timing_now();
 	double curr_time = starpu_timing_now();
 	double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
 	double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
-	
+
 	unsigned can_compute_speed = 0;
 	unsigned can_compute_speed = 0;
 	char *speed_sample_criteria = getenv("SC_HYPERVISOR_SAMPLE_CRITERIA");
 	char *speed_sample_criteria = getenv("SC_HYPERVISOR_SAMPLE_CRITERIA");
 	if(speed_sample_criteria && (strcmp(speed_sample_criteria, "time") == 0))
 	if(speed_sample_criteria && (strcmp(speed_sample_criteria, "time") == 0))
@@ -72,7 +72,7 @@ double sc_hypervisor_get_speed_per_worker(struct sc_hypervisor_wrapper *sc_w, un
                 double curr_time = starpu_timing_now();
                 double curr_time = starpu_timing_now();
                 double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
                 double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
 		elapsed_time -= sc_w->idle_time[worker];
 		elapsed_time -= sc_w->idle_time[worker];
-		
+
 
 
 /* 		size_t elapsed_data_used = sc_w->elapsed_data[worker]; */
 /* 		size_t elapsed_data_used = sc_w->elapsed_data[worker]; */
 /*  		enum starpu_worker_archtype arch = starpu_worker_get_type(worker); */
 /*  		enum starpu_worker_archtype arch = starpu_worker_get_type(worker); */
@@ -90,7 +90,7 @@ double sc_hypervisor_get_speed_per_worker(struct sc_hypervisor_wrapper *sc_w, un
 /* 			elapsed_time += (elapsed_tasks * latency)/1000000; */
 /* 			elapsed_time += (elapsed_tasks * latency)/1000000; */
 /* //			printf("elapsed time after %lf \n", elapsed_time); */
 /* //			printf("elapsed time after %lf \n", elapsed_time); */
 /* 		} */
 /* 		} */
-			
+
                 double vel  = (elapsed_flops/elapsed_time);/* in Gflops/s */
                 double vel  = (elapsed_flops/elapsed_time);/* in Gflops/s */
                 return vel;
                 return vel;
         }
         }
@@ -111,7 +111,7 @@ double sc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_
 
 
 	double curr_time = starpu_timing_now();
 	double curr_time = starpu_timing_now();
 	double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
 	double elapsed_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
-	
+
 	unsigned can_compute_speed = 0;
 	unsigned can_compute_speed = 0;
 	char *speed_sample_criteria = getenv("SC_HYPERVISOR_SAMPLE_CRITERIA");
 	char *speed_sample_criteria = getenv("SC_HYPERVISOR_SAMPLE_CRITERIA");
 	if(speed_sample_criteria && (strcmp(speed_sample_criteria, "time") == 0))
 	if(speed_sample_criteria && (strcmp(speed_sample_criteria, "time") == 0))
@@ -125,10 +125,10 @@ double sc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_
 
 
 		struct starpu_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sc_w->sched_ctx);
 		struct starpu_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sc_w->sched_ctx);
 		int worker;
 		int worker;
-		
+
 		struct starpu_sched_ctx_iterator it;
 		struct starpu_sched_ctx_iterator it;
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
-		
+
 		double speed = 0.0;
 		double speed = 0.0;
 		unsigned nworkers = 0;
 		unsigned nworkers = 0;
 		double all_workers_flops = 0.0;
 		double all_workers_flops = 0.0;
@@ -143,20 +143,20 @@ double sc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_
 				{
 				{
 					double current_exec_time = 0.0;
 					double current_exec_time = 0.0;
 					if(sc_w->exec_start_time[worker] < sc_w->start_time)
 					if(sc_w->exec_start_time[worker] < sc_w->start_time)
-						current_exec_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */ 
+						current_exec_time = (curr_time - sc_w->start_time) / 1000000.0; /* in seconds */
 					else
 					else
-						current_exec_time = (curr_time - sc_w->exec_start_time[worker]) / 1000000.0; /* in seconds */ 
+						current_exec_time = (curr_time - sc_w->exec_start_time[worker]) / 1000000.0; /* in seconds */
 					double suppl_flops = current_exec_time * sc_hypervisor_get_ref_speed_per_worker_type(sc_w, req_arch);
 					double suppl_flops = current_exec_time * sc_hypervisor_get_ref_speed_per_worker_type(sc_w, req_arch);
 					all_workers_flops += suppl_flops;
 					all_workers_flops += suppl_flops;
-				}		
+				}
 
 
 				all_workers_flops += sc_w->elapsed_flops[worker] / 1000000000.0; /*in gflops */
 				all_workers_flops += sc_w->elapsed_flops[worker] / 1000000000.0; /*in gflops */
 				if(max_workers_idle_time < sc_w->idle_time[worker])
 				if(max_workers_idle_time < sc_w->idle_time[worker])
 					max_workers_idle_time = sc_w->idle_time[worker]; /* in seconds */
 					max_workers_idle_time = sc_w->idle_time[worker]; /* in seconds */
 				nworkers++;
 				nworkers++;
 			}
 			}
-		}			
-		
+		}
+
 		if(nworkers != 0 && all_workers_flops > 0.0001)
 		if(nworkers != 0 && all_workers_flops > 0.0001)
 		{
 		{
 //			elapsed_time -= max_workers_idle_time;
 //			elapsed_time -= max_workers_idle_time;
@@ -164,17 +164,17 @@ double sc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_
 		}
 		}
 		else
 		else
 			speed = -1.0;
 			speed = -1.0;
-		
+
 		if(speed != -1.0)
 		if(speed != -1.0)
 		{
 		{
 
 
 			/* if ref_speed started being corrupted bc of the old bad distribution
 			/* if ref_speed started being corrupted bc of the old bad distribution
-			   register only the last frame otherwise make the average with the speed 
+			   register only the last frame otherwise make the average with the speed
 			   behavior of the application until now */
 			   behavior of the application until now */
 			if(arch == STARPU_CUDA_WORKER)
 			if(arch == STARPU_CUDA_WORKER)
-				sc_w->ref_speed[0] = (sc_w->ref_speed[0] > 0.1) ? ((sc_w->ref_speed[0] + speed ) / 2.0) : speed; 
+				sc_w->ref_speed[0] = (sc_w->ref_speed[0] > 0.1) ? ((sc_w->ref_speed[0] + speed ) / 2.0) : speed;
 			else
 			else
-				sc_w->ref_speed[1] = (sc_w->ref_speed[1] > 0.1) ? ((sc_w->ref_speed[1] + speed ) / 2.0) : speed; 
+				sc_w->ref_speed[1] = (sc_w->ref_speed[1] > 0.1) ? ((sc_w->ref_speed[1] + speed ) / 2.0) : speed;
 		}
 		}
 		return speed;
 		return speed;
 	}
 	}
@@ -225,13 +225,13 @@ double sc_hypervisor_get_avg_speed(enum starpu_worker_archtype arch)
 	unsigned *sched_ctxs;
 	unsigned *sched_ctxs;
 	int nsched_ctxs;
 	int nsched_ctxs;
 	sc_hypervisor_get_ctxs_on_level(&sched_ctxs, &nsched_ctxs, 0, STARPU_NMAX_SCHED_CTXS);
 	sc_hypervisor_get_ctxs_on_level(&sched_ctxs, &nsched_ctxs, 0, STARPU_NMAX_SCHED_CTXS);
-	
+
 	for(s = 0; s < nsched_ctxs; s++)
 	for(s = 0; s < nsched_ctxs; s++)
 	{
 	{
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
 		sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
 		struct starpu_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctxs[s]);
 		struct starpu_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctxs[s]);
 		int worker;
 		int worker;
-		
+
 		struct starpu_sched_ctx_iterator it;
 		struct starpu_sched_ctx_iterator it;
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -254,7 +254,7 @@ double sc_hypervisor_get_avg_speed(enum starpu_worker_archtype arch)
 
 
 	double speed = -1.0;
 	double speed = -1.0;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-	printf("total_exec_flops %lf total_estimated_flops %lf max_real_start_time %lf nworkers %d \n", total_executed_flops, total_estimated_flops, max_real_start_time, nworkers);
+	printf("total_exec_flops %lf total_estimated_flops %lf max_real_start_time %lf nworkers %u \n", total_executed_flops, total_estimated_flops, max_real_start_time, nworkers);
 #endif
 #endif
 	if(total_executed_flops > 0.5*total_estimated_flops)
 	if(total_executed_flops > 0.5*total_estimated_flops)
 	{
 	{
@@ -263,7 +263,7 @@ double sc_hypervisor_get_avg_speed(enum starpu_worker_archtype arch)
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 		printf("time = %lf\n", time);
 		printf("time = %lf\n", time);
 #endif
 #endif
-		speed = (total_executed_flops / time) / nworkers; 
+		speed = (total_executed_flops / time) / nworkers;
 	}
 	}
 
 
 	return speed;
 	return speed;
@@ -274,7 +274,7 @@ void _consider_max_for_children(unsigned sched_ctx, unsigned consider_max)
 	struct sc_hypervisor_wrapper *sc_w = sc_hypervisor_get_wrapper(sched_ctx);
 	struct sc_hypervisor_wrapper *sc_w = sc_hypervisor_get_wrapper(sched_ctx);
 	sc_w->consider_max = consider_max;
 	sc_w->consider_max = consider_max;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-	printf("ctx %d consider max %d \n", sched_ctx, sc_w->consider_max); 
+	printf("ctx %u consider max %d \n", sched_ctx, sc_w->consider_max);
 #endif
 #endif
 
 
 	int level = starpu_sched_ctx_get_hierarchy_level(sched_ctx);
 	int level = starpu_sched_ctx_get_hierarchy_level(sched_ctx);
@@ -309,9 +309,9 @@ void sc_hypervisor_check_if_consider_max(struct types_of_workers *tw)
 		for(w = 0; w < nw; w++)
 		for(w = 0; w < nw; w++)
 		{
 		{
 			struct sc_hypervisor_wrapper *sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
 			struct sc_hypervisor_wrapper *sc_w = sc_hypervisor_get_wrapper(sched_ctxs[s]);
-			double speed = sc_hypervisor_get_speed(sc_w, sc_hypervisor_get_arch_for_index(w, tw)); 
+			double speed = sc_hypervisor_get_speed(sc_w, sc_hypervisor_get_arch_for_index(w, tw));
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("%d: speed %lf avg_speed %lf min %lf max %lf\n", sched_ctxs[s], speed, avg_speed_per_tw[w], (avg_speed_per_tw[w]*0.5), (avg_speed_per_tw[w]*1.5));
+			printf("%u: speed %lf avg_speed %lf min %lf max %lf\n", sched_ctxs[s], speed, avg_speed_per_tw[w], (avg_speed_per_tw[w]*0.5), (avg_speed_per_tw[w]*1.5));
 #endif
 #endif
 			if(speed < avg_speed_per_tw[w]*0.5 || speed > avg_speed_per_tw[w]*1.5)
 			if(speed < avg_speed_per_tw[w]*0.5 || speed > avg_speed_per_tw[w]*1.5)
 				_consider_max_for_children(sched_ctxs[s], 1);
 				_consider_max_for_children(sched_ctxs[s], 1);

+ 9 - 9
sc_hypervisor/src/sc_hypervisor.c

@@ -608,7 +608,7 @@ void sc_hypervisor_move_workers(unsigned sender_sched_ctx, unsigned receiver_sch
 		_print_current_time();
 		_print_current_time();
 		unsigned j;
 		unsigned j;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-		printf("resize ctx %d with %d workers", sender_sched_ctx, nworkers_to_move);
+		printf("resize ctx %u with %u workers", sender_sched_ctx, nworkers_to_move);
 		for(j = 0; j < nworkers_to_move; j++)
 		for(j = 0; j < nworkers_to_move; j++)
 			printf(" %d", workers_to_move[j]);
 			printf(" %d", workers_to_move[j]);
 		printf("\n");
 		printf("\n");
@@ -621,7 +621,7 @@ void sc_hypervisor_move_workers(unsigned sender_sched_ctx, unsigned receiver_sch
 		{
 		{
 			unsigned j;
 			unsigned j;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("remove now from ctx %d:", sender_sched_ctx);
+			printf("remove now from ctx %u:", sender_sched_ctx);
 			for(j = 0; j < nworkers_to_move; j++)
 			for(j = 0; j < nworkers_to_move; j++)
 				printf(" %d", workers_to_move[j]);
 				printf(" %d", workers_to_move[j]);
 			printf("\n");
 			printf("\n");
@@ -670,7 +670,7 @@ void sc_hypervisor_add_workers_to_sched_ctx(int* workers_to_add, unsigned nworke
 		_print_current_time();
 		_print_current_time();
 		unsigned j;
 		unsigned j;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-		printf("add to ctx %d:", sched_ctx);
+		printf("add to ctx %u:", sched_ctx);
 		for(j = 0; j < nworkers_to_add; j++)
 		for(j = 0; j < nworkers_to_add; j++)
 			printf(" %d", workers_to_add[j]);
 			printf(" %d", workers_to_add[j]);
 		printf("\n");
 		printf("\n");
@@ -703,7 +703,7 @@ void sc_hypervisor_remove_workers_from_sched_ctx(int* workers_to_remove, unsigne
 		{
 		{
 			unsigned j;
 			unsigned j;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("remove explicitley now from ctx %d:", sched_ctx);
+			printf("remove explicitley now from ctx %u:", sched_ctx);
 			for(j = 0; j < nworkers_to_remove; j++)
 			for(j = 0; j < nworkers_to_remove; j++)
 				printf(" %d", workers_to_remove[j]);
 				printf(" %d", workers_to_remove[j]);
 			printf("\n");
 			printf("\n");
@@ -714,7 +714,7 @@ void sc_hypervisor_remove_workers_from_sched_ctx(int* workers_to_remove, unsigne
 		else
 		else
 		{
 		{
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("try to remove from ctx %d: ", sched_ctx);
+			printf("try to remove from ctx %u: ", sched_ctx);
 			unsigned j;
 			unsigned j;
 			for(j = 0; j < nworkers_to_remove; j++)
 			for(j = 0; j < nworkers_to_remove; j++)
 				printf(" %d", workers_to_remove[j]);
 				printf(" %d", workers_to_remove[j]);
@@ -930,7 +930,7 @@ int _update_max_hierarchically(unsigned *sched_ctxs, int nsched_ctxs)
 
 
 			}
 			}
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("ctx %d has max %d \n", sched_ctxs[s], config->max_nworkers);
+			printf("ctx %u has max %d \n", sched_ctxs[s], config->max_nworkers);
 #endif
 #endif
 		}
 		}
 		max += config->max_nworkers;
 		max += config->max_nworkers;
@@ -963,7 +963,7 @@ void _update_max_diff_hierarchically(unsigned father, double diff)
 				current_diff += (diff - accumulated_diff);
 				current_diff += (diff - accumulated_diff);
 			config->max_nworkers += current_diff;
 			config->max_nworkers += current_diff;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-			printf("%d: redib max_nworkers incr %d diff = %d \n",  sched_ctxs_child[s], config->max_nworkers, current_diff);
+			printf("%u: redib max_nworkers incr %d diff = %d \n",  sched_ctxs_child[s], config->max_nworkers, current_diff);
 #endif
 #endif
 			_update_max_diff_hierarchically(sched_ctxs_child[s], current_diff);
 			_update_max_diff_hierarchically(sched_ctxs_child[s], current_diff);
 		}
 		}
@@ -1086,7 +1086,7 @@ void sc_hypervisor_update_resize_interval(unsigned *sched_ctxs, int nsched_ctxs,
 /* 			config->max_nworkers = max_workers; */
 /* 			config->max_nworkers = max_workers; */
 
 
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-		printf("%d: ready tasks  %d norm_idle_time %lf elapsed_time %lf norm_exec_time %lf nworker %d max %d \n",
+		printf("%u: ready tasks  %d norm_idle_time %lf elapsed_time %lf norm_exec_time %lf nworker %d max %d \n",
 		       sched_ctx, nready_tasks, norm_idle_time, elapsed_time, norm_exec_time, workers->nworkers, config->max_nworkers);
 		       sched_ctx, nready_tasks, norm_idle_time, elapsed_time, norm_exec_time, workers->nworkers, config->max_nworkers);
 #endif
 #endif
 
 
@@ -1129,7 +1129,7 @@ void sc_hypervisor_update_resize_interval(unsigned *sched_ctxs, int nsched_ctxs,
 				struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(max_nflops_sched_ctx);
 				struct sc_hypervisor_policy_config *config = sc_hypervisor_get_config(max_nflops_sched_ctx);
 				config->max_nworkers += diff;
 				config->max_nworkers += diff;
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
 #ifdef STARPU_SC_HYPERVISOR_DEBUG
-				printf("%d: redib max_nworkers incr %d \n",  max_nflops_sched_ctx, config->max_nworkers);
+				printf("%u: redib max_nworkers incr %d \n",  max_nflops_sched_ctx, config->max_nworkers);
 #endif
 #endif
 				_update_max_diff_hierarchically(max_nflops_sched_ctx, diff);
 				_update_max_diff_hierarchically(max_nflops_sched_ctx, diff);
 			}
 			}