Browse Source

Merge branch 'master' into fpga

Nathalie Furmento 4 years ago
parent
commit
0433b5be07
51 changed files with 325 additions and 156 deletions
  1. 82 60
      configure.ac
  2. 1 0
      contrib/ci.inria.fr/job-1-check.sh
  3. 1 1
      doc/doxygen/chapters/470_simgrid.doxy
  4. 0 1
      doc/doxygen_dev/refman.tex
  5. 2 2
      examples/cpp/add_vectors_interface.cpp
  6. 2 1
      examples/tag_example/tag_example.c
  7. 1 1
      libstarpu-mic.pc.in
  8. 1 1
      libstarpu.pc.in
  9. 3 0
      mpi/examples/Makefile.am
  10. 3 0
      mpi/tests/Makefile.am
  11. 1 2
      src/Makefile.am
  12. 4 2
      src/common/rbtree_i.h
  13. 14 2
      src/common/thread.c
  14. 2 1
      src/core/dependencies/cg.c
  15. 11 10
      src/core/jobs.c
  16. 15 12
      src/core/perfmodel/energy_model.c
  17. 4 3
      src/core/perfmodel/perfmodel_history.c
  18. 1 1
      src/core/perfmodel/perfmodel_print.c
  19. 2 1
      src/core/sched_policy.c
  20. 63 10
      src/core/simgrid.c
  21. 3 0
      src/core/simgrid.h
  22. 1 1
      src/core/topology.c
  23. 2 1
      src/core/workers.c
  24. 4 2
      src/core/workers.h
  25. 4 2
      src/datawizard/memalloc.c
  26. 2 1
      src/datawizard/memory_nodes.c
  27. 5 3
      src/debug/traces/starpu_fxt.c
  28. 4 2
      src/drivers/cpu/driver_cpu.c
  29. 4 2
      src/drivers/cuda/driver_cuda_init.c
  30. 2 1
      src/drivers/disk/driver_disk.c
  31. 4 2
      src/drivers/mic/driver_mic_init.c
  32. 4 2
      src/drivers/mpi/driver_mpi_init.c
  33. 4 2
      src/drivers/opencl/driver_opencl_init.c
  34. 2 0
      src/profiling/profiling.c
  35. 6 3
      src/sched_policies/component_heteroprio.c
  36. 5 0
      src/sched_policies/helper_mct.c
  37. 2 1
      src/sched_policies/work_stealing_policy.c
  38. 6 4
      src/util/starpu_data_cpy.c
  39. 1 1
      starpu-1.0-mic.pc.in
  40. 1 1
      starpu-1.0.pc.in
  41. 1 1
      starpu-1.1.pc.in
  42. 1 1
      starpu-1.2.pc.in
  43. 1 1
      starpu-1.3.pc.in
  44. 2 1
      tests/datawizard/bcsr.c
  45. 2 1
      tests/microbenchs/bandwidth.c
  46. 2 0
      tests/microbenchs/tasks_size_overhead.c
  47. 8 1
      tests/perfmodels/regression_based_memset.c
  48. 1 1
      tools/dev/checker/starpu_check_copyright.sh
  49. 9 1
      tools/starpu_fxt_data_trace.c
  50. 16 4
      tools/starpu_perfmodel_plot.c
  51. 3 2
      tools/starpu_perfmodel_recdump.c

File diff suppressed because it is too large
+ 82 - 60
configure.ac


+ 1 - 0
contrib/ci.inria.fr/job-1-check.sh

@@ -42,6 +42,7 @@ env > $PWD/env
 test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
 tar xfz ../$tarball
 cd $basename
+touch configure
 mkdir build
 cd build
 

+ 1 - 1
doc/doxygen/chapters/470_simgrid.doxy

@@ -23,7 +23,7 @@
 
 StarPU can use Simgrid in order to simulate execution on an arbitrary
 platform. This was tested with SimGrid from 3.11 to 3.16, and 3.18 to
-3.25. SimGrid versions 3.25 and above need to be configured with -Denable_msg=ON .
+3.26. SimGrid version 3.25 needs to be configured with -Denable_msg=ON .
 Other versions may have compatibility issues. 3.17 notably does not build at
 all. MPI simulation does not work with version 3.22.
 

+ 0 - 1
doc/doxygen_dev/refman.tex

@@ -148,7 +148,6 @@ Documentation License”.
 \input{starpu__data__cpy_8h}
 \input{starpu__debug__helpers_8h}
 \input{starpu__fxt_8h}
-\input{starpu__parameters_8h}
 \input{starpu__spinlock_8h}
 \input{starpu__task__insert__utils_8h}
 \input{tags_8h}

+ 2 - 2
examples/cpp/add_vectors_interface.cpp

@@ -61,9 +61,9 @@ class my_allocator
 		node = a.get_node();
 	}
 
-	explicit my_allocator(const unsigned node)
+	explicit my_allocator(const unsigned thenode)
 	{
-		this->node = node;
+		this->node = thenode;
 	}
 
 	pointer allocate(size_type n, const void * = 0)

+ 2 - 1
examples/tag_example/tag_example.c

@@ -223,7 +223,8 @@ int main(int argc, char **argv)
 	int ret;
 
 #ifdef STARPU_HAVE_HELGRIND_H
-	if (RUNNING_ON_VALGRIND) {
+	if (RUNNING_ON_VALGRIND)
+	{
 		ni /= 2;
 		nj /= 2;
 		nk /= 2;

+ 1 - 1
libstarpu-mic.pc.in

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

+ 1 - 1
libstarpu.pc.in

@@ -23,6 +23,6 @@ Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_H_CPPFLAGS@ -DSTARPU_USE_DEPRECATED_API -DSTARPU_USE_DEPRECATED_ONE_ZERO_API
-Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_EXPORTED_LIBS@
+Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_EXPORTED_LIBS@ @STARPU_SC_HYPERVISOR@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@

+ 3 - 0
mpi/examples/Makefile.am

@@ -108,6 +108,9 @@ endif
 endif
 
 AM_CFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_CXXFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_FFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_FCFLAGS += $(MAGMA_CFLAGS) -Wno-unused
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include -I$(top_srcdir)/mpi/include $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la $(STARPU_EXPORTED_LIBS)

+ 3 - 0
mpi/tests/Makefile.am

@@ -84,6 +84,9 @@ endif
 endif
 
 AM_CFLAGS += -Wno-unused
+AM_CXXFLAGS += -Wno-unused
+AM_FFLAGS += -Wno-unused
+AM_FCFLAGS += -Wno-unused
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/mpi/include -I$(top_srcdir)/mpi/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/examples/ $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 LIBS += $(STARPU_CUDA_LDFLAGS)

+ 1 - 2
src/Makefile.am

@@ -60,8 +60,7 @@ endif STARPU_HAVE_WINDOWS
 
 lib_LTLIBRARIES = libstarpu-@STARPU_EFFECTIVE_VERSION@.la
 
-libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined									\
-  -version-info $(libstarpu_so_version)
+libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) -no-undefined -version-info $(libstarpu_so_version)
 
 if STARPU_HAVE_DARWIN
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS += \

+ 4 - 2
src/common/rbtree_i.h

@@ -44,7 +44,8 @@
  * architectures, as long as the nodes aren't embedded in structures with
  * special alignment constraints such as member packing.
  */
-struct starpu_rbtree_node {
+struct starpu_rbtree_node
+{
     uintptr_t parent;
     struct starpu_rbtree_node *children[2];
 };
@@ -52,7 +53,8 @@ struct starpu_rbtree_node {
 /**
  * Red-black tree structure.
  */
-struct starpu_rbtree {
+struct starpu_rbtree
+{
     struct starpu_rbtree_node *root;
 };
 

+ 14 - 2
src/common/thread.c

@@ -96,14 +96,22 @@ int starpu_pthread_create_on(const char *name, starpu_pthread_t *thread, const s
 	if (attr && attr->stacksize)
 		sg_actor_set_stacksize(*thread, attr->stacksize);
 #endif
+#ifdef HAVE_SG_ACTOR_SET_DATA
+	sg_actor_set_data(*thread, tsd);
+#else
 	sg_actor_data_set(*thread, tsd);
+#endif
 	sg_actor_start(*thread, _starpu_simgrid_thread_start, 2, _args);
 #else
 	*thread = MSG_process_create_with_arguments(name, _starpu_simgrid_thread_start, tsd, host, 2, _args);
 #ifdef HAVE_SG_ACTOR_DATA
+#ifdef HAVE_SG_ACTOR_SET_DATA
+	sg_actor_set_data(*thread, tsd);
+#else
 	sg_actor_data_set(*thread, tsd);
 #endif
 #endif
+#endif
 #ifndef HAVE_SG_ACTOR_SET_STACKSIZE
 	if (attr && attr->stacksize)
 		_starpu_simgrid_set_stack_size(_starpu_default_stack_size);
@@ -328,7 +336,9 @@ extern void *smpi_process_get_user_data();
 int starpu_pthread_setspecific(starpu_pthread_key_t key, const void *pointer)
 {
 	void **array;
-#ifdef HAVE_SG_ACTOR_DATA
+#ifdef HAVE_SG_ACTOR_GET_DATA
+	array = sg_actor_get_data(sg_actor_self());
+#elif defined(HAVE_SG_ACTOR_DATA)
 	array = sg_actor_data(sg_actor_self());
 #else
 #if defined(HAVE_SMPI_PROCESS_SET_USER_DATA) || defined(smpi_process_get_user_data)
@@ -355,7 +365,9 @@ int starpu_pthread_setspecific(starpu_pthread_key_t key, const void *pointer)
 void* starpu_pthread_getspecific(starpu_pthread_key_t key)
 {
 	void **array;
-#ifdef HAVE_SG_ACTOR_DATA
+#ifdef HAVE_SG_ACTOR_GET_DATA
+	array = sg_actor_get_data(sg_actor_self());
+#elif defined(HAVE_SG_ACTOR_DATA)
 	array = sg_actor_data(sg_actor_self());
 #else
 #if defined(HAVE_SMPI_PROCESS_SET_USER_DATA) || defined(smpi_process_get_user_data)

+ 2 - 1
src/core/dependencies/cg.c

@@ -221,7 +221,8 @@ void _starpu_notify_cg(void *pred STARPU_ATTRIBUTE_UNUSED, struct _starpu_cg *cg
 					tag_successors->ndeps_completed = 0;
 					/* This releases the lock */
 					_starpu_tag_set_ready(tag);
-				} else
+				}
+				else
 					_starpu_spin_unlock(&tag->lock);
 				break;
 			}

+ 11 - 10
src/core/jobs.c

@@ -347,19 +347,10 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 				_starpu_spin_unlock(&handle->header_lock);
 		}
 	}
+
 	/* Check nowhere before releasing the sequential consistency (which may
 	 * unregister the handle and free its switch_cl, and thus task->cl here.  */
 	unsigned nowhere = !task->cl || task->cl->where == STARPU_NOWHERE || task->where == STARPU_NOWHERE;
-	/* If this is a continuation, we do not release task dependencies now.
-	 * Task dependencies will be released only when the continued task
-	 * fully completes */
-	if (!continuation)
-	{
-		/* Tell other tasks that we don't exist any more, thus no need for
-		 * implicit dependencies any more.  */
-		_starpu_release_task_enforce_sequential_consistency(j);
-	}
-
 	/* If the job was executed on a combined worker there is no need for the
 	 * scheduler to process it : the task structure doesn't contain any valuable
 	 * data as it's not linked to an actual worker */
@@ -395,6 +386,16 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 	if (!callback && task->cl)
 		callback = task->cl->callback_func;
 
+	/* If this is a continuation, we do not release task dependencies now.
+	 * Task dependencies will be released only when the continued task
+	 * fully completes */
+	if (!continuation)
+	{
+		/* Tell other tasks that we don't exist any more, thus no need for
+		 * implicit dependencies any more.  */
+		_starpu_release_task_enforce_sequential_consistency(j);
+	}
+
 	/* Task does not have a cl, but has explicit data dependencies, we need
 	 * to tell them that we will not exist any more before notifying the
 	 * tasks waiting for us

+ 15 - 12
src/core/perfmodel/energy_model.c

@@ -56,8 +56,11 @@ static const int N_EVTS = 2;
 
 static int nsockets;
 
-static const char* event_names[] = { "rapl::RAPL_ENERGY_PKG:cpu=%d",
-				     "rapl::RAPL_ENERGY_DRAM:cpu=%d"};
+static const char* event_names[] =
+{
+	"rapl::RAPL_ENERGY_PKG:cpu=%d",
+	"rapl::RAPL_ENERGY_DRAM:cpu=%d"
+};
 
 static int add_event(int EventSet, int socket);
 
@@ -66,9 +69,6 @@ static int add_event(int EventSet, int socket);
 /*must be initialized to PAPI_NULL before calling PAPI_create_event*/
 static int EventSet = PAPI_NULL;
 
-/*This is where we store the values we read from the eventset */
-static long long *values;
-
 #endif
 
 static double t1;
@@ -99,9 +99,6 @@ int starpu_energy_start(int workerid, enum starpu_worker_archtype archi)
 
 		nsockets = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_PACKAGE);
 
-		values=calloc(nsockets * N_EVTS,sizeof(long long));
-		STARPU_ASSERT(values);
-
 		if ((retval = PAPI_library_init(PAPI_VER_CURRENT)) != PAPI_VER_CURRENT)
 			ERROR_RETURN(retval);
 
@@ -178,6 +175,9 @@ int starpu_energy_stop(struct starpu_perfmodel *model, struct starpu_task *task,
 	{
 		STARPU_ASSERT_MSG(workerid == -1, "For CPUs we cannot measure each worker separately, use where = STARPU_CPU and leave workerid as -1\n");
 
+		/*This is where we store the values we read from the eventset */
+		long long values[nsockets*N_EVTS];
+
 		/* Stop counting and store the values into the array */
 		if ( (retval = PAPI_stop(EventSet, values)) != PAPI_OK)
 			ERROR_RETURN(retval);
@@ -196,9 +196,6 @@ int starpu_energy_stop(struct starpu_perfmodel *model, struct starpu_task *task,
 				      delta, t, delta/(t*1.0E-6));
 			}
 		}
-		free(values);
-
-		energy = energy * 0.23 / 1.0e9 / ntasks;
 
 		/*removes all events from a PAPI event set */
 		if ( (retval = PAPI_cleanup_eventset(EventSet)) != PAPI_OK)
@@ -242,7 +239,7 @@ int starpu_energy_stop(struct starpu_perfmodel *model, struct starpu_task *task,
 
 	arch = starpu_worker_get_perf_archtype(workerid, STARPU_NMAX_SCHED_CTXS);
 
-	starpu_perfmodel_update_history(model, task, arch, cpuid, nimpl, energy);
+	starpu_perfmodel_update_history_n(model, task, arch, cpuid, nimpl, energy / ntasks, ntasks);
 
 	return retval;
 }
@@ -266,6 +263,12 @@ static int add_event(int eventSet, int socket)
 		retval = PAPI_add_named_event(eventSet, buf);
 		if (retval != PAPI_OK)
 		{
+			if (!strcmp(event_names[i], "rapl::RAPL_ENERGY_DRAM:cpu=%d"))
+			{
+				/* Ok, too bad */
+				_STARPU_DISP("Note: DRAM energy measurement not available\n");
+				return PAPI_OK;
+			}
 			_STARPU_DISP("cannot add event '%s': %d\n", buf, retval);
 			return retval;
 		}

+ 4 - 3
src/core/perfmodel/perfmodel_history.c

@@ -1243,7 +1243,8 @@ void _starpu_initialize_registered_performance_models(void)
 	historymaxerror = starpu_get_env_number_default("STARPU_HISTORY_MAX_ERROR", STARPU_HISTORYMAXERROR);
 	_starpu_calibration_minimum = starpu_get_env_number_default("STARPU_CALIBRATE_MINIMUM", 10);
 
-	for (archtype = 0; archtype < STARPU_NARCH; archtype++) {
+	for (archtype = 0; archtype < STARPU_NARCH; archtype++)
+	{
 		char name[128];
 		const char *arch = starpu_worker_get_type_as_env_var(archtype);
 		int def = archtype == STARPU_CPU_WORKER ? 1 : 0;
@@ -1518,8 +1519,8 @@ int starpu_perfmodel_unload_model(struct starpu_perfmodel *model)
 	return 0;
 }
 
-int starpu_perfmodel_deinit(struct starpu_perfmodel *model){
-
+int starpu_perfmodel_deinit(struct starpu_perfmodel *model)
+{
 	_starpu_deinitialize_performance_model(model);
 	free(model->state);
 	model->state = NULL;

+ 1 - 1
src/core/perfmodel/perfmodel_print.c

@@ -30,7 +30,7 @@ void _starpu_perfmodel_print_history_based(struct starpu_perfmodel_per_arch *per
 	ptr = per_arch_model->list;
 
 	if (!parameter && ptr)
-		fprintf(output, "# hash\t\tsize\t\tflops\t\tmean (us)\tstddev (us)\t\tn\n");
+		fprintf(output, "# hash\t\tsize\t\tflops\t\tmean (us or J)\tstddev (us or J)\t\tn\n");
 
 	while (ptr)
 	{

+ 2 - 1
src/core/sched_policy.c

@@ -632,7 +632,8 @@ int _starpu_push_task_to_workers(struct starpu_task *task)
 				enum starpu_worker_archtype type;
 				for (type = 0; type < STARPU_NARCH; type++)
 				{
-					if (task->where == (int32_t) STARPU_WORKER_TO_MASK(type)) {
+					if (task->where == (int32_t) STARPU_WORKER_TO_MASK(type))
+					{
 						if (config->arch_nodeid[type] >= 0)
 							starpu_prefetch_task_input_on_node(task, config->arch_nodeid[type]);
 						break;

+ 63 - 10
src/core/simgrid.c

@@ -357,11 +357,16 @@ void _starpu_start_simgrid(int *argc, char **argv)
 	int limit_bandwidth = starpu_get_env_number("STARPU_LIMIT_BANDWIDTH");
 	if (limit_bandwidth >= 0)
 	{
-#ifdef HAVE_SG_LINK_BANDWIDTH_SET
+#if defined(HAVE_SG_LINK_BANDWIDTH_SET) || defined(HAVE_SG_LINK_SET_BANDWIDTH)
 		sg_link_t *links = sg_link_list();
 		int count = sg_link_count(), i;
-		for (i = 0; i < count; i++) {
+		for (i = 0; i < count; i++)
+		{
+#ifdef HAVE_SG_LINK_SET_BANDWIDTH
+			sg_link_set_bandwidth(links[i], limit_bandwidth * 1000000.);
+#else
 			sg_link_bandwidth_set(links[i], limit_bandwidth * 1000000.);
+#endif
 		}
 #else
 		_STARPU_DISP("Warning: STARPU_LIMIT_BANDWIDTH set to %d but this requires simgrid 3.26, thus ignored\n", limit_bandwidth);
@@ -492,7 +497,11 @@ void _starpu_simgrid_init_early(int *argc STARPU_ATTRIBUTE_UNUSED, char ***argv
 
 #if defined(HAVE_SG_ACTOR_ATTACH) && defined (HAVE_SG_ACTOR_DATA)
 		sg_actor_t actor = sg_actor_attach("main", NULL, _starpu_simgrid_get_host_by_name("MAIN"), NULL);
+#ifdef HAVE_SG_ACTOR_SET_DATA
+		sg_actor_set_data(actor, tsd);
+#else
 		sg_actor_data_set(actor, tsd);
+#endif
 #else
 		MSG_process_attach("main", tsd, _starpu_simgrid_get_host_by_name("MAIN"), NULL);
 #endif
@@ -519,7 +528,11 @@ void _starpu_simgrid_init_early(int *argc STARPU_ATTRIBUTE_UNUSED, char ***argv
 		void **tsd;
 		_STARPU_CALLOC(tsd, MAX_TSD+1, sizeof(void*));
 #ifdef HAVE_SG_ACTOR_DATA
+#ifdef HAVE_SG_ACTOR_SET_DATA
+		sg_actor_set_data(sg_actor_self(), tsd);
+#else
 		sg_actor_data_set(sg_actor_self(), tsd);
+#endif
 #else
 		smpi_process_set_user_data(tsd);
 #endif
@@ -735,6 +748,9 @@ void _starpu_simgrid_submit_job(int workerid, int sched_ctx_id, struct _starpu_j
 		 * to be able to easily check scheduling robustness */
 	}
 
+#ifdef HAVE_SG_HOST_GET_SPEED
+	flops = length/1000000.0*sg_host_get_speed(sg_host_self());
+#else
 #if defined(HAVE_SG_HOST_SPEED) || defined(sg_host_speed)
 #  if defined(HAVE_SG_HOST_SELF) || defined(sg_host_self)
 	flops = length/1000000.0*sg_host_speed(sg_host_self());
@@ -746,6 +762,7 @@ void _starpu_simgrid_submit_job(int workerid, int sched_ctx_id, struct _starpu_j
 #else
 	flops = length/1000000.0*MSG_get_host_speed(MSG_host_self());
 #endif
+#endif
 
 #ifndef HAVE_SG_ACTOR_SELF_EXECUTE
 	simgrid_task = MSG_task_create(_starpu_job_get_task_name(j), flops, 0, NULL);
@@ -1210,14 +1227,22 @@ starpu_pthread_t _starpu_simgrid_actor_create(const char *name, xbt_main_func_t
 	_STARPU_CALLOC(tsd, MAX_TSD+1, sizeof(void*));
 #ifdef HAVE_SG_ACTOR_INIT
 	actor = sg_actor_init(name, host);
+#ifdef HAVE_SG_ACTOR_SET_DATA
+	sg_actor_set_data(actor, tsd);
+#else
 	sg_actor_data_set(actor, tsd);
+#endif
 	sg_actor_start(actor, code, argc, argv);
 #else
 	actor = MSG_process_create_with_arguments(name, code, tsd, host, argc, argv);
 #ifdef HAVE_SG_ACTOR_DATA
+#ifdef HAVE_SG_ACTOR_SET_DATA
+	sg_actor_set_data(actor, tsd);
+#else
 	sg_actor_data_set(actor, tsd);
 #endif
 #endif
+#endif
 	return actor;
 }
 
@@ -1251,7 +1276,7 @@ starpu_sg_host_t _starpu_simgrid_get_memnode_host(unsigned node)
 
 void _starpu_simgrid_count_ngpus(void)
 {
-#if (defined(HAVE_SG_LINK_NAME) || defined sg_link_name) && (SIMGRID_VERSION >= 31300)
+#if (defined(HAVE_SG_LINK_GET_NAME) || defined(HAVE_SG_LINK_NAME) || defined sg_link_name) && (SIMGRID_VERSION >= 31300)
 	unsigned src, dst;
 	starpu_sg_host_t ramhost = _starpu_simgrid_get_host_by_name("RAM");
 
@@ -1261,7 +1286,7 @@ void _starpu_simgrid_count_ngpus(void)
 		{
 			int busid;
 			starpu_sg_host_t srchost, dsthost;
-#if defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
+#if defined(HAVE_SG_HOST_GET_ROUTE) || defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
 			xbt_dynar_t route_dynar = xbt_dynar_new(sizeof(SD_link_t), NULL);
 			SD_link_t *route;
 #else
@@ -1281,8 +1306,12 @@ void _starpu_simgrid_count_ngpus(void)
 
 			srchost = _starpu_simgrid_get_memnode_host(src);
 			dsthost = _starpu_simgrid_get_memnode_host(dst);
-#if defined(HAVE_SG_HOST_ROUTE)  || defined(sg_host_route)
+#if defined(HAVE_SG_HOST_GET_ROUTE) || defined(HAVE_SG_HOST_ROUTE)  || defined(sg_host_route)
+#ifdef HAVE_SG_HOST_GET_ROUTE
+			sg_host_get_route(srchost, dsthost, route_dynar);
+#else
 			sg_host_route(srchost, dsthost, route_dynar);
+#endif
 			routesize = xbt_dynar_length(route_dynar);
 			route = xbt_dynar_to_array(route_dynar);
 #else
@@ -1293,7 +1322,13 @@ void _starpu_simgrid_count_ngpus(void)
 			/* If it goes through "Host", do not care, there is no
 			 * direct transfer support */
 			for (i = 0; i < routesize; i++)
-				if (!strcmp(sg_link_name(route[i]), "Host"))
+				if (
+#ifdef HAVE_SG_LINK_GET_NAME
+					!strcmp(sg_link_get_name(route[i]), "Host")
+#else
+					!strcmp(sg_link_name(route[i]), "Host")
+#endif
+					)
 					break;
 			if (i < routesize)
 				continue;
@@ -1302,7 +1337,11 @@ void _starpu_simgrid_count_ngpus(void)
 			through = -1;
 			for (i = 0; i < routesize; i++)
 			{
+#ifdef HAVE_SG_LINK_GET_NAME
+				name = sg_link_get_name(route[i]);
+#else
 				name = sg_link_name(route[i]);
+#endif
 				size_t len = strlen(name);
 				if (!strcmp(" through", name+len-8))
 					through = i;
@@ -1315,7 +1354,11 @@ void _starpu_simgrid_count_ngpus(void)
 				_STARPU_DEBUG("Didn't find through-link for %d->%d\n", src, dst);
 				continue;
 			}
+#ifdef HAVE_SG_LINK_GET_NAME
+			name = sg_link_get_name(route[through]);
+#else
 			name = sg_link_name(route[through]);
+#endif
 
 			/*
 			 * count how many direct routes go through it between
@@ -1339,10 +1382,14 @@ void _starpu_simgrid_count_ngpus(void)
 
 				starpu_sg_host_t srchost2 = _starpu_simgrid_get_memnode_host(src2);
 				int routesize2;
-#if defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
+#if defined(HAVE_SG_HOST_GET_ROUTE) || defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
 				xbt_dynar_t route_dynar2 = xbt_dynar_new(sizeof(SD_link_t), NULL);
 				SD_link_t *route2;
+#ifdef HAVE_SG_HOST_GET_ROUTE
+				sg_host_get_route(srchost2, ramhost, route_dynar2);
+#else
 				sg_host_route(srchost2, ramhost, route_dynar2);
+#endif
 				routesize2 = xbt_dynar_length(route_dynar2);
 				route2 = xbt_dynar_to_array(route_dynar2);
 #else
@@ -1351,19 +1398,25 @@ void _starpu_simgrid_count_ngpus(void)
 #endif
 
 				for (i = 0; i < routesize2; i++)
-					if (!strcmp(name, sg_link_name(route2[i])))
+					if (
+#ifdef HAVE_SG_LINK_GET_NAME
+						!strcmp(name, sg_link_get_name(route2[i]))
+#else
+						!strcmp(name, sg_link_name(route2[i]))
+#endif
+						)
 					{
 						/* This GPU goes through this PCI bridge to access RAM */
 						ngpus++;
 						break;
 					}
-#if defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
+#if defined(HAVE_SG_HOST_GET_ROUTE) || defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
 				free(route2);
 #endif
 			}
 			_STARPU_DEBUG("%d->%d through %s, %u GPUs\n", src, dst, name, ngpus);
 			starpu_bus_set_ngpus(busid, ngpus);
-#if defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
+#if defined(HAVE_SG_HOST_GET_ROUTE) || defined(HAVE_SG_HOST_ROUTE) || defined(sg_host_route)
 			free(route);
 #endif
 		}

+ 3 - 0
src/core/simgrid.h

@@ -24,6 +24,9 @@
 extern "C"
 {
 #endif
+
+/* Note: when changing something here, update the include list in configure.ac
+ * in the part that tries to enable stdc++11 */
 #ifdef STARPU_SIMGRID
 #ifdef STARPU_HAVE_SIMGRID_MSG_H
 #include <simgrid/msg.h>

+ 1 - 1
src/core/topology.c

@@ -1817,7 +1817,7 @@ static int _starpu_init_machine_config(struct _starpu_machine_config *config, in
 
 	topology->ndevices[STARPU_OPENCL_WORKER] = nopencl;
 	for (i = 0; i < nopencl; i++)
-		topology->nworker[STARPU_CUDA_WORKER][i] = 1;
+		topology->nworker[STARPU_OPENCL_WORKER][i] = 1;
 	STARPU_ASSERT(topology->ndevices[STARPU_OPENCL_WORKER] + topology->nworkers <= STARPU_NMAXWORKERS);
 
 	_starpu_initialize_workers_opencl_gpuid(config);

+ 2 - 1
src/core/workers.c

@@ -1445,7 +1445,8 @@ int _starpu_get_catch_signals(void)
 	return _starpu_config.conf.catch_signals;
 }
 
-void starpu_drivers_preinit(void) {
+void starpu_drivers_preinit(void)
+{
 	_starpu_cpu_preinit();
 	_starpu_cuda_preinit();
 	_starpu_opencl_preinit();

+ 4 - 2
src/core/workers.h

@@ -427,7 +427,8 @@ struct _starpu_machine_config
 };
 
 /** Provides information for a device driver */
-struct starpu_driver_info {
+struct starpu_driver_info
+{
 	const char *name_upper;	/**< Name of worker type in upper case */
 	const char *name_var;	/**< Name of worker type for environment variables */
 	const char *name_lower;	/**< Name of worker type in lower case */
@@ -441,7 +442,8 @@ extern struct starpu_driver_info starpu_driver_info[STARPU_NARCH];
 void starpu_driver_info_register(enum starpu_worker_archtype archtype, const struct starpu_driver_info *info);
 
 /** Provides information for a memory node driver */
-struct starpu_memory_driver_info {
+struct starpu_memory_driver_info
+{
 	const char *name_upper;	/**< Name of memory in upper case */
 	enum starpu_worker_archtype worker_archtype;	/**< Kind of device */
 };

+ 4 - 2
src/datawizard/memalloc.c

@@ -1513,7 +1513,8 @@ static starpu_ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, st
 			/* First try to flush data explicitly marked for freeing */
 			size_t freed = flush_memchunk_cache(dst_node, reclaim);
 
-			if (freed >= reclaim) {
+			if (freed >= reclaim)
+			{
 				/* That freed enough data, retry allocating */
 				prefetch_out_of_memory[dst_node] = 0;
 				continue;
@@ -1550,7 +1551,8 @@ static starpu_ssize_t _starpu_allocate_interface(starpu_data_handle_t handle, st
 			_starpu_memory_reclaim_generic(dst_node, 0, reclaim);
 			_STARPU_TRACE_END_MEMRECLAIM(dst_node,is_prefetch);
 			prefetch_out_of_memory[dst_node] = 0;
-		} else
+		}
+		else
 			prefetch_out_of_memory[dst_node] = 0;
 	}
 	while((allocated_memory == -ENOMEM) && attempts++ < 2);

+ 2 - 1
src/datawizard/memory_nodes.c

@@ -180,7 +180,8 @@ int starpu_memory_node_get_devid(unsigned node)
 	return _starpu_descr.devid[node];
 }
 
-enum starpu_worker_archtype starpu_memory_node_get_worker_archtype(enum starpu_node_kind node_kind) {
+enum starpu_worker_archtype starpu_memory_node_get_worker_archtype(enum starpu_node_kind node_kind)
+{
 	enum starpu_worker_archtype archtype = starpu_memory_driver_info[node_kind].worker_archtype;
 	STARPU_ASSERT_MSG(archtype != (enum starpu_worker_archtype) -1, "ambiguous memory node kind %d", node_kind);
 	return archtype;

+ 5 - 3
src/debug/traces/starpu_fxt.c

@@ -193,7 +193,8 @@ static void task_dump(struct task_info *task, struct starpu_fxt_options *options
 		fprintf(tasks_file, "Name: %s\n", task->name);
 	if (task->model_name)
 		fprintf(tasks_file, "Model: %s\n", task->model_name);
-	if (task->file) {
+	if (task->file)
+	{
 		fprintf(tasks_file, "File: %s\n", task->file);
 		fprintf(tasks_file, "Line: %d\n", task->line);
 	}
@@ -4129,7 +4130,8 @@ void _starpu_fxt_parse_new_file(char *filename_in, struct starpu_fxt_options *op
 
 	if (out_paje_file && !options->no_bus)
 	{
-		while (!_starpu_communication_list_empty(&communication_list)) {
+		while (!_starpu_communication_list_empty(&communication_list))
+		{
 			struct _starpu_communication*itor;
 			itor = _starpu_communication_list_pop_front(&communication_list);
 
@@ -4423,7 +4425,7 @@ void _starpu_fxt_number_events_file_init(struct starpu_fxt_options *options)
 			STARPU_ABORT_MSG("Failed to open '%s' (err %s)", options->number_events_path, strerror(errno));
 
 		/* FUT_SETUP_CODE is the event with the maximal value */
-		number_events = calloc(FUT_SETUP_CODE+1, sizeof(uint64_t));
+		_STARPU_CALLOC(number_events, FUT_SETUP_CODE+1, sizeof(uint64_t));
 	}
 	else
 		number_events_file = NULL;

+ 4 - 2
src/drivers/cpu/driver_cpu.c

@@ -60,7 +60,8 @@
 #include <windows.h>
 #endif
 
-static struct starpu_driver_info driver_info = {
+static struct starpu_driver_info driver_info =
+{
 	.name_upper = "CPU",
 	.name_var = "CPU",
 	.name_lower = "cpu",
@@ -68,7 +69,8 @@ static struct starpu_driver_info driver_info = {
 	.alpha = 0.5f,
 };
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "NUMA",
 	.worker_archtype = STARPU_CPU_WORKER,
 };

+ 4 - 2
src/drivers/cuda/driver_cuda_init.c

@@ -17,7 +17,8 @@
 #include <core/workers.h>
 #include <drivers/cuda/driver_cuda.h>
 
-static struct starpu_driver_info driver_info = {
+static struct starpu_driver_info driver_info =
+{
 	.name_upper = "CUDA",
 	.name_var = "CUDA",
 	.name_lower = "cuda",
@@ -25,7 +26,8 @@ static struct starpu_driver_info driver_info = {
 	.alpha = 13.33f,
 };
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "CUDA",
 	.worker_archtype = STARPU_CUDA_WORKER,
 };

+ 2 - 1
src/drivers/disk/driver_disk.c

@@ -23,7 +23,8 @@
 #include <datawizard/coherency.h>
 #include <datawizard/memory_nodes.h>
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "Disk",
 	.worker_archtype = (enum starpu_worker_archtype) -1,
 };

+ 4 - 2
src/drivers/mic/driver_mic_init.c

@@ -17,7 +17,8 @@
 #include <core/workers.h>
 #include <drivers/mic/driver_mic_source.h>
 
-static struct starpu_driver_info driver_info = {
+static struct starpu_driver_info driver_info =
+{
 	.name_upper = "MIC",
 	.name_var = "MIC",
 	.name_lower = "mic",
@@ -25,7 +26,8 @@ static struct starpu_driver_info driver_info = {
 	.alpha = 0.5f,
 };
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "MIC",
 	.worker_archtype = STARPU_MIC_WORKER,
 };

+ 4 - 2
src/drivers/mpi/driver_mpi_init.c

@@ -17,7 +17,8 @@
 #include <core/workers.h>
 #include <drivers/mpi/driver_mpi_source.h>
 
-static struct starpu_driver_info driver_info = {
+static struct starpu_driver_info driver_info =
+{
 	.name_upper = "MPI_MS",
 	.name_var = "MPI_MS",
 	.name_lower = "mpi_ms",
@@ -25,7 +26,8 @@ static struct starpu_driver_info driver_info = {
 	.alpha = 1.0f,
 };
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "MPI_MS",
 	.worker_archtype = STARPU_MPI_MS_WORKER,
 };

+ 4 - 2
src/drivers/opencl/driver_opencl_init.c

@@ -17,7 +17,8 @@
 #include <core/workers.h>
 #include <drivers/opencl/driver_opencl.h>
 
-static struct starpu_driver_info driver_info = {
+static struct starpu_driver_info driver_info =
+{
 	.name_upper = "OpenCL",
 	.name_var = "OPENCL",
 	.name_lower = "opencl",
@@ -25,7 +26,8 @@ static struct starpu_driver_info driver_info = {
 	.alpha = 12.22f,
 };
 
-static struct starpu_memory_driver_info memory_driver_info = {
+static struct starpu_memory_driver_info memory_driver_info =
+{
 	.name_upper = "OpenCL",
 	.worker_archtype = STARPU_OPENCL_WORKER,
 };

+ 2 - 0
src/profiling/profiling.c

@@ -201,11 +201,13 @@ void _starpu_profiling_papi_task_start_counters(struct starpu_task *task)
 		for(i=0; i<papi_nevents; i++)
 		{
 			int ret = PAPI_add_event(profiling_info->papi_event_set, papi_events[i]);
+#ifdef PAPI_ECMP_DISABLED
 			if (ret == PAPI_ECMP_DISABLED && !warned_component_unavailable)
 			{
 				_STARPU_MSG("Error while registering Papi event: Component containing event is disabled. Try running `papi_component_avail` to get more information.\n");
 				warned_component_unavailable = 1;
 			}
+#endif
 			profiling_info->papi_values[i]=0;
 		}
 		PAPI_reset(profiling_info->papi_event_set);

+ 6 - 3
src/sched_policies/component_heteroprio.c

@@ -434,9 +434,12 @@ static int heteroprio_push_task(struct starpu_sched_component * component, struc
 			/* Didn't find it, add one */
 			data->naccel++;
 
-			float *newaccel = malloc(data->naccel * sizeof(*newaccel));
-			struct _starpu_prio_deque **newbuckets = malloc(data->naccel * sizeof(*newbuckets));
-			struct _starpu_prio_deque *newbucket = malloc(sizeof(*newbucket));
+			float *newaccel;
+			_STARPU_MALLOC(newaccel, data->naccel * sizeof(*newaccel));
+			struct _starpu_prio_deque **newbuckets;
+			_STARPU_MALLOC(newbuckets, data->naccel * sizeof(*newbuckets));
+			struct _starpu_prio_deque *newbucket;
+			_STARPU_MALLOC(newbucket, sizeof(*newbucket));
 			_starpu_prio_deque_init(newbucket);
 			int inserted = 0;
 

+ 5 - 0
src/sched_policies/helper_mct.c

@@ -88,6 +88,11 @@ static double compute_expected_time(double now, double predicted_end, double pre
 
 double starpu_mct_compute_fitness(struct _starpu_mct_data * d, double exp_end, double min_exp_end_of_task, double max_exp_end_of_workers, double transfer_len, double local_energy)
 {
+	if(isnan(local_energy))
+		/* Energy not calibrated yet, but we cannot do this
+		 * automatically anyway, so ignoring this for now */
+		local_energy = 0.;
+
 	/* Note: the expected end includes the data transfer duration, which we want to be able to tune separately */
 	
 	/* min_exp_end_of_task is the minimum end time of the task over all workers */

+ 2 - 1
src/sched_policies/work_stealing_policy.c

@@ -145,7 +145,8 @@ static int select_victim_round_robin(struct _starpu_work_stealing_data *ws, unsi
 		if (!ws->per_worker[workerids[worker]].notask)
 		{
 			if (ws->per_worker[workerids[worker]].busy
-						   || starpu_worker_is_blocked_in_parallel(workerids[worker])) {
+			    || starpu_worker_is_blocked_in_parallel(workerids[worker]))
+			{
 				ntasks = 1;
 				break;
 			}

+ 6 - 4
src/util/starpu_data_cpy.c

@@ -86,7 +86,7 @@ void mp_cpy_kernel(void *descr[], void *cl_arg)
 
 	const struct starpu_data_interface_ops *interface_ops = _starpu_data_interface_get_ops(interface_id);
 	const struct starpu_data_copy_methods *copy_methods = interface_ops->copy_methods;
-	
+
 	void *dst_interface = descr[0];
 	void *src_interface = descr[1];
 
@@ -151,7 +151,7 @@ int _starpu_data_cpy(starpu_data_handle_t dst_handle, starpu_data_handle_t src_h
 
 	unsigned *interface_id;
 	_STARPU_MALLOC(interface_id, sizeof(*interface_id));
-	*interface_id = dst_handle->ops->interfaceid; 
+	*interface_id = dst_handle->ops->interfaceid;
 	task->cl_arg = interface_id;
 	task->cl_arg_size = sizeof(*interface_id);
 	task->cl_arg_free = 1;
@@ -181,7 +181,8 @@ int starpu_data_cpy(starpu_data_handle_t dst_handle, starpu_data_handle_t src_ha
 int starpu_data_dup_ro(starpu_data_handle_t *dst_handle, starpu_data_handle_t src_handle, int asynchronous)
 {
 	_starpu_spin_lock(&src_handle->header_lock);
-	if (src_handle->readonly_dup) {
+	if (src_handle->readonly_dup)
+	{
 		/* Already a ro duplicate, just return it with one more ref */
 		*dst_handle = src_handle->readonly_dup;
 		_starpu_spin_unlock(&src_handle->header_lock);
@@ -190,7 +191,8 @@ int starpu_data_dup_ro(starpu_data_handle_t *dst_handle, starpu_data_handle_t sr
 		_starpu_spin_unlock(&(*dst_handle)->header_lock);
 		return 0;
 	}
-	if (src_handle->readonly) {
+	if (src_handle->readonly)
+	{
 		src_handle->aliases++;
 		_starpu_spin_unlock(&src_handle->header_lock);
 		*dst_handle = src_handle;

+ 1 - 1
starpu-1.0-mic.pc.in

@@ -23,7 +23,7 @@ Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_H_CPPFLAGS@
-Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_EXPORTED_LIBS@
+Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_EXPORTED_LIBS@ @STARPU_SC_HYPERVISOR@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@
 Requires.private: @GORDON_REQUIRES@

+ 1 - 1
starpu-1.0.pc.in

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

+ 1 - 1
starpu-1.1.pc.in

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

+ 1 - 1
starpu-1.2.pc.in

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

+ 1 - 1
starpu-1.3.pc.in

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

+ 2 - 1
tests/datawizard/bcsr.c

@@ -123,7 +123,8 @@ int main(int argc, char **argv)
 	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV)
 		return STARPU_TEST_SKIPPED;
 
-	if (starpu_cpu_worker_get_count() == 0 || starpu_memory_nodes_get_count() > 1) {
+	if (starpu_cpu_worker_get_count() == 0 || starpu_memory_nodes_get_count() > 1)
+	{
 		starpu_shutdown();
 		return STARPU_TEST_SKIPPED;
 	}

+ 2 - 1
tests/microbenchs/bandwidth.c

@@ -170,7 +170,8 @@ static unsigned interleave(unsigned i)
 		return 0;
 }
 
-enum sleep_type {
+enum sleep_type
+{
 	PAUSE,
 	NOP,
 	SYNC,

+ 2 - 0
tests/microbenchs/tasks_size_overhead.c

@@ -228,6 +228,8 @@ int main(int argc, char **argv)
 		goto error;
 	}
 
+	if (mincpus <= 0)
+		mincpus = 1;
 	/* For each number of cpus, benchmark */
 	for (ncpus= mincpus; ncpus <= maxcpus; ncpus += cpustep)
 	{

+ 8 - 1
tests/perfmodels/regression_based_memset.c

@@ -213,7 +213,7 @@ static int bench_energy(int workerid, int where, enum starpu_worker_archtype arc
 		if ( (retval = starpu_energy_start(workerid, archtype)) != 0)
 		{
 			starpu_data_unregister(handle);
-			_STARPU_DISP("Energy measurement not supported for archtype %d\n", archtype);
+			_STARPU_DISP("Energy measurement not supported for archtype %s\n", starpu_perfmodel_get_archtype_name(archtype));
 			return -1;
 		}
 
@@ -328,6 +328,9 @@ int main(int argc, char **argv)
 	starpu_conf_init(&conf);
 
 	/* Use a scheduler which doesn't choose the implementation */
+#ifdef STARPU_HAVE_UNSETENV
+	unsetenv("STARPU_SCHED");
+#endif
 	conf.sched_policy_name = "eager";
 	conf.calibrate = 1;
 
@@ -345,15 +348,19 @@ int main(int argc, char **argv)
 	{
 		memset_cl.cpu_funcs[1] = NULL;
 		bench_energy(-1, STARPU_CPU, STARPU_CPU_WORKER, 0, &memset_cl);
+#ifdef STARPU_HAVE_UNSETENV
 		memset_cl.cpu_funcs[1] = memset_cpu;
 		memset_cl.cpu_funcs[0] = NULL;
 		bench_energy(-1, STARPU_CPU, STARPU_CPU_WORKER, 1, &memset_cl);
+#endif
 
 		nl_memset_cl.cpu_funcs[1] = NULL;
 		bench_energy(-1, STARPU_CPU, STARPU_CPU_WORKER, 0, &nl_memset_cl);
+#ifdef STARPU_HAVE_UNSETENV
 		nl_memset_cl.cpu_funcs[1] = memset_cpu;
 		nl_memset_cl.cpu_funcs[0] = NULL;
 		bench_energy(-1, STARPU_CPU, STARPU_CPU_WORKER, 1, &nl_memset_cl);
+#endif
 	}
 
 	for (i = 0; i < starpu_cuda_worker_get_count(); i++)

+ 1 - 1
tools/dev/checker/starpu_check_copyright.sh

@@ -16,7 +16,7 @@
 #
 REP=${1:-.}
 
-find $REP -not -path "*build*" -not -path "*tools/perfmodels/sampling*" -not -path "*starpu-top*"  -not -path "*min-dgels*" -not -name ".gitignore" -not -name "*.eps"  -not -name "*.pdf" -not -name "*.png" -not -path "*.deps*" -type f > /tmp/list_$$
+find $REP -not -path "*build*" -not -path "*.git*" -not -path "*tools/perfmodels/sampling*" -not -path "*starpu-top*"  -not -path "*min-dgels*" -not -name ".gitignore" -not -name "*.eps"  -not -name "*.pdf" -not -name "*.png" -not -path "*.deps*" -type f > /tmp/list_$$
 
 for f in $(cat /tmp/list_$$)
 do

+ 9 - 1
tools/starpu_fxt_data_trace.c

@@ -164,7 +164,15 @@ static void write_gp(char *dir, int argc, char **argv)
 	}
 
 	/* Make the gnuplot scrit executable for the owner */
-	ret = chmod(file_name, sb.st_mode|S_IXUSR);
+	ret = chmod(file_name, sb.st_mode|S_IXUSR
+#ifdef S_IXGRP
+					 |S_IXGRP
+#endif
+#ifdef S_IXOTH
+					 |S_IXOTH
+#endif
+					 );
+
 	if (ret)
 	{
 		perror("chmod");

+ 16 - 4
tools/starpu_perfmodel_plot.c

@@ -527,7 +527,7 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel
 	/* If no input data is given to gnuplot, we at least need to specify an
 	 * arbitrary range. */
 	if (options->with_fxt_file == 0 || options->gflops)
-		fprintf(gnuplot_file, "set xrange [1:10**9]\n\n");
+		fprintf(gnuplot_file, "set xrange [1 < * < 10**5 : 10**6 < * < 10**9]\n\n");
 
 	int first = 1;
 	fprintf(gnuplot_file, "plot\t");
@@ -608,10 +608,15 @@ int main(int argc, char **argv)
 #endif
 
 			if (options.energy_symbol)
+			{
 				snprintf(gnuplot_file_name, sizeof(gnuplot_file_name), "%s/starpu_power_%s.gp", directory, options.symbol);
+				snprintf(options.avg_file_name, sizeof(options.avg_file_name), "%s/starpu_power_%s_avg.data", directory, options.symbol);
+			}
 			else
+			{
 				snprintf(gnuplot_file_name, sizeof(gnuplot_file_name), "%s/starpu_%s.gp", directory, options.symbol);
-			snprintf(options.avg_file_name, sizeof(options.avg_file_name), "%s/starpu_%s_avg.data", directory, options.symbol);
+				snprintf(options.avg_file_name, sizeof(options.avg_file_name), "%s/starpu_%s_avg.data", directory, options.symbol);
+			}
 
 			FILE *gnuplot_file = fopen(gnuplot_file_name, "w+");
 			STARPU_ASSERT_MSG(gnuplot_file, "Cannot create file <%s>\n", gnuplot_file_name);
@@ -628,8 +633,15 @@ int main(int argc, char **argv)
 				STARPU_ABORT();
 			}
 
-			/* Make the gnuplot scrit executable for the owner */
-			ret = chmod(gnuplot_file_name, sb.st_mode|S_IXUSR);
+			/* Make the gnuplot scrit executable */
+			ret = chmod(gnuplot_file_name, sb.st_mode|S_IXUSR
+#ifdef S_IXGRP
+								 |S_IXGRP
+#endif
+#ifdef S_IXOTH
+								 |S_IXOTH
+#endif
+								 );
 			if (ret)
 			{
 				perror("chmod");

+ 3 - 2
tools/starpu_perfmodel_recdump.c

@@ -58,7 +58,8 @@ struct _footprint_list* add_footprint(struct _footprint_list* list, uint32_t foo
 	if(l) return list;
 	else
 	{
-		struct _footprint_list * res = malloc(sizeof(struct _footprint_list));
+		struct _footprint_list *res;
+		_STARPU_MALLOC(res, sizeof(struct _footprint_list));
 		res->footprint = footprint;
 		res->next = list;
 		return res;
@@ -294,7 +295,7 @@ int main(int argc, char **argv)
 					HASH_FIND_STR(models, model_name, model);
 					if (model == NULL)
 					{
-						model = malloc(sizeof(*model));
+						_STARPU_MALLOC(model, sizeof(*model));
 						model->name = model_name;
 						model->footprints = NULL;
 						memset(&model->model, 0, sizeof(model->model));