Pārlūkot izejas kodu

fix examples of hyp compilation + add default value for the resize triggering criteria

Andra Hugo 12 gadi atpakaļ
vecāks
revīzija
f2d6fafd49

+ 6 - 3
sc_hypervisor/examples/Makefile.am

@@ -18,12 +18,14 @@ LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ @LIBS@ $(top_builddir)/sc_hypervisor
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/examples -I$(top_builddir)/include -I$(top_srcdir)/sc_hypervisor/include -I$(top_srcdir)/sc_hypervisor/examples
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/examples -I$(top_builddir)/include -I$(top_srcdir)/sc_hypervisor/include -I$(top_srcdir)/sc_hypervisor/examples
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_GLPK_LDFLAGS)
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_GLPK_LDFLAGS)
 
 
-if !NO_BLAS_LIB
 noinst_PROGRAMS =				\
 noinst_PROGRAMS =				\
-	cholesky/cholesky_implicit  		\
 	app_driven_test/app_driven_test		\
 	app_driven_test/app_driven_test		\
 	lp_test/lp_test
 	lp_test/lp_test
 
 
+if !NO_BLAS_LIB
+noinst_PROGRAMS +=				\
+	cholesky/cholesky_implicit  		
+
 noinst_HEADERS = 				\
 noinst_HEADERS = 				\
 	cholesky/cholesky.h			\
 	cholesky/cholesky.h			\
 	sched_ctx_utils/sched_ctx_utils.h
 	sched_ctx_utils/sched_ctx_utils.h
@@ -42,13 +44,14 @@ cholesky_cholesky_implicit_LDADD =		\
 	$(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la \
 	$(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la \
 	$(STARPU_BLAS_LDFLAGS)
 	$(STARPU_BLAS_LDFLAGS)
 
 
+endif
+
 app_driven_test_app_driven_test_SOURCES =		\
 app_driven_test_app_driven_test_SOURCES =		\
 	app_driven_test/app_driven_test.c
 	app_driven_test/app_driven_test.c
 
 
 app_driven_test_app_driven_test_LDADD =		\
 app_driven_test_app_driven_test_LDADD =		\
 	$(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la
 	$(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la
 
 
-endif
 
 
 showcheck:
 showcheck:
 	-cat $(TEST_LOGS) /dev/null
 	-cat $(TEST_LOGS) /dev/null

+ 1 - 1
sc_hypervisor/src/sc_hypervisor.c

@@ -137,7 +137,7 @@ struct starpu_sched_ctx_performance_counters* sc_hypervisor_init(struct sc_hyper
 	char* vel_gap = getenv("MAX_VELOCITY_GAP");
 	char* vel_gap = getenv("MAX_VELOCITY_GAP");
 	hypervisor.max_velocity_gap = vel_gap ? atof(vel_gap) : SC_VELOCITY_MAX_GAP_DEFAULT;
 	hypervisor.max_velocity_gap = vel_gap ? atof(vel_gap) : SC_VELOCITY_MAX_GAP_DEFAULT;
 	char* crit =  getenv("HYPERVISOR_TRIGGER_RESIZE");
 	char* crit =  getenv("HYPERVISOR_TRIGGER_RESIZE");
-	hypervisor.resize_criteria = strcmp(crit,"idle") == 0 ? SC_IDLE : (strcmp(crit,"speed") == 0 ? SC_VELOCITY : SC_NOTHING);
+	hypervisor.resize_criteria = !crit ? SC_NOTHING : strcmp(crit,"idle") == 0 ? SC_IDLE : (strcmp(crit,"speed") == 0 ? SC_VELOCITY : SC_NOTHING);
 
 
 	starpu_pthread_mutex_init(&act_hypervisor_mutex, NULL);
 	starpu_pthread_mutex_init(&act_hypervisor_mutex, NULL);
 	hypervisor.start_executing_time = starpu_timing_now();
 	hypervisor.start_executing_time = starpu_timing_now();