Просмотр исходного кода

Merge branch 'master' of gitlab.inria.fr:starpu/starpu

Samuel Thibault лет назад: 5
Родитель
Сommit
42ece082d8
64 измененных файлов с 381 добавлено и 331 удалено
  1. 27 18
      configure.ac
  2. 10 10
      doc/doxygen/chapters/320_scheduling.doxy
  3. 37 8
      doc/doxygen/chapters/410_mpi_support.doxy
  4. 1 1
      doc/doxygen/chapters/510_configure_options.doxy
  5. 6 5
      examples/Makefile.am
  6. 1 2
      examples/gl_interop/gl_interop.c
  7. 1 2
      examples/gl_interop/gl_interop_idle.c
  8. 1 3
      examples/matvecmult/matvecmult.c
  9. 1 4
      examples/perf_steering/perf_knobs_03.c
  10. 9 9
      examples/scheduler/heteroprio_test.c
  11. 6 4
      examples/stencil/Makefile.am
  12. 4 30
      include/schedulers/starpu_heteroprio.h
  13. 11 0
      include/starpu.h
  14. 9 5
      include/starpu_task.h
  15. 13 2
      include/starpu_worker.h
  16. 7 5
      julia/examples/Makefile.am
  17. 3 4
      julia/src/Makefile.am
  18. 5 4
      julia/src/dynamic_compiler/Makefile.am
  19. 1 1
      libstarpu-mic.pc.in
  20. 3 2
      libstarpu.pc.in
  21. 13 2
      m4/libs.m4
  22. 7 5
      mpi/examples/Makefile.am
  23. 6 5
      mpi/src/Makefile.am
  24. 6 5
      mpi/tests/Makefile.am
  25. 2 4
      mpi/tools/Makefile.am
  26. 5 4
      sc_hypervisor/examples/Makefile.am
  27. 2 4
      sc_hypervisor/src/Makefile.am
  28. 5 3
      socl/examples/Makefile.am
  29. 3 4
      socl/src/Makefile.am
  30. 4 3
      src/Makefile.am
  31. 8 0
      src/core/perfmodel/perfmodel_bus.c
  32. 33 8
      src/core/workers.c
  33. 13 0
      src/datawizard/memory_nodes.c
  34. 1 0
      src/profiling/bound.c
  35. 34 76
      src/sched_policies/heteroprio.c
  36. 1 1
      starpu-1.0-mic.pc.in
  37. 2 5
      starpu-1.0.pc.in
  38. 2 2
      starpu-1.1.pc.in
  39. 2 2
      starpu-1.2.pc.in
  40. 2 2
      starpu-1.3.pc.in
  41. 6 0
      starpu-notests.mk
  42. 5 0
      starpu.mk
  43. 5 3
      starpufft/src/Makefile.am
  44. 5 4
      starpufft/tests/Makefile.am
  45. 5 3
      starpurm/examples/Makefile.am
  46. 2 4
      starpurm/src/Makefile.am
  47. 6 5
      tests/Makefile.am
  48. 3 3
      tests/datawizard/bcsr.c
  49. 4 2
      tests/datawizard/manual_reduction.c
  50. 1 4
      tests/datawizard/noreclaim.c
  51. 1 0
      tests/datawizard/partition_dep.c
  52. 2 3
      tests/disk/disk_copy.c
  53. 3 3
      tests/disk/disk_copy_unpack.c
  54. 3 3
      tests/disk/disk_pack.c
  55. 3 3
      tests/disk/mem_reclaim.c
  56. 2 2
      tests/energy/energy_efficiency.c
  57. 2 2
      tests/errorcheck/invalid_tasks.c
  58. 1 5
      tests/errorcheck/starpu_init_noworker.c
  59. 2 4
      tests/errorcheck/workers_cpuid.c
  60. 3 6
      tests/main/driver_api/init_run_deinit.c
  61. 3 5
      tests/main/driver_api/run_driver.c
  62. 3 8
      tests/microbenchs/bandwidth.c
  63. 2 2
      tests/microbenchs/tasks_size_overhead.c
  64. 2 3
      tools/Makefile.am

+ 27 - 18
configure.ac

@@ -1010,6 +1010,7 @@ if test "x$enable_sc_hypervisor" = "xyes"; then
   AC_DEFINE(STARPU_USE_SC_HYPERVISOR, [1], [enable sc_hypervisor lib])
   AC_DEFINE(STARPU_USE_SC_HYPERVISOR, [1], [enable sc_hypervisor lib])
 #   PKG_CHECK_MODULES([SC_HYPERVISOR], [libsc_hypervisor], [], build_sc_hypervisor="yes")
 #   PKG_CHECK_MODULES([SC_HYPERVISOR], [libsc_hypervisor], [], build_sc_hypervisor="yes")
    STARPU_SC_HYPERVISOR="-lsc_hypervisor"
    STARPU_SC_HYPERVISOR="-lsc_hypervisor"
+   STARPU_EXPORTED_LIBS="$STARPU_EXPORTED_LIBS $STARPU_SC_HYPERVISOR"
    build_sc_hypervisor="yes"
    build_sc_hypervisor="yes"
 else
 else
    build_sc_hypervisor="no"
    build_sc_hypervisor="no"
@@ -1945,10 +1946,7 @@ if test x$enable_debug = xyes; then
 	FCFLAGS="$FCFLAGS -O0"
 	FCFLAGS="$FCFLAGS -O0"
 	enable_spinlock_check=yes
 	enable_spinlock_check=yes
 	if test x$GCC = xyes; then
 	if test x$GCC = xyes; then
-	   	IS_SUPPORTED_CFLAG(-Og)
-	   	IS_SUPPORTED_CXXFLAG(-Og)
-	   	IS_SUPPORTED_FFLAG(-Og)
-	   	IS_SUPPORTED_FCFLAG(-Og)
+		IS_SUPPORTED_FLAG(-Og)
 		if test x$starpu_windows != xyes ; then
 		if test x$starpu_windows != xyes ; then
 			if test x$enable_fstack_protector_all = xyes ; then
 			if test x$enable_fstack_protector_all = xyes ; then
 			   CFLAGS="$CFLAGS -fstack-protector-all"
 			   CFLAGS="$CFLAGS -fstack-protector-all"
@@ -2449,30 +2447,35 @@ AC_DEFINE_UNQUOTED(STARPU_MAXMPKERNELS, [$maxmpkernels],
 #                                                                             #
 #                                                                             #
 ###############################################################################
 ###############################################################################
 
 
-IS_SUPPORTED_CFLAG(-Wall)
+IS_SUPPORTED_FLAG(-Wall)
 IS_SUPPORTED_CFLAG(-Werror=implicit)
 IS_SUPPORTED_CFLAG(-Werror=implicit)
 IS_SUPPORTED_CFLAG(-Werror=implicit-function-declaration)
 IS_SUPPORTED_CFLAG(-Werror=implicit-function-declaration)
 if test x$enable_perf_debug = xyes; then
 if test x$enable_perf_debug = xyes; then
-	IS_SUPPORTED_CFLAG(-no-pie)
-	IS_SUPPORTED_CFLAG(-no-PIE)
-	IS_SUPPORTED_CFLAG(-fno-pie)
+	IS_SUPPORTED_FLAG(-no-pie)
+	IS_SUPPORTED_FLAG(-no-PIE)
+	IS_SUPPORTED_FLAG(-fno-pie)
 fi
 fi
 
 
 if test "x$STARPU_DEVEL" != x; then
 if test "x$STARPU_DEVEL" != x; then
 	AC_DEFINE(STARPU_DEVEL, [1], [enable developer warnings])
 	AC_DEFINE(STARPU_DEVEL, [1], [enable developer warnings])
-	IS_SUPPORTED_CFLAG(-Wextra)
-	IS_SUPPORTED_CFLAG(-Wunused)
+	IS_SUPPORTED_FLAG(-Wextra)
+	IS_SUPPORTED_FLAG(-Wunused)
 	IS_SUPPORTED_CFLAG(-Wundef)
 	IS_SUPPORTED_CFLAG(-Wundef)
-	IS_SUPPORTED_CFLAG(-Wshadow)
+	IS_SUPPORTED_CXXFLAG(-Wundef)
+	IS_SUPPORTED_FLAG(-Wshadow)
 	IS_SUPPORTED_CFLAG(-Werror=pointer-arith)
 	IS_SUPPORTED_CFLAG(-Werror=pointer-arith)
-	IS_SUPPORTED_CFLAG(-fno-common)
+	IS_SUPPORTED_CXXFLAG(-Werror=pointer-arith)
+	IS_SUPPORTED_FLAG(-fno-common)
 	if test x$enable_debug = xyes; then
 	if test x$enable_debug = xyes; then
-		IS_SUPPORTED_CFLAG(-fno-optimize-sibling-calls)
+		IS_SUPPORTED_FLAG(-fno-optimize-sibling-calls)
 	fi
 	fi
 fi
 fi
 AM_CONDITIONAL([STARPU_DEVEL],[test "x$STARPU_DEVEL" != x])
 AM_CONDITIONAL([STARPU_DEVEL],[test "x$STARPU_DEVEL" != x])
 
 
 AC_SUBST(GLOBAL_AM_CFLAGS)
 AC_SUBST(GLOBAL_AM_CFLAGS)
+AC_SUBST(GLOBAL_AM_CXXFLAGS)
+AC_SUBST(GLOBAL_AM_FFLAGS)
+AC_SUBST(GLOBAL_AM_FCFLAGS)
 
 
 # Same value as Automake's, for use in other places.
 # Same value as Automake's, for use in other places.
 pkglibdir="\${libdir}/$PACKAGE"
 pkglibdir="\${libdir}/$PACKAGE"
@@ -2658,6 +2661,7 @@ if test x$enable_simgrid = xno; then
   if test -n "{OPENMP_CFLAGS}"; then
   if test -n "{OPENMP_CFLAGS}"; then
      CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}"
      CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}"
      STARPU_OMP_LDFLAGS="${OPENMP_CFLAGS}"
      STARPU_OMP_LDFLAGS="${OPENMP_CFLAGS}"
+     STARPU_EXPORTED_LIBS="$STARPU_EXPORTED_LIBS ${OPENMP_CFLAGS}"
   fi
   fi
 fi
 fi
 AM_CONDITIONAL([STARPU_HAVE_OPENMP],[test x$enable_simgrid = xno -a -n "$OPENMP_CFLAGS"])
 AM_CONDITIONAL([STARPU_HAVE_OPENMP],[test x$enable_simgrid = xno -a -n "$OPENMP_CFLAGS"])
@@ -3451,21 +3455,26 @@ AC_SUBST(JULIA, $juliapath)
 #                                                                             #
 #                                                                             #
 ###############################################################################
 ###############################################################################
 
 
+# these are the flags needed to compile starpu.h
+STARPU_H_CPPFLAGS="$HWLOC_CFLAGS $STARPU_CUDA_CPPFLAGS $STARPU_OPENCL_CPPFLAGS $SIMGRID_CFLAGS $OPENMP_CFLAGS"
+AC_SUBST([STARPU_H_CPPFLAGS])
+
 # these are the flags needed for linking libstarpu (and thus also for static linking)
 # these are the flags needed for linking libstarpu (and thus also for static linking)
-LIBSTARPU_LDFLAGS="$STARPU_OPENCL_LDFLAGS $STARPU_CUDA_LDFLAGS $HWLOC_LIBS $FXT_LIBS $PAPI_LIBS $STARPU_COI_LDFLAGS $STARPU_SCIF_LDFLAGS $STARPU_RCCE_LDFLAGS $STARPU_LEVELDB_LDFLAGS $STARPU_GLPK_LDFLAGS $STARPU_LEVELDB_LDFLAGS $SIMGRID_LIBS $STARPU_BLAS_LDFLAGS $STARPU_OMP_LDFLAGS $DGELS_LIBS"
+LIBSTARPU_LDFLAGS="$STARPU_OPENCL_LDFLAGS $STARPU_CUDA_LDFLAGS $HWLOC_LIBS $FXT_LDFLAGS $FXT_LIBS $PAPI_LIBS $STARPU_COI_LDFLAGS $STARPU_SCIF_LDFLAGS $STARPU_RCCE_LDFLAGS $STARPU_LEVELDB_LDFLAGS $STARPU_GLPK_LDFLAGS $STARPU_LEVELDB_LDFLAGS $SIMGRID_LIBS $STARPU_BLAS_LDFLAGS $STARPU_OMP_LDFLAGS $DGELS_LIBS"
 AC_SUBST([LIBSTARPU_LDFLAGS])
 AC_SUBST([LIBSTARPU_LDFLAGS])
 
 
-LIBSTARPU_LINK=libstarpu-$STARPU_EFFECTIVE_VERSION.la
-
+# these are the flags needed for linking against libstarpu (because starpu.h makes its includer use pthread_*, simgrid, etc.)
 if test "x$enable_shared" = xno; then
 if test "x$enable_shared" = xno; then
-        # No .so, so application will unexpected have to know which -l to
+        # No .so, so application will unexpectedly have to know which -l to
         # use. Give them in .pc file.
         # use. Give them in .pc file.
 	AC_DEFINE(STARPU_STATIC_ONLY, [1], [Only static compilation was made])
 	AC_DEFINE(STARPU_STATIC_ONLY, [1], [Only static compilation was made])
 	STARPU_EXPORTED_LIBS="$STARPU_EXPORTED_LIBS $LDFLAGS $LIBS $LIBSTARPU_LDFLAGS"
 	STARPU_EXPORTED_LIBS="$STARPU_EXPORTED_LIBS $LDFLAGS $LIBS $LIBSTARPU_LDFLAGS"
 fi
 fi
+AC_SUBST(STARPU_EXPORTED_LIBS)
+
+LIBSTARPU_LINK=libstarpu-$STARPU_EFFECTIVE_VERSION.la
 LIBSTARPU_LINK="$LIBSTARPU_LINK $STARPU_EXPORTED_LIBS"
 LIBSTARPU_LINK="$LIBSTARPU_LINK $STARPU_EXPORTED_LIBS"
 AC_SUBST([LIBSTARPU_LINK])
 AC_SUBST([LIBSTARPU_LINK])
-AC_SUBST(STARPU_EXPORTED_LIBS)
 
 
 # File configuration
 # File configuration
 AC_CONFIG_COMMANDS([executable-scripts], [
 AC_CONFIG_COMMANDS([executable-scripts], [

+ 10 - 10
doc/doxygen/chapters/320_scheduling.doxy

@@ -404,31 +404,31 @@ starpu_init(&conf);
 
 
 void init_heteroprio(unsigned sched_ctx) {
 void init_heteroprio(unsigned sched_ctx) {
   // CPU uses 5 buckets and visits them in the natural order
   // CPU uses 5 buckets and visits them in the natural order
-  starpu_heteroprio_set_nb_prios(ctx, STARPU_CPU_IDX, 5);
+  starpu_heteroprio_set_nb_prios(ctx, STARPU_CPU_WORKER, 5);
   // It uses direct mapping idx => idx
   // It uses direct mapping idx => idx
   for(unsigned idx = 0; idx < 5; ++idx){
   for(unsigned idx = 0; idx < 5; ++idx){
-    starpu_heteroprio_set_mapping(ctx, STARPU_CPU_IDX, idx, idx);
+    starpu_heteroprio_set_mapping(ctx, STARPU_CPU_WORKER, idx, idx);
     // If there is no CUDA worker we must tell that CPU is faster
     // If there is no CUDA worker we must tell that CPU is faster
-    starpu_heteroprio_set_faster_arch(ctx, STARPU_CPU_IDX, idx);
+    starpu_heteroprio_set_faster_arch(ctx, STARPU_CPU_WORKER, idx);
   }
   }
   
   
   if(starpu_cuda_worker_get_count()){
   if(starpu_cuda_worker_get_count()){
     // CUDA is enabled and uses 2 buckets
     // CUDA is enabled and uses 2 buckets
-    starpu_heteroprio_set_nb_prios(ctx, STARPU_CUDA_IDX, 2);
+    starpu_heteroprio_set_nb_prios(ctx, STARPU_CUDA_WORKER, 2);
     // CUDA will first look at bucket 1
     // CUDA will first look at bucket 1
-    starpu_heteroprio_set_mapping(ctx, STARPU_CUDA_IDX, 0, 1);
+    starpu_heteroprio_set_mapping(ctx, STARPU_CUDA_WORKER, 0, 1);
     // CUDA will then look at bucket 2
     // CUDA will then look at bucket 2
-    starpu_heteroprio_set_mapping(ctx, STARPU_CUDA_IDX, 1, 2);
+    starpu_heteroprio_set_mapping(ctx, STARPU_CUDA_WORKER, 1, 2);
 
 
     // For bucket 1 CUDA is the fastest
     // For bucket 1 CUDA is the fastest
-    starpu_heteroprio_set_faster_arch(ctx, STARPU_CUDA_IDX, 1);
+    starpu_heteroprio_set_faster_arch(ctx, STARPU_CUDA_WORKER, 1);
     // And CPU is 30 times slower
     // And CPU is 30 times slower
-    starpu_heteroprio_set_arch_slow_factor(ctx, STARPU_CPU_IDX, 1, 30.0f);
+    starpu_heteroprio_set_arch_slow_factor(ctx, STARPU_CPU_WORKER, 1, 30.0f);
     
     
     // For bucket 0 CUDA is the fastest
     // For bucket 0 CUDA is the fastest
-    starpu_heteroprio_set_faster_arch(ctx, STARPU_CUDA_IDX, 0);
+    starpu_heteroprio_set_faster_arch(ctx, STARPU_CUDA_WORKER, 0);
     // And CPU is 20 times slower
     // And CPU is 20 times slower
-    starpu_heteroprio_set_arch_slow_factor(ctx, STARPU_CPU_IDX, 0, 20.0f);
+    starpu_heteroprio_set_arch_slow_factor(ctx, STARPU_CPU_WORKER, 0, 20.0f);
   }
   }
 }
 }
 \endcode
 \endcode

+ 37 - 8
doc/doxygen/chapters/410_mpi_support.doxy

@@ -1010,17 +1010,46 @@ data transfers and supports data matrices which do not fit in memory (out-of-cor
 </li>
 </li>
 </ul>
 </ul>
 
 
-\section MPIImplementation Notes about the Implementation
 
 
-StarPU-MPI is implemented directly on top of MPI.
+\section Nmad Using the NewMadeleine communication library
+
+NewMadeleine (see http://pm2.gforge.inria.fr/newmadeleine/, part of the PM2
+project) is an optimizing communication library for high-performance networks.
+NewMadeleine provides its own interface, but also an MPI interface (called
+MadMPI). Thus there are two possibilities to use NewMadeleine with StarPU:
+
+<ul>
+<li>
+using the NewMadeleine's native interface. StarPU supports this interface from
+its release 1.3.0, by enabling the \c configure option \ref enable-nmad
+"--enable-nmad". In this case, StarPU relies directly on NewMadeleine to make
+communications progress and NewMadeleine has to be built with the profile
+<c>pukabi+madmpi.conf</c>.
+</li>
+<li>
+using the NewMadeleine's MPI interface (MadMPI). StarPU will use the standard
+MPI API and NewMadeleine will handle the calls to the MPI API. In this case,
+StarPU makes communications progress and thus communication progress has to be
+disabled in NewMadeleine by compiling it with the profile
+<c>pukabi+madmpi-mini.conf</c>.
+</li>
+</ul>
+
+To build NewMadeleine, download the latest version from the website (or,
+better, use the Git version to use the most recent version), then:
+\code{.sh}
+cd pm2/scripts
+./pm2-build-packages ./<the profile you chose> --prefix=<installation prefix>
+\endcode
+
+With Guix, the NewMadeleine's native interface can be used by setting the
+parameter \c \-\-with-input=openmpi=nmad and MadMPI can be used with \c
+\-\-with-input=openmpi=nmad-mini.
+
+Whatever implementation (NewMadeleine or MadMPI) is used by StarPU, the public
+MPI interface of StarPU (described in \ref API_MPI_Support) is the same.
 
 
-Since the release 1.3.0, an implementation on top of NewMadeleine, an
-optimizing communication library for high-performance networks, is
-also provided. To use it, one needs to install NewMadeleine (see
-http://pm2.gforge.inria.fr/newmadeleine/) and enable the \c configure
-option \ref enable-nmad "--enable-nmad".
 
 
-Both implementations provide the same public API.
 
 
 \section MPIMasterSlave MPI Master Slave Support
 \section MPIMasterSlave MPI Master Slave Support
 
 

+ 1 - 1
doc/doxygen/chapters/510_configure_options.doxy

@@ -442,7 +442,7 @@ $ STARPU_SILENT=1 mpirun -np 2 ./insert_task
 <dd>
 <dd>
 \anchor enable-nmad
 \anchor enable-nmad
 \addindex __configure__--enable-nmad
 \addindex __configure__--enable-nmad
-Enable the NewMadeleine implementation for StarPU-MPI.
+Enable the NewMadeleine implementation for StarPU-MPI. See \ref Nmad for more details.
 </dd>
 </dd>
 
 
 <dt>--disable-fortran</dt>
 <dt>--disable-fortran</dt>

+ 6 - 5
examples/Makefile.am

@@ -18,12 +18,13 @@
 #
 #
 include $(top_srcdir)/starpu.mk
 include $(top_srcdir)/starpu.mk
 
 
-AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CXXFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
+AM_CFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_CXXFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) $(FXT_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
+LIBS += $(MAGMA_LIBS)
 
 
 SUBDIRS = stencil
 SUBDIRS = stencil
 
 

+ 1 - 2
examples/gl_interop/gl_interop.c

@@ -106,9 +106,8 @@ int main(int argc, char **argv)
 
 
 	/* Enable OpenGL interoperability */
 	/* Enable OpenGL interoperability */
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
+	starpu_conf_noworker(&conf);
 	conf.ncuda = 1;
 	conf.ncuda = 1;
-	conf.ncpus = 0;
-	conf.nopencl = 0;
 	conf.cuda_opengl_interoperability = cuda_devices;
 	conf.cuda_opengl_interoperability = cuda_devices;
 	conf.n_cuda_opengl_interoperability = sizeof(cuda_devices) / sizeof(*cuda_devices);
 	conf.n_cuda_opengl_interoperability = sizeof(cuda_devices) / sizeof(*cuda_devices);
 	conf.not_launched_drivers = drivers;
 	conf.not_launched_drivers = drivers;

+ 1 - 2
examples/gl_interop/gl_interop_idle.c

@@ -122,9 +122,8 @@ int main(int argc, char **argv)
 
 
 	/* Enable OpenGL interoperability */
 	/* Enable OpenGL interoperability */
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
+	starpu_conf_noworker(&conf);
 	conf.ncuda = 1;
 	conf.ncuda = 1;
-	conf.ncpus = 0;
-	conf.nopencl = 0;
 	conf.cuda_opengl_interoperability = cuda_devices;
 	conf.cuda_opengl_interoperability = cuda_devices;
 	conf.n_cuda_opengl_interoperability = sizeof(cuda_devices) / sizeof(*cuda_devices);
 	conf.n_cuda_opengl_interoperability = sizeof(cuda_devices) / sizeof(*cuda_devices);
 	conf.not_launched_drivers = drivers;
 	conf.not_launched_drivers = drivers;

+ 1 - 3
examples/matvecmult/matvecmult.c

@@ -142,9 +142,7 @@ int main(void)
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 
 
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
-	conf.ncpus = 0;
-	conf.ncuda = 0;
-	conf.nmic = 0;
+	starpu_conf_noworker(&conf);
 	conf.nopencl = 1;
 	conf.nopencl = 1;
 
 
         /* int width=1100; */
         /* int width=1100; */

+ 1 - 4
examples/perf_steering/perf_knobs_03.c

@@ -37,11 +37,8 @@ int main(int argc, char **argv)
 
 
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 2;
 	conf.ncpus = 2;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
 	{
 	{
 		const char *sched_pol_name = starpu_getenv("STARPU_SCHED");
 		const char *sched_pol_name = starpu_getenv("STARPU_SCHED");
 		if (sched_pol_name != NULL && strcmp(sched_pol_name, "prio") != 0)
 		if (sched_pol_name != NULL && strcmp(sched_pol_name, "prio") != 0)

+ 9 - 9
examples/scheduler/heteroprio_test.c

@@ -30,33 +30,33 @@ void initSchedulerCallback(unsigned sched_ctx)
 #ifdef STARPU_USE_CPU
 #ifdef STARPU_USE_CPU
 	if (starpu_cpu_worker_get_count())
 	if (starpu_cpu_worker_get_count())
 	{
 	{
-		starpu_heteroprio_set_nb_prios(0, STARPU_CPU_IDX, 3);
+		starpu_heteroprio_set_nb_prios(0, STARPU_CPU_WORKER, 3);
 		// It uses direct mapping idx => idx
 		// It uses direct mapping idx => idx
 		unsigned idx;
 		unsigned idx;
 		for(idx = 0; idx < 3; ++idx)
 		for(idx = 0; idx < 3; ++idx)
 		{
 		{
-			starpu_heteroprio_set_mapping(sched_ctx, STARPU_CPU_IDX, idx, idx);
-			starpu_heteroprio_set_faster_arch(sched_ctx, STARPU_CPU_IDX, idx);
+			starpu_heteroprio_set_mapping(sched_ctx, STARPU_CPU_WORKER, idx, idx);
+			starpu_heteroprio_set_faster_arch(sched_ctx, STARPU_CPU_WORKER, idx);
 		}
 		}
 	}
 	}
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
 	// OpenCL is enabled and uses 2 buckets
 	// OpenCL is enabled and uses 2 buckets
-	starpu_heteroprio_set_nb_prios(sched_ctx, STARPU_OPENCL_IDX, 2);
+	starpu_heteroprio_set_nb_prios(sched_ctx, STARPU_OPENCL_WORKER, 2);
 	// OpenCL will first look to priority 2
 	// OpenCL will first look to priority 2
 	int prio2 = starpu_cpu_worker_get_count() ? 2 : 1;
 	int prio2 = starpu_cpu_worker_get_count() ? 2 : 1;
-	starpu_heteroprio_set_mapping(sched_ctx, STARPU_OPENCL_IDX, 0, prio2);
+	starpu_heteroprio_set_mapping(sched_ctx, STARPU_OPENCL_WORKER, 0, prio2);
 	// For this bucket OpenCL is the fastest
 	// For this bucket OpenCL is the fastest
-	starpu_heteroprio_set_faster_arch(sched_ctx, STARPU_OPENCL_IDX, prio2);
+	starpu_heteroprio_set_faster_arch(sched_ctx, STARPU_OPENCL_WORKER, prio2);
 	// And CPU is 4 times slower
 	// And CPU is 4 times slower
 #ifdef STARPU_USE_CPU
 #ifdef STARPU_USE_CPU
-	starpu_heteroprio_set_arch_slow_factor(sched_ctx, STARPU_CPU_IDX, 2, 4.0f);
+	starpu_heteroprio_set_arch_slow_factor(sched_ctx, STARPU_CPU_WORKER, 2, 4.0f);
 #endif
 #endif
 
 
 	int prio1 = starpu_cpu_worker_get_count() ? 1 : 0;
 	int prio1 = starpu_cpu_worker_get_count() ? 1 : 0;
-	starpu_heteroprio_set_mapping(sched_ctx, STARPU_OPENCL_IDX, 1, prio1);
+	starpu_heteroprio_set_mapping(sched_ctx, STARPU_OPENCL_WORKER, 1, prio1);
 	// We let the CPU as the fastest and tell that OpenCL is 1.7 times slower
 	// We let the CPU as the fastest and tell that OpenCL is 1.7 times slower
-	starpu_heteroprio_set_arch_slow_factor(sched_ctx, STARPU_OPENCL_IDX, prio1, 1.7f);
+	starpu_heteroprio_set_arch_slow_factor(sched_ctx, STARPU_OPENCL_WORKER, prio1, 1.7f);
 #endif
 #endif
 }
 }
 
 

+ 6 - 4
examples/stencil/Makefile.am

@@ -15,11 +15,13 @@
 #
 #
 include $(top_srcdir)/starpu.mk
 include $(top_srcdir)/starpu.mk
 
 
-AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
+AM_CFLAGS += -Wno-unused
+
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) $(FXT_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@
+LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
+LIBS += $(STARPU_EXPORTED_LIBS)
 
 
 if STARPU_USE_MPI
 if STARPU_USE_MPI
 LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
 LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la

+ 4 - 30
include/schedulers/starpu_heteroprio.h

@@ -25,49 +25,23 @@ extern "C"
 #endif
 #endif
 
 
 #define STARPU_HETEROPRIO_MAX_PRIO 100
 #define STARPU_HETEROPRIO_MAX_PRIO 100
-/* #define STARPU_NB_TYPES 3 */
-/* #define STARPU_CPU_IDX 0 */
-/* #define STARPU_CUDA_IDX 1 */
-/* #define STARPU_OPENCL_IDX 2 */
 
 
 #define STARPU_HETEROPRIO_MAX_PREFETCH 2
 #define STARPU_HETEROPRIO_MAX_PREFETCH 2
 #if STARPU_HETEROPRIO_MAX_PREFETCH <= 0
 #if STARPU_HETEROPRIO_MAX_PREFETCH <= 0
 #error STARPU_HETEROPRIO_MAX_PREFETCH == 1 means no prefetch so STARPU_HETEROPRIO_MAX_PREFETCH must >= 1
 #error STARPU_HETEROPRIO_MAX_PREFETCH == 1 means no prefetch so STARPU_HETEROPRIO_MAX_PREFETCH must >= 1
 #endif
 #endif
 
 
-enum starpu_heteroprio_types
-{
-// First will be zero
-	STARPU_CPU_IDX, // = 0
-	STARPU_CUDA_IDX,
-	STARPU_OPENCL_IDX,
-	STARPU_MIC_IDX,
-	STARPU_MPI_MS_IDX,
-// This will be the number of archs
-	STARPU_NB_TYPES
-};
-
-static const unsigned starpu_heteroprio_types_to_arch[STARPU_NB_TYPES+1] =
-{
-	STARPU_CPU,
-	STARPU_CUDA,
-	STARPU_OPENCL,
-	STARPU_MIC,
-        STARPU_MPI_MS,
-	0
-};
-
 /** Tell how many prio there are for a given arch */
 /** Tell how many prio there are for a given arch */
-void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned max_prio);
+void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned max_prio);
 
 
 /** Set the mapping for a given arch prio=>bucket */
 /** Set the mapping for a given arch prio=>bucket */
-void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned source_prio, unsigned dest_bucket_id);
+void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned source_prio, unsigned dest_bucket_id);
 
 
 /** Tell which arch is the faster for the tasks of a bucket (optional) */
 /** Tell which arch is the faster for the tasks of a bucket (optional) */
-void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned bucket_id);
+void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id);
 
 
 /** Tell how slow is a arch for the tasks of a bucket (optional) */ 
 /** Tell how slow is a arch for the tasks of a bucket (optional) */ 
-void starpu_heteroprio_set_arch_slow_factor(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned bucket_id, float slow_factor);
+void starpu_heteroprio_set_arch_slow_factor(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id, float slow_factor);
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }

+ 11 - 0
include/starpu.h

@@ -486,6 +486,17 @@ struct starpu_conf
 int starpu_conf_init(struct starpu_conf *conf);
 int starpu_conf_init(struct starpu_conf *conf);
 
 
 /**
 /**
+   Set fields of \p conf so that no worker is enabled, i.e. set
+   starpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.
+
+   This allows to portably enable only a given type of worker:
+
+   starpu_conf_noworker(&conf);
+   conf.ncpus = -1;
+*/
+int starpu_conf_noworker(struct starpu_conf *conf);
+
+/**
    StarPU initialization method, must be called prior to any other
    StarPU initialization method, must be called prior to any other
    StarPU call. It is possible to specify StarPU’s configuration (e.g.
    StarPU call. It is possible to specify StarPU’s configuration (e.g.
    scheduling policy, number of cores, ...) by passing a
    scheduling policy, number of cores, ...) by passing a

+ 9 - 5
include/starpu_task.h

@@ -48,39 +48,43 @@ extern "C"
 #define STARPU_NOWHERE	((1ULL)<<0)
 #define STARPU_NOWHERE	((1ULL)<<0)
 
 
 /**
 /**
+  Convert from enum starpu_worker_archtype to worker type mask for use in "where" fields
+  */
+#define STARPU_WORKER_TO_MASK(worker_archtype) (1ULL << (worker_archtype + 1))
+/**
    To be used when setting the field starpu_codelet::where (or
    To be used when setting the field starpu_codelet::where (or
    starpu_task::where) to specify the codelet (or the task) may be
    starpu_task::where) to specify the codelet (or the task) may be
    executed on a CPU processing unit.
    executed on a CPU processing unit.
 */
 */
-#define STARPU_CPU	((1ULL)<<1)
+#define STARPU_CPU	STARPU_WORKER_TO_MASK(STARPU_CPU_WORKER)
 
 
 /**
 /**
    To be used when setting the field starpu_codelet::where (or
    To be used when setting the field starpu_codelet::where (or
    starpu_task::where) to specify the codelet (or the task) may be
    starpu_task::where) to specify the codelet (or the task) may be
    executed on a CUDA processing unit.
    executed on a CUDA processing unit.
 */
 */
-#define STARPU_CUDA	((1ULL)<<3)
+#define STARPU_CUDA	STARPU_WORKER_TO_MASK(STARPU_CUDA_WORKER)
 
 
 /**
 /**
    To be used when setting the field starpu_codelet::where (or
    To be used when setting the field starpu_codelet::where (or
    starpu_task::where) to specify the codelet (or the task) may be
    starpu_task::where) to specify the codelet (or the task) may be
    executed on a OpenCL processing unit.
    executed on a OpenCL processing unit.
 */
 */
-#define STARPU_OPENCL	((1ULL)<<6)
+#define STARPU_OPENCL	STARPU_WORKER_TO_MASK(STARPU_OPENCL_WORKER)
 
 
 /**
 /**
    To be used when setting the field starpu_codelet::where (or
    To be used when setting the field starpu_codelet::where (or
    starpu_task::where) to specify the codelet (or the task) may be
    starpu_task::where) to specify the codelet (or the task) may be
    executed on a MIC processing unit.
    executed on a MIC processing unit.
 */
 */
-#define STARPU_MIC	((1ULL)<<7)
+#define STARPU_MIC	STARPU_WORKER_TO_MASK(STARPU_MIC_WORKER)
 
 
 /**
 /**
    To be used when setting the field starpu_codelet::where (or
    To be used when setting the field starpu_codelet::where (or
    starpu_task::where) to specify the codelet (or the task) may be
    starpu_task::where) to specify the codelet (or the task) may be
    executed on a MPI Slave processing unit.
    executed on a MPI Slave processing unit.
 */
 */
-#define STARPU_MPI_MS	((1ULL)<<9)
+#define STARPU_MPI_MS	STARPU_WORKER_TO_MASK(STARPU_MPI_MS_WORKER)
 
 
 /**
 /**
    Value to be set in starpu_codelet::flags to execute the codelet
    Value to be set in starpu_codelet::flags to execute the codelet

+ 13 - 2
include/starpu_worker.h

@@ -66,7 +66,8 @@ enum starpu_worker_archtype
 	STARPU_OPENCL_WORKER=2,     /**< OpenCL device */
 	STARPU_OPENCL_WORKER=2,     /**< OpenCL device */
 	STARPU_MIC_WORKER=3,        /**< Intel MIC device */
 	STARPU_MIC_WORKER=3,        /**< Intel MIC device */
 	STARPU_MPI_MS_WORKER=5,     /**< MPI Slave device */
 	STARPU_MPI_MS_WORKER=5,     /**< MPI Slave device */
-	STARPU_ANY_WORKER=6         /**< any worker, used in the hypervisor */
+	STARPU_MAX_WORKER=5,        /**< maximum value of STARPU_*_WORKER */
+	STARPU_ANY_WORKER=255       /**< any worker, used in the hypervisor */
 };
 };
 
 
 /**
 /**
@@ -312,7 +313,12 @@ unsigned starpu_worker_is_slave_somewhere(int workerid);
 /**
 /**
    Return worker \p type as a string.
    Return worker \p type as a string.
 */
 */
-char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type);
+const char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type);
+
+/**
+   Return worker \p type as a trivial string (CPU, CUDA, etc.)
+*/
+const char *starpu_worker_get_type_as_short_string(enum starpu_worker_archtype type);
 
 
 int starpu_bindid_get_workerids(int bindid, int **workerids);
 int starpu_bindid_get_workerids(int bindid, int **workerids);
 
 
@@ -375,6 +381,11 @@ int starpu_memory_nodes_numa_devid_to_id(unsigned id);
 enum starpu_node_kind starpu_node_get_kind(unsigned node);
 enum starpu_node_kind starpu_node_get_kind(unsigned node);
 
 
 /**
 /**
+   Return the type of worker which operates on memory node kind \p node_kind
+  */
+enum starpu_worker_archtype starpu_memory_node_get_worker_archtype(enum starpu_node_kind node_kind);
+
+/**
    @name Scheduling operations
    @name Scheduling operations
    @{
    @{
 */
 */

+ 7 - 5
julia/examples/Makefile.am

@@ -85,7 +85,7 @@ if STARPU_USE_CUDA
 if STARPU_COVERITY
 if STARPU_COVERITY
 include $(top_srcdir)/starpu-mynvcc.mk
 include $(top_srcdir)/starpu-mynvcc.mk
 else
 else
-NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
+NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(STARPU_H_CPPFLAGS)
 
 
 .cu.cubin:
 .cu.cubin:
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
@@ -95,10 +95,12 @@ NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -
 endif
 endif
 endif
 endif
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpujulia-@STARPU_EFFECTIVE_VERSION@.la -lm $(FXT_LIBS) $(MAGMA_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += $(MAGMA_CFLAGS) -Wno-unused
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include $(STARPU_H_CPPFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpujulia-@STARPU_EFFECTIVE_VERSION@.la $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
+LIBS += -lm
 
 
 check_PROGRAMS = $(LOADER) $(starpu_julia_EXAMPLES)
 check_PROGRAMS = $(LOADER) $(starpu_julia_EXAMPLES)
 SHELL_TESTS	=
 SHELL_TESTS	=

+ 3 - 4
julia/src/Makefile.am

@@ -18,10 +18,9 @@ include $(top_srcdir)/starpu-notests.mk
 
 
 CLEANFILES = *.gcno *.gcda
 CLEANFILES = *.gcno *.gcda
 
 
-AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS) $(FXT_CFLAGS) -fPIC
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/julia/src
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ `@JULIA@ $(top_srcdir)/julia/src/openblas_ldflags.jl`
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS)
+AM_CFLAGS += -fPIC
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/julia/src $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ `@JULIA@ $(top_srcdir)/julia/src/openblas_ldflags.jl` $(STARPU_EXPORTED_LIBS)
 
 
 SUBDIRS = dynamic_compiler
 SUBDIRS = dynamic_compiler
 
 

+ 5 - 4
julia/src/dynamic_compiler/Makefile.am

@@ -14,14 +14,15 @@
 # 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.
 #
 #
 
 
+include $(top_srcdir)/starpu-notests.mk
+
 LD=$(CC_OR_NVCC)
 LD=$(CC_OR_NVCC)
 AM_CPPFLAGS = -I$(abs_top_srcdir)/include/ -I$(abs_top_builddir)/src -I$(abs_top_builddir)/include \
 AM_CPPFLAGS = -I$(abs_top_srcdir)/include/ -I$(abs_top_builddir)/src -I$(abs_top_builddir)/include \
-	 -I$(abs_top_srcdir)/julia/src/
+	 -I$(abs_top_srcdir)/julia/src/ $(STARPU_H_CPPFLAGS)
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS)
-AM_CFLAGS += -fPIC -O3 -g -DSTRIDE=${STRIDE} -Wall -mavx -fomit-frame-pointer -march=native -ffast-math
+AM_CFLAGS += -fPIC -DSTRIDE=${STRIDE} -mavx -fomit-frame-pointer -march=native -ffast-math
 LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@
 LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@
-LIBS += -L @STARPU_BUILD_DIR@/julia/src/.libs/ -lstarpujulia-1.3
+LIBS += -L $(top_builddir)/julia/src/libstarpujulia-$(STARPU_EFFECTIVE_VERSION).1.3
 CUDA_CFLAGS = $(STARPU_CUDA_CPPFLAGS) -Wno-deprecated-gpu-targets
 CUDA_CFLAGS = $(STARPU_CUDA_CPPFLAGS) -Wno-deprecated-gpu-targets
 EXTERNLIB=extern_tasks.so
 EXTERNLIB=extern_tasks.so
 GENERATEDLIB=generated_tasks.so
 GENERATEDLIB=generated_tasks.so

+ 1 - 1
libstarpu-mic.pc.in

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

+ 3 - 2
libstarpu.pc.in

@@ -16,12 +16,13 @@
 prefix=@prefix@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 libdir=@libdir@
+pkglibdir=@pkglibdir@
 includedir=@includedir@
 includedir=@includedir@
 
 
 Name: starpu
 Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Version: @PACKAGE_VERSION@
-Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@ @SIMGRID_CFLAGS@ -DSTARPU_USE_DEPRECATED_API -DSTARPU_USE_DEPRECATED_ONE_ZERO_API
-Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_SC_HYPERVISOR@ @STARPU_EXPORTED_LIBS@
+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.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@
 Requires: @HWLOC_REQUIRES@

+ 13 - 2
m4/libs.m4

@@ -103,7 +103,7 @@ AC_DEFUN([IS_SUPPORTED_CFLAG],
 
 
 # IS_SUPPORTED_CXXFLAG(flag)
 # IS_SUPPORTED_CXXFLAG(flag)
 # ------------------------
 # ------------------------
-# Check if the CFLAGS `flag' is supported by the compiler
+# Check if the CXXFLAGS `flag' is supported by the compiler
 AC_DEFUN([IS_SUPPORTED_CXXFLAG],
 AC_DEFUN([IS_SUPPORTED_CXXFLAG],
 [
 [
 	AC_REQUIRE([AC_PROG_CXX])
 	AC_REQUIRE([AC_PROG_CXX])
@@ -119,7 +119,7 @@ AC_DEFUN([IS_SUPPORTED_CXXFLAG],
 			[[AC_LANG_SOURCE([const char *hello = "Hello World";])]]
 			[[AC_LANG_SOURCE([const char *hello = "Hello World";])]]
 		),
 		),
 		[
 		[
-			m4_default_nblank([$2], [GLOBAL_AM_CFLAGS="$GLOBAL_AM_CXXFLAGS $1"])
+			m4_default_nblank([$2], [GLOBAL_AM_CXXFLAGS="$GLOBAL_AM_CXXFLAGS $1"])
 			AC_MSG_RESULT(yes)
 			AC_MSG_RESULT(yes)
 			option_available=1
 			option_available=1
 		],
 		],
@@ -191,3 +191,14 @@ AC_DEFUN([IS_SUPPORTED_FCFLAG],
 	FCFLAGS="$SAVED_FCFLAGS"
 	FCFLAGS="$SAVED_FCFLAGS"
 	AC_LANG_POP([Fortran])
 	AC_LANG_POP([Fortran])
 ])
 ])
+
+# IS_SUPPORTED_FLAG(flag)
+# ------------------------
+# Check with C, C++, F77 and F90 that the `flag' is supported by the compiler
+AC_DEFUN([IS_SUPPORTED_FLAG],
+[
+	IS_SUPPORTED_CFLAG($1)
+	IS_SUPPORTED_CXXFLAG($1)
+	IS_SUPPORTED_FFLAG($1)
+	IS_SUPPORTED_FCFLAG($1)
+])

+ 7 - 5
mpi/examples/Makefile.am

@@ -97,7 +97,7 @@ if STARPU_USE_CUDA
 if STARPU_COVERITY
 if STARPU_COVERITY
 include $(top_srcdir)/starpu-mynvcc.mk
 include $(top_srcdir)/starpu-mynvcc.mk
 else
 else
-NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
+NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(STARPU_H_CPPFLAGS)
 
 
 .cu.cubin:
 .cu.cubin:
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
@@ -107,10 +107,12 @@ NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -
 endif
 endif
 endif
 endif
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include -I$(top_srcdir)/mpi/include
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la -lm $(FXT_LIBS) $(MAGMA_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += $(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)
+LIBS += $(STARPU_CUDA_LDFLAGS)
+LIBS += -lm $(MAGMA_LIBS)
 
 
 ###################
 ###################
 # Stencil example #
 # Stencil example #

+ 6 - 5
mpi/src/Makefile.am

@@ -23,11 +23,12 @@ BUILT_SOURCES =
 
 
 CLEANFILES = *.gcno *.gcda *.linkinfo
 CLEANFILES = *.gcno *.gcda *.linkinfo
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) $(NMAD_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_srcdir)/mpi/include -I$(top_srcdir)/mpi/src
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(FXT_LIBS) $(MAGMA_LIBS) $(NMAD_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS) $(NMAD_LDFLAGS)
-LIBS += $(MPICC_LDFLAGS) $(FXT_LDFLAGS)
+AM_CFLAGS += $(FXT_CFLAGS) $(NMAD_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_srcdir)/mpi/include -I$(top_srcdir)/mpi/src $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(FXT_LDFLAGS) $(FXT_LIBS)
+LIBS += $(NMAD_LDFLAGS) $(NMAD_LIBS)
+LIBS += $(MPICC_LDFLAGS)
 
 
 ldflags =
 ldflags =
 
 

+ 6 - 5
mpi/tests/Makefile.am

@@ -73,7 +73,7 @@ if STARPU_USE_CUDA
 if STARPU_COVERITY
 if STARPU_COVERITY
 include $(top_srcdir)/starpu-mynvcc.mk
 include $(top_srcdir)/starpu-mynvcc.mk
 else
 else
-NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
+NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(STARPU_H_CPPFLAGS)
 
 
 .cu.cubin:
 .cu.cubin:
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
 	$(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
@@ -83,10 +83,11 @@ NVCCFLAGS += --compiler-options -fno-strict-aliasing  -I$(top_srcdir)/include/ -
 endif
 endif
 endif
 endif
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -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/
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la $(FXT_LIBS) $(MAGMA_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += -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)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la $(STARPU_EXPORTED_LIBS)
 
 
 ########################
 ########################
 # Unit testcases       #
 # Unit testcases       #

+ 2 - 4
mpi/tools/Makefile.am

@@ -20,11 +20,9 @@ include $(top_srcdir)/starpu-notests.mk
 
 
 SUBDIRS =
 SUBDIRS =
 
 
-AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(STARPU_COI_CPPFLAGS) $(GLOBAL_AM_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tools/ -I$(top_srcdir)/mpi/ -I$(top_srcdir)/mpi/include -I$(top_builddir)/src -I$(top_srcdir)/src -DSTARPU_REPLAY_MPI
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tools/ -I$(top_srcdir)/mpi/ -I$(top_srcdir)/mpi/include -I$(top_builddir)/src -I$(top_srcdir)/src -DSTARPU_REPLAY_MPI $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la $(FXT_LIBS)
-LIBS += $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la $(STARPU_EXPORTED_LIBS)
 
 
 CC=$(CC_OR_MPICC)
 CC=$(CC_OR_MPICC)
 CCLD=$(CC_OR_MPICC)
 CCLD=$(CC_OR_MPICC)

+ 5 - 4
sc_hypervisor/examples/Makefile.am

@@ -15,10 +15,11 @@
 #
 #
 include $(top_srcdir)/starpu.mk
 include $(top_srcdir)/starpu.mk
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS)
-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
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_GLPK_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += $(MAGMA_CFLAGS)
+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 $(STARPU_H_CPPFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(top_builddir)/sc_hypervisor/src/libsc_hypervisor.la $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_CUDA_LDFLAGS)
 
 
 noinst_PROGRAMS =				\
 noinst_PROGRAMS =				\
 	app_driven_test/app_driven_test		\
 	app_driven_test/app_driven_test		\

+ 2 - 4
sc_hypervisor/src/Makefile.am

@@ -16,10 +16,8 @@
 
 
 include $(top_srcdir)/starpu-notests.mk
 include $(top_srcdir)/starpu-notests.mk
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS)
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/sc_hypervisor/include/ -I$(top_srcdir)/sc_hypervisor/src
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@
-LIBS += $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/sc_hypervisor/include/ -I$(top_srcdir)/sc_hypervisor/src $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
 
 
 lib_LTLIBRARIES = libsc_hypervisor.la
 lib_LTLIBRARIES = libsc_hypervisor.la
 
 

+ 5 - 3
socl/examples/Makefile.am

@@ -15,9 +15,11 @@
 #
 #
 include $(top_srcdir)/starpu.mk
 include $(top_srcdir)/starpu.mk
 
 
-AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS)
-LIBS += $(top_builddir)/socl/src/libsocl-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/@LIBSTARPU_LINK@
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
+AM_CFLAGS += $(MAGMA_CFLAGS)
+AM_CPPFLAGS = $(STARPU_H_CPPFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
+LIBS += $(top_builddir)/socl/src/libsocl-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_OPENCL_LDFLAGS)
 
 
 
 
 SOCL_EXAMPLES	=
 SOCL_EXAMPLES	=

+ 3 - 4
socl/src/Makefile.am

@@ -18,10 +18,9 @@ include $(top_srcdir)/starpu-notests.mk
 
 
 CLEANFILES = *.gcno *.gcda
 CLEANFILES = *.gcno *.gcda
 
 
-AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS) $(FXT_CFLAGS)
-AM_CPPFLAGS = -DBUILDING_SOCL -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/socl/src
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ \
-	    $(STARPU_OPENCL_LDFLAGS) $(FXT_LDFLAGS)
+AM_CPPFLAGS = -DBUILDING_SOCL -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/socl/src $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_OPENCL_LDFLAGS)
 
 
 SUBDIRS =
 SUBDIRS =
 
 

+ 4 - 3
src/Makefile.am

@@ -17,9 +17,10 @@
 
 
 include $(top_srcdir)/starpu-notests.mk
 include $(top_srcdir)/starpu-notests.mk
 
 
-AM_CFLAGS = $(GLOBAL_AM_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -DBUILDING_STARPU  $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_SCIF_CPPFLAGS) $(STARPU_RCCE_CFLAGS) $(STARPU_RCCE_CPPFLAGS) -DSTARPU_DATADIR='"$(datadir)"'
-LIBS += -lm $(FXT_LDFLAGS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(LIBSTARPU_LDFLAGS) $(PAPI_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -DBUILDING_STARPU -DSTARPU_DATADIR='"$(datadir)"'
+AM_CPPFLAGS += $(STARPU_H_CPPFLAGS)
+AM_CPPFLAGS += $(FXT_CFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_SCIF_CPPFLAGS) $(STARPU_RCCE_CFLAGS) $(STARPU_RCCE_CPPFLAGS)
+LIBS += -lm $(LIBSTARPU_LDFLAGS)
 
 
 SUBDIRS =
 SUBDIRS =
 
 

+ 8 - 0
src/core/perfmodel/perfmodel_bus.c

@@ -290,7 +290,11 @@ static void measure_bandwidth_between_host_and_dev_on_numa_with_cuda(int dev, in
 
 
 	cudaFree(d_buffer);
 	cudaFree(d_buffer);
 
 
+#if CUDART_VERSION >= 4000
+	cudaDeviceReset();
+#else
 	cudaThreadExit();
 	cudaThreadExit();
+#endif
 }
 }
 
 
 #ifdef STARPU_HAVE_CUDA_MEMCPY_PEER
 #ifdef STARPU_HAVE_CUDA_MEMCPY_PEER
@@ -400,7 +404,11 @@ static void measure_bandwidth_between_dev_and_dev_cuda(int src, int dst)
 	cudaSetDevice(src);
 	cudaSetDevice(src);
 	cudaFree(s_buffer);
 	cudaFree(s_buffer);
 
 
+#if CUDART_VERSION >= 4000
+	cudaDeviceReset();
+#else
 	cudaThreadExit();
 	cudaThreadExit();
+#endif
 }
 }
 #endif
 #endif
 #endif
 #endif

+ 33 - 8
src/core/workers.c

@@ -1152,6 +1152,16 @@ int starpu_conf_init(struct starpu_conf *conf)
 	return 0;
 	return 0;
 }
 }
 
 
+int starpu_conf_noworker(struct starpu_conf *conf)
+{
+	conf->ncpus = 0;
+	conf->ncuda = 0;
+	conf->nopencl = 0;
+	conf->nmic = 0;
+	conf->nmpi_ms = 0;
+	return 0;
+}
+
 static void _starpu_conf_set_value_against_environment(char *name, int *value, int precedence_over_env)
 static void _starpu_conf_set_value_against_environment(char *name, int *value, int precedence_over_env)
 {
 {
 	if (precedence_over_env == 0)
 	if (precedence_over_env == 0)
@@ -2555,15 +2565,30 @@ unsigned starpu_worker_get_sched_ctx_list(int workerid, unsigned **sched_ctxs)
 	return nsched_ctxs;
 	return nsched_ctxs;
 }
 }
 
 
-char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type)
+const char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type)
 {
 {
-	if (type == STARPU_CPU_WORKER) return "STARPU_CPU_WORKER";
-	if (type == STARPU_CUDA_WORKER) return "STARPU_CUDA_WORKER";
-	if (type == STARPU_OPENCL_WORKER) return "STARPU_OPENCL_WORKER";
-	if (type == STARPU_MIC_WORKER) return "STARPU_MIC_WORKER";
-        if (type == STARPU_MPI_MS_WORKER) return "STARPU_MPI_MS_WORKER";
-	if (type == STARPU_ANY_WORKER) return "STARPU_ANY_WORKER";
-	return "STARPU_unknown_WORKER";
+	switch (type) {
+		case STARPU_CPU_WORKER: return "STARPU_CPU_WORKER";
+		case STARPU_CUDA_WORKER: return "STARPU_CUDA_WORKER";
+		case STARPU_OPENCL_WORKER: return "STARPU_OPENCL_WORKER";
+		case STARPU_MIC_WORKER: return "STARPU_MIC_WORKER";
+		case STARPU_MPI_MS_WORKER: return "STARPU_MPI_MS_WORKER";
+		case STARPU_ANY_WORKER: return "STARPU_ANY_WORKER";
+		default: return "STARPU_unknown_WORKER";
+	}
+}
+
+const char *starpu_worker_get_type_as_short_string(enum starpu_worker_archtype type)
+{
+	switch (type) {
+		case STARPU_CPU_WORKER: return "CPU";
+		case STARPU_CUDA_WORKER: return "CUDA";
+		case STARPU_OPENCL_WORKER: return "OPENCL";
+		case STARPU_MIC_WORKER: return "MIC";
+		case STARPU_MPI_MS_WORKER: return "MPI_MS";
+		case STARPU_ANY_WORKER: return "ANY";
+		default: return "STARPU_unknown_WORKER";
+	}
 }
 }
 
 
 void _starpu_worker_set_stream_ctx(unsigned workerid, struct _starpu_sched_ctx *sched_ctx)
 void _starpu_worker_set_stream_ctx(unsigned workerid, struct _starpu_sched_ctx *sched_ctx)

+ 13 - 0
src/datawizard/memory_nodes.c

@@ -179,3 +179,16 @@ int starpu_memory_node_get_devid(unsigned node)
 {
 {
 	return _starpu_descr.devid[node];
 	return _starpu_descr.devid[node];
 }
 }
+
+enum starpu_worker_archtype starpu_memory_node_get_worker_archtype(enum starpu_node_kind node_kind) {
+	switch (node_kind) {
+		// case STARPU_UNUSED:
+		case STARPU_CPU_RAM: return STARPU_CPU_WORKER;
+		case STARPU_CUDA_RAM: return STARPU_CUDA_WORKER;
+		case STARPU_OPENCL_RAM: return STARPU_OPENCL_WORKER;
+		// case STARPU_DISK_RAM:
+		case STARPU_MIC_RAM: return STARPU_MIC_WORKER;
+		case STARPU_MPI_MS_RAM: return STARPU_MPI_MS_WORKER;
+		default: STARPU_ASSERT_MSG(0, "ambiguous memory node kind %d", node_kind);
+	}
+}

+ 1 - 0
src/profiling/bound.c

@@ -235,6 +235,7 @@ static void initialize_duration(struct bound_task *task)
 	task->duration[STARPU_CUDA_WORKER] = initialize_arch_duration(conf->topology.nhwcudagpus,NULL);
 	task->duration[STARPU_CUDA_WORKER] = initialize_arch_duration(conf->topology.nhwcudagpus,NULL);
 	task->duration[STARPU_OPENCL_WORKER] = initialize_arch_duration(conf->topology.nhwopenclgpus,NULL);
 	task->duration[STARPU_OPENCL_WORKER] = initialize_arch_duration(conf->topology.nhwopenclgpus,NULL);
 	task->duration[STARPU_MIC_WORKER] = initialize_arch_duration(conf->topology.nhwmicdevices,conf->topology.nmiccores);
 	task->duration[STARPU_MIC_WORKER] = initialize_arch_duration(conf->topology.nhwmicdevices,conf->topology.nmiccores);
+	task->duration[STARPU_MPI_MS_WORKER] = initialize_arch_duration(conf->topology.nhwmpidevices,conf->topology.nmpicores);
 }
 }
 
 
 static struct starpu_perfmodel_device device =
 static struct starpu_perfmodel_device device =

+ 34 - 76
src/sched_policies/heteroprio.c

@@ -37,6 +37,8 @@
 #define DBL_MAX __DBL_MAX__
 #define DBL_MAX __DBL_MAX__
 #endif
 #endif
 
 
+#define STARPU_NB_TYPES (STARPU_MAX_WORKER+1)
+
 /* A bucket corresponds to a Pair of priorities
 /* A bucket corresponds to a Pair of priorities
  * When a task is pushed with a priority X, it will be stored
  * When a task is pushed with a priority X, it will be stored
  * into the bucket X.
  * into the bucket X.
@@ -107,8 +109,16 @@ struct _starpu_heteroprio_data
 	unsigned nb_workers_per_arch_index[STARPU_NB_TYPES];
 	unsigned nb_workers_per_arch_index[STARPU_NB_TYPES];
 };
 };
 
 
+
+static int starpu_heteroprio_types_to_arch(enum starpu_worker_archtype arch)
+{
+	if (arch > STARPU_MAX_WORKER)
+		return 0;
+	return STARPU_WORKER_TO_MASK(arch);
+}
+
 /** Tell how many prio there are for a given arch */
 /** Tell how many prio there are for a given arch */
-void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned max_prio)
+void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned max_prio)
 {
 {
 	struct _starpu_heteroprio_data *hp = (struct _starpu_heteroprio_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	struct _starpu_heteroprio_data *hp = (struct _starpu_heteroprio_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 
 
@@ -118,7 +128,7 @@ void starpu_heteroprio_set_nb_prios(unsigned sched_ctx_id, enum starpu_heteropri
 }
 }
 
 
 /** Set the mapping for a given arch prio=>bucket */
 /** Set the mapping for a given arch prio=>bucket */
-inline void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned source_prio, unsigned dest_bucket_id)
+inline void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned source_prio, unsigned dest_bucket_id)
 {
 {
 	STARPU_ASSERT(dest_bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 	STARPU_ASSERT(dest_bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 
 
@@ -126,12 +136,12 @@ inline void starpu_heteroprio_set_mapping(unsigned sched_ctx_id, enum starpu_het
 
 
 	hp->prio_mapping_per_arch_index[arch][source_prio] = dest_bucket_id;
 	hp->prio_mapping_per_arch_index[arch][source_prio] = dest_bucket_id;
 
 
-	hp->buckets[dest_bucket_id].valid_archs |= starpu_heteroprio_types_to_arch[arch];
+	hp->buckets[dest_bucket_id].valid_archs |= starpu_heteroprio_types_to_arch(arch);
 	_STARPU_DEBUG("Adding arch %d to bucket %u\n", arch, dest_bucket_id);
 	_STARPU_DEBUG("Adding arch %d to bucket %u\n", arch, dest_bucket_id);
 }
 }
 
 
 /** Tell which arch is the faster for the tasks of a bucket (optional) */
 /** Tell which arch is the faster for the tasks of a bucket (optional) */
-inline void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned bucket_id)
+inline void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id)
 {
 {
 	STARPU_ASSERT(bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 	STARPU_ASSERT(bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 
 
@@ -143,7 +153,7 @@ inline void starpu_heteroprio_set_faster_arch(unsigned sched_ctx_id, enum starpu
 }
 }
 
 
 /** Tell how slow is a arch for the tasks of a bucket (optional) */
 /** Tell how slow is a arch for the tasks of a bucket (optional) */
-inline void starpu_heteroprio_set_arch_slow_factor(unsigned sched_ctx_id, enum starpu_heteroprio_types arch, unsigned bucket_id, float slow_factor)
+inline void starpu_heteroprio_set_arch_slow_factor(unsigned sched_ctx_id, enum starpu_worker_archtype arch, unsigned bucket_id, float slow_factor)
 {
 {
 	STARPU_ASSERT(bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 	STARPU_ASSERT(bucket_id < STARPU_HETEROPRIO_MAX_PRIO);
 
 
@@ -160,52 +170,22 @@ static inline void default_init_sched(unsigned sched_ctx_id)
 	int max_prio = starpu_sched_ctx_get_max_priority(sched_ctx_id);
 	int max_prio = starpu_sched_ctx_get_max_priority(sched_ctx_id);
 	STARPU_ASSERT(min_prio >= 0);
 	STARPU_ASSERT(min_prio >= 0);
 	STARPU_ASSERT(max_prio >= 0);
 	STARPU_ASSERT(max_prio >= 0);
+
+	enum starpu_worker_archtype type;
+
 	// By default each type of devices uses 1 bucket and no slow factor
 	// By default each type of devices uses 1 bucket and no slow factor
-#ifdef STARPU_USE_CPU
-	if (starpu_cpu_worker_get_count() > 0)
-		starpu_heteroprio_set_nb_prios(sched_ctx_id, STARPU_CPU_IDX, max_prio-min_prio+1);
-#endif
-#ifdef STARPU_USE_CUDA
-	if (starpu_cuda_worker_get_count() > 0)
-		starpu_heteroprio_set_nb_prios(sched_ctx_id, STARPU_CUDA_IDX, max_prio-min_prio+1);
-#endif
-#ifdef STARPU_USE_OPENCL
-	if (starpu_opencl_worker_get_count() > 0)
-		starpu_heteroprio_set_nb_prios(sched_ctx_id, STARPU_OPENCL_IDX, max_prio-min_prio+1);
-#endif
-#ifdef STARPU_USE_MIC
-	if (starpu_mic_worker_get_count() > 0)
-		starpu_heteroprio_set_nb_prios(sched_ctx_id, STARPU_MIC_IDX, max_prio-min_prio+1);
-#endif
-#ifdef STARPU_USE_MPI_MASTER_SLAVE
-	if (starpu_mpi_ms_worker_get_count() > 0)
-		starpu_heteroprio_set_nb_prios(sched_ctx_id, STARPU_MPI_MS_IDX, max_prio-min_prio+1);
-#endif
+	for (type = 0; type <= STARPU_MAX_WORKER; type++)
+		if (starpu_worker_get_count_by_type(type) > 0)
+			starpu_heteroprio_set_nb_prios(sched_ctx_id, type, max_prio-min_prio+1);
 
 
 	// Direct mapping
 	// Direct mapping
 	int prio;
 	int prio;
 	for(prio=min_prio ; prio<=max_prio ; prio++)
 	for(prio=min_prio ; prio<=max_prio ; prio++)
 	{
 	{
-#ifdef STARPU_USE_CPU
-		if (starpu_cpu_worker_get_count() > 0)
-			starpu_heteroprio_set_mapping(sched_ctx_id, STARPU_CPU_IDX, prio, prio);
-#endif
-#ifdef STARPU_USE_CUDA
-		if (starpu_cuda_worker_get_count() > 0)
-			starpu_heteroprio_set_mapping(sched_ctx_id, STARPU_CUDA_IDX, prio, prio);
-#endif
-#ifdef STARPU_USE_OPENCL
-		if (starpu_opencl_worker_get_count() > 0)
-			starpu_heteroprio_set_mapping(sched_ctx_id, STARPU_OPENCL_IDX, prio, prio);
-#endif
-#ifdef STARPU_USE_MIC
-		if (starpu_mic_worker_get_count() > 0)
-			starpu_heteroprio_set_mapping(sched_ctx_id, STARPU_MIC_IDX, prio, prio);
-#endif
-#ifdef STARPU_USE_MPI_MASTER_SLAVE
-		if (starpu_mpi_ms_worker_get_count() > 0)
-			starpu_heteroprio_set_mapping(sched_ctx_id, STARPU_MPI_MS_IDX, prio, prio);
-#endif
+		// By default each type of devices uses 1 bucket and no slow factor
+		for (type = 0; type <= STARPU_MAX_WORKER; type++)
+			if (starpu_worker_get_count_by_type(type) > 0)
+				starpu_heteroprio_set_mapping(sched_ctx_id, type, prio, prio);
 	}
 	}
 }
 }
 
 
@@ -249,7 +229,7 @@ static void initialize_heteroprio_policy(unsigned sched_ctx_id)
 			const unsigned mapped_prio = hp->prio_mapping_per_arch_index[arch_index][idx_prio];
 			const unsigned mapped_prio = hp->prio_mapping_per_arch_index[arch_index][idx_prio];
 			STARPU_ASSERT(mapped_prio <= STARPU_HETEROPRIO_MAX_PRIO);
 			STARPU_ASSERT(mapped_prio <= STARPU_HETEROPRIO_MAX_PRIO);
 			STARPU_ASSERT(hp->buckets[mapped_prio].slow_factors_per_index[arch_index] >= 0.0);
 			STARPU_ASSERT(hp->buckets[mapped_prio].slow_factors_per_index[arch_index] >= 0.0);
-			STARPU_ASSERT(hp->buckets[mapped_prio].valid_archs & starpu_heteroprio_types_to_arch[arch_index]);
+			STARPU_ASSERT(hp->buckets[mapped_prio].valid_archs & starpu_heteroprio_types_to_arch(arch_index));
 			check_archs[mapped_prio]      = 1;
 			check_archs[mapped_prio]      = 1;
 			check_all_archs[mapped_prio] += 1;
 			check_all_archs[mapped_prio] += 1;
 		}
 		}
@@ -257,7 +237,7 @@ static void initialize_heteroprio_policy(unsigned sched_ctx_id)
 		{
 		{
 			/* Ensure the current arch use a bucket or someone else can use it */
 			/* Ensure the current arch use a bucket or someone else can use it */
 			STARPU_ASSERT(check_archs[idx_prio] == 1 || hp->buckets[idx_prio].valid_archs == 0
 			STARPU_ASSERT(check_archs[idx_prio] == 1 || hp->buckets[idx_prio].valid_archs == 0
-				      || (hp->buckets[idx_prio].valid_archs & ~starpu_heteroprio_types_to_arch[arch_index]) != 0);
+				      || (hp->buckets[idx_prio].valid_archs & ~starpu_heteroprio_types_to_arch(arch_index)) != 0);
 		}
 		}
 	}
 	}
 	/* Ensure that if a valid_archs = (STARPU_CPU|STARPU_CUDA) then check_all_archs[] = 2 for example */
 	/* Ensure that if a valid_archs = (STARPU_CPU|STARPU_CUDA) then check_all_archs[] = 2 for example */
@@ -267,7 +247,7 @@ static void initialize_heteroprio_policy(unsigned sched_ctx_id)
 		unsigned nb_arch_on_bucket = 0;
 		unsigned nb_arch_on_bucket = 0;
 		for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 		for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 		{
 		{
-			if(hp->buckets[idx_prio].valid_archs & starpu_heteroprio_types_to_arch[arch_index])
+			if(hp->buckets[idx_prio].valid_archs & starpu_heteroprio_types_to_arch(arch_index))
 			{
 			{
 				nb_arch_on_bucket += 1;
 				nb_arch_on_bucket += 1;
 			}
 			}
@@ -310,32 +290,10 @@ static void add_workers_heteroprio_policy(unsigned sched_ctx_id, int *workerids,
 		memset(&hp->workers_heteroprio[workerid], 0, sizeof(hp->workers_heteroprio[workerid]));
 		memset(&hp->workers_heteroprio[workerid], 0, sizeof(hp->workers_heteroprio[workerid]));
 		/* if the worker has already belonged to this context
 		/* if the worker has already belonged to this context
 		   the queue and the synchronization variables have been already initialized */
 		   the queue and the synchronization variables have been already initialized */
-			_starpu_prio_deque_init(&hp->workers_heteroprio[workerid].tasks_queue);
-			switch(starpu_worker_get_type(workerid))
-			{
-			case STARPU_CPU_WORKER:
-				hp->workers_heteroprio[workerid].arch_type = STARPU_CPU;
-				hp->workers_heteroprio[workerid].arch_index = STARPU_CPU_IDX;
-				break;
-			case STARPU_CUDA_WORKER:
-				hp->workers_heteroprio[workerid].arch_type = STARPU_CUDA;
-				hp->workers_heteroprio[workerid].arch_index = STARPU_CUDA_IDX;
-				break;
-			case STARPU_OPENCL_WORKER:
-				hp->workers_heteroprio[workerid].arch_type = STARPU_OPENCL;
-				hp->workers_heteroprio[workerid].arch_index = STARPU_OPENCL_IDX;
-				break;
-			case STARPU_MIC_WORKER:
-				hp->workers_heteroprio[workerid].arch_type = STARPU_MIC;
-				hp->workers_heteroprio[workerid].arch_index = STARPU_MIC_IDX;
-				break;
-			case STARPU_MPI_MS_WORKER:
-				hp->workers_heteroprio[workerid].arch_type = STARPU_MPI_MS;
-				hp->workers_heteroprio[workerid].arch_index = STARPU_MPI_MS_IDX;
-				break;
-			default:
-				STARPU_ASSERT(0);
-			}
+		enum starpu_worker_archtype arch_index = starpu_worker_get_type(workerid);
+		_starpu_prio_deque_init(&hp->workers_heteroprio[workerid].tasks_queue);
+		hp->workers_heteroprio[workerid].arch_index = arch_index;
+		hp->workers_heteroprio[workerid].arch_type = starpu_heteroprio_types_to_arch(arch_index);
 		hp->nb_workers_per_arch_index[hp->workers_heteroprio[workerid].arch_index]++;
 		hp->nb_workers_per_arch_index[hp->workers_heteroprio[workerid].arch_index]++;
 
 
 	}
 	}
@@ -379,7 +337,7 @@ static int push_task_heteroprio_policy(struct starpu_task *task)
 	for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 	for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 	{
 	{
 		/* We test the archs on the bucket and not on task->where since it is restrictive */
 		/* We test the archs on the bucket and not on task->where since it is restrictive */
-		if(bucket->valid_archs & starpu_heteroprio_types_to_arch[arch_index])
+		if(bucket->valid_archs & starpu_heteroprio_types_to_arch(arch_index))
 			hp->nb_remaining_tasks_per_arch_index[arch_index] += 1;
 			hp->nb_remaining_tasks_per_arch_index[arch_index] += 1;
 	}
 	}
 
 
@@ -512,7 +470,7 @@ static struct starpu_task *pop_task_heteroprio_policy(unsigned sched_ctx_id)
 				for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 				for(arch_index = 0; arch_index < STARPU_NB_TYPES; ++arch_index)
 				{
 				{
 					/* We test the archs on the bucket and not on task->where since it is restrictive */
 					/* We test the archs on the bucket and not on task->where since it is restrictive */
-					if(bucket->valid_archs & starpu_heteroprio_types_to_arch[arch_index])
+					if(bucket->valid_archs & starpu_heteroprio_types_to_arch(arch_index))
 					{
 					{
 						hp->nb_remaining_tasks_per_arch_index[arch_index] -= 1;
 						hp->nb_remaining_tasks_per_arch_index[arch_index] -= 1;
 					}
 					}

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

@@ -22,7 +22,7 @@ includedir=@includedir@
 Name: starpu
 Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Version: @PACKAGE_VERSION@
-Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@ @SIMGRID_CFLAGS@
+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@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@
 Requires: @HWLOC_REQUIRES@

+ 2 - 5
starpu-1.0.pc.in

@@ -19,13 +19,10 @@ libdir=@libdir@
 pkglibdir=@pkglibdir@
 pkglibdir=@pkglibdir@
 includedir=@includedir@
 includedir=@includedir@
 
 
-# When the GCC plug-in is available, the following lines indicate
-# where it is installed.
-
 Name: starpu
 Name: starpu
 Description: offers support for heterogeneous multicore architecture
 Description: offers support for heterogeneous multicore architecture
 Version: @PACKAGE_VERSION@
 Version: @PACKAGE_VERSION@
-Cflags: -I${includedir}/starpu/@STARPU_EFFECTIVE_VERSION@ @STARPU_CUDA_CPPFLAGS@ @SIMGRID_CFLAGS@ -DSTARPU_USE_DEPRECATED_ONE_ZERO_API
-Libs: @STARPU_EXPORT_DYNAMIC@ -L${libdir} -lstarpu-@STARPU_EFFECTIVE_VERSION@ @STARPU_SC_HYPERVISOR@ @STARPU_EXPORTED_LIBS@
+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.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Libs.private: @LDFLAGS@ @LIBS@ @LIBSTARPU_LDFLAGS@
 Requires: @HWLOC_REQUIRES@
 Requires: @HWLOC_REQUIRES@

+ 2 - 2
starpu-1.1.pc.in

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

+ 2 - 2
starpu-1.2.pc.in

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

+ 2 - 2
starpu-1.3.pc.in

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

+ 6 - 0
starpu-notests.mk

@@ -13,6 +13,12 @@
 #
 #
 # 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.
 #
 #
+
+AM_CFLAGS = $(GLOBAL_AM_CFLAGS)
+AM_CXXFLAGS = $(GLOBAL_AM_CXXFLAGS)
+AM_FFLAGS = $(GLOBAL_AM_FFLAGS)
+AM_FCFLAGS = $(GLOBAL_AM_FCFLAGS)
+
 recheck:
 recheck:
 	-cat /dev/null
 	-cat /dev/null
 
 

+ 5 - 0
starpu.mk

@@ -14,6 +14,11 @@
 # 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.
 #
 #
 
 
+AM_CFLAGS = $(GLOBAL_AM_CFLAGS)
+AM_CXXFLAGS = $(GLOBAL_AM_CXXFLAGS)
+AM_FFLAGS = $(GLOBAL_AM_FFLAGS)
+AM_FCFLAGS = $(GLOBAL_AM_FCFLAGS)
+
 if STARPU_USE_MPI_MASTER_SLAVE
 if STARPU_USE_MPI_MASTER_SLAVE
 MPI_LAUNCHER 			= $(MPIEXEC)  $(MPIEXEC_ARGS) -np 4
 MPI_LAUNCHER 			= $(MPIEXEC)  $(MPIEXEC_ARGS) -np 4
 MPI_RUN_ARGS			= STARPU_WORKERS_NOBIND=1 STARPU_NCPU=4 STARPU_NMPIMSTHREADS=4
 MPI_RUN_ARGS			= STARPU_WORKERS_NOBIND=1 STARPU_NCPU=4 STARPU_NMPIMSTHREADS=4

+ 5 - 3
starpufft/src/Makefile.am

@@ -16,9 +16,11 @@
 
 
 include $(top_srcdir)/starpu-notests.mk
 include $(top_srcdir)/starpu-notests.mk
 
 
-AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS) $(FFTWF_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/starpufft/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src/ $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS)
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(FFTW_LIBS) $(FFTWF_LIBS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_CUFFT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += $(FFTWF_CFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/starpufft/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src/ $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(FFTW_LIBS) $(FFTWF_LIBS)
+LIBS += $(STARPU_CUDA_LDFLAGS) $(STARPU_CUFFT_LDFLAGS)
 
 
 lib_LTLIBRARIES = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la
 lib_LTLIBRARIES = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la
 
 

+ 5 - 4
starpufft/tests/Makefile.am

@@ -45,10 +45,11 @@ endif
 
 
 endif
 endif
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/starpufft/include -I$(top_srcdir)/starpufft/src
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(FXT_LIBS) $(MAGMA_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_CFLAGS += -Wno-unused
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/starpufft/include -I$(top_srcdir)/starpufft/src $(STARPU_H_CPPFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(STARPU_EXPORTED_LIBS)
+LIBS += $(STARPU_CUDA_LDFLAGS)
 
 
 examplebin_PROGRAMS =
 examplebin_PROGRAMS =
 examplebin_PROGRAMS +=	\
 examplebin_PROGRAMS +=	\

+ 5 - 3
starpurm/examples/Makefile.am

@@ -18,10 +18,12 @@ SUBDIRS =
 
 
 CLEANFILES = *.gcno *.gcda *.linkinfo
 CLEANFILES = *.gcno *.gcda *.linkinfo
 
 
+AM_CFLAGS	+= $(DLB_CFLAGS)
 AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/include
 AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/include
-AM_CPPFLAGS	+= -I$(top_srcdir)/starpurm/include -I$(top_srcdir)/starpurm/src -I$(top_builddir)/starpurm/src -I$(top_builddir)/starpurm/include
-AM_CFLAGS	= -Wall -g $(HWLOC_CFLAGS) $(DLB_CFLAGS) $(GLOBAL_AM_CFLAGS)
-LIBS += $(top_builddir)/starpurm/src/libstarpurm-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) $(DLB_LIBS)
+AM_CPPFLAGS	+= -I$(top_srcdir)/starpurm/include -I$(top_srcdir)/starpurm/src -I$(top_builddir)/starpurm/src -I$(top_builddir)/starpurm/include $(STARPU_H_CPPFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
+LIBS += $(top_builddir)/starpurm/src/libstarpurm-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(HWLOC_LIBS) $(DLB_LIBS)
 
 
 examplebindir = $(libdir)/starpu/examples/starpurm
 examplebindir = $(libdir)/starpu/examples/starpurm
 
 

+ 2 - 4
starpurm/src/Makefile.am

@@ -21,10 +21,8 @@ SUBDIRS =
 CLEANFILES = *.gcno *.gcda *.linkinfo
 CLEANFILES = *.gcno *.gcda *.linkinfo
 
 
 AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/include
 AM_CPPFLAGS	= -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/include
-AM_CPPFLAGS	+= -I$(top_srcdir)/starpurm/include -I$(top_srcdir)/starpurm/src -I$(top_builddir)/starpurm/src -I$(top_builddir)/starpurm/include
-AM_CFLAGS	= -Wall -g $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) $(NMAD_CFLAGS)
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS) $(NMAD_LDFLAGS)
+AM_CPPFLAGS	+= -I$(top_srcdir)/starpurm/include -I$(top_srcdir)/starpurm/src -I$(top_builddir)/starpurm/src -I$(top_builddir)/starpurm/include $(STARPU_H_CPPFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
 
 
 libstarpurm_so_version = $(LIBSTARPURM_INTERFACE_CURRENT):$(LIBSTARPURM_INTERFACE_REVISION):$(LIBSTARPURM_INTERFACE_AGE)
 libstarpurm_so_version = $(LIBSTARPURM_INTERFACE_CURRENT):$(LIBSTARPURM_INTERFACE_REVISION):$(LIBSTARPURM_INTERFACE_AGE)
 
 

+ 6 - 5
tests/Makefile.am

@@ -15,12 +15,13 @@
 #
 #
 include $(top_srcdir)/starpu.mk
 include $(top_srcdir)/starpu.mk
 
 
-AM_CFLAGS = $(HWLOC_CFLAGS) $(FXT_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_SCIF_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
-AM_CXXFLAGS = $(HWLOC_CFLAGS) $(FXT_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_SCIF_CPPFLAGS) $(GLOBAL_AM_CXXFLAGS) -Wno-unused
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/src -I$(top_srcdir)/src/
+AM_CFLAGS += -Wno-unused
+AM_CXXFLAGS += -Wno-unused
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/src -I$(top_srcdir)/src/ $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) $(FXT_LIBS)
-LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS) $(FXT_LDFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
+LIBS += $(HWLOC_LIBS)
+LIBS += $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS)
 
 
 EXTRA_DIST =					\
 EXTRA_DIST =					\
 	helper.h				\
 	helper.h				\

+ 3 - 3
tests/datawizard/bcsr.c

@@ -116,9 +116,9 @@ int main(int argc, char **argv)
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 
 
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
+	conf.nmpi_ms = -1;
 
 
 	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV)
 	if (starpu_initialize(&conf, &argc, &argv) == -ENODEV)
 		return STARPU_TEST_SKIPPED;
 		return STARPU_TEST_SKIPPED;

+ 4 - 2
tests/datawizard/manual_reduction.c

@@ -206,8 +206,10 @@ int main(int argc, char **argv)
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 
 
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
+	conf.ncuda = -1;
+	conf.nopencl = -1;
 
 
 	variable = INIT_VALUE;
 	variable = INIT_VALUE;
 
 

+ 1 - 4
tests/datawizard/noreclaim.c

@@ -84,11 +84,8 @@ int main(int argc, char **argv)
 	setenv("STARPU_LIMIT_CPU_NUMA_MEM", TOTAL, 1);
 	setenv("STARPU_LIMIT_CPU_NUMA_MEM", TOTAL, 1);
 
 
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
 
 
         ret = starpu_initialize(&conf, &argc, &argv);
         ret = starpu_initialize(&conf, &argc, &argv);
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;

+ 1 - 0
tests/datawizard/partition_dep.c

@@ -98,6 +98,7 @@ int main(int argc, char **argv)
         return ret;
         return ret;
 
 
 enodev:
 enodev:
+	starpu_data_unpartition(handle, STARPU_MAIN_RAM);
 	starpu_data_unregister(handle);
 	starpu_data_unregister(handle);
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
 	/* yes, we do not perform the computation but we did detect that no one

+ 2 - 3
tests/disk/disk_copy.c

@@ -66,10 +66,9 @@ int dotest(struct starpu_disk_ops *ops, void *param)
 	if (ret == -EINVAL)
 	if (ret == -EINVAL)
 		return EXIT_FAILURE;
 		return EXIT_FAILURE;
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
+	conf.nmpi_ms = -1;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 
 

+ 3 - 3
tests/disk/disk_copy_unpack.c

@@ -54,9 +54,9 @@ int dotest(struct starpu_disk_ops *ops, void *param)
 	if (ret == -EINVAL)
 	if (ret == -EINVAL)
 		return EXIT_FAILURE;
 		return EXIT_FAILURE;
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
+	conf.nmpi_ms = -1;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 
 

+ 3 - 3
tests/disk/disk_pack.c

@@ -66,9 +66,9 @@ int dotest(struct starpu_disk_ops *ops, char *base)
 	if (ret == -EINVAL)
 	if (ret == -EINVAL)
 		return EXIT_FAILURE;
 		return EXIT_FAILURE;
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
+	conf.nmpi_ms = -1;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 
 

+ 3 - 3
tests/disk/mem_reclaim.c

@@ -159,9 +159,9 @@ int dotest(struct starpu_disk_ops *ops, char *base, void (*vector_data_register)
 	if (ret == -EINVAL)
 	if (ret == -EINVAL)
 		return EXIT_FAILURE;
 		return EXIT_FAILURE;
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
+	conf.nmpi_ms = -1;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 
 

+ 2 - 2
tests/energy/energy_efficiency.c

@@ -308,9 +308,9 @@ int main(int argc, char *argv[])
 	/* Initialize StarPU */
 	/* Initialize StarPU */
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
 
 
-	conf.ncuda = 0;
-	conf.nopencl = 0;
 	if (!getenv("STARPU_SCHED"))
 	if (!getenv("STARPU_SCHED"))
 		conf.sched_policy_name = "dmdas";
 		conf.sched_policy_name = "dmdas";
 
 

+ 2 - 2
tests/errorcheck/invalid_tasks.c

@@ -51,9 +51,9 @@ int main(void)
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.nopencl = 0;
-	conf.ncuda = 0;
+	conf.nmpi_ms = -1;
 
 
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;

+ 1 - 5
tests/errorcheck/starpu_init_noworker.c

@@ -33,11 +33,7 @@ int main(int argc, char **argv)
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncpus = 0;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-        conf.nmpi_ms = 0;
+	starpu_conf_noworker(&conf);
 
 
 	/* starpu_init should return -ENODEV */
 	/* starpu_init should return -ENODEV */
         ret = starpu_initialize(&conf, &argc, &argv);
         ret = starpu_initialize(&conf, &argc, &argv);

+ 2 - 4
tests/errorcheck/workers_cpuid.c

@@ -102,10 +102,8 @@ static int test_combination(long *combination, unsigned n)
 	struct starpu_conf conf;
 	struct starpu_conf conf;
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
 
 
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;

+ 3 - 6
tests/main/driver_api/init_run_deinit.c

@@ -85,9 +85,8 @@ static int test_cpu(void)
 	};
 	};
 
 
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;
 
 
@@ -145,9 +144,8 @@ static int test_cuda(void)
 	};
 	};
 
 
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncpus = 0;
+	starpu_conf_noworker(&conf);
 	conf.ncuda = 1;
 	conf.ncuda = 1;
-	conf.nopencl = 0;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;
 
 
@@ -231,8 +229,7 @@ static int test_opencl(void)
 	};
 	};
 
 
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncpus = 0;
-	conf.ncuda = 0;
+	starpu_conf_noworker(&conf);
 	conf.nopencl = 1;
 	conf.nopencl = 1;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;

+ 3 - 5
tests/main/driver_api/run_driver.c

@@ -73,9 +73,8 @@ static int test_cpu(void)
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV || starpu_cpu_worker_get_count() == 0)
 	if (ret == -ENODEV || starpu_cpu_worker_get_count() == 0)
 	{
 	{
@@ -135,9 +134,8 @@ static int test_cuda(void)
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
-	conf.ncpus = 0;
+	starpu_conf_noworker(&conf);
 	conf.ncuda = 1;
 	conf.ncuda = 1;
-	conf.nopencl = 0;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV || starpu_cuda_worker_get_count() == 0)
 	if (ret == -ENODEV || starpu_cuda_worker_get_count() == 0)
 	{
 	{
@@ -225,8 +223,8 @@ static int test_opencl(void)
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.n_not_launched_drivers = 1;
 	conf.not_launched_drivers = &d;
 	conf.not_launched_drivers = &d;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = 1;
 	conf.ncpus = 1;
-	conf.ncuda = 0;
 	conf.nopencl = 1;
 	conf.nopencl = 1;
 	ret = starpu_init(&conf);
 	ret = starpu_init(&conf);
 	if (ret == -ENODEV || starpu_opencl_worker_get_count() == 0)
 	if (ret == -ENODEV || starpu_opencl_worker_get_count() == 0)

+ 3 - 8
tests/microbenchs/bandwidth.c

@@ -186,10 +186,7 @@ static float bench(int *argc, char ***argv, unsigned nbusy, unsigned ncpus, int
 
 
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
+	starpu_conf_noworker(&conf);
 	conf.ncpus = ncpus;
 	conf.ncpus = ncpus;
 
 
 	if (intl && sleep == PAUSE)
 	if (intl && sleep == PAUSE)
@@ -284,10 +281,8 @@ int main(int argc, char **argv)
 
 
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
 	conf.precedence_over_environment_variables = 1;
 	conf.precedence_over_environment_variables = 1;
-	conf.ncuda = 0;
-	conf.nopencl = 0;
-	conf.nmic = 0;
-	conf.nmpi_ms = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
 
 
 	ret = starpu_initialize(&conf, &argc, &argv);
 	ret = starpu_initialize(&conf, &argc, &argv);
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;

+ 2 - 2
tests/microbenchs/tasks_size_overhead.c

@@ -165,8 +165,8 @@ int main(int argc, char **argv)
 
 
 	/* Get number of CPUs */
 	/* Get number of CPUs */
 	starpu_conf_init(&conf);
 	starpu_conf_init(&conf);
-	conf.ncuda = 0;
-	conf.nopencl = 0;
+	starpu_conf_noworker(&conf);
+	conf.ncpus = -1;
 #ifdef STARPU_SIMGRID
 #ifdef STARPU_SIMGRID
 	/* This will get serialized, avoid spending too much time on it. */
 	/* This will get serialized, avoid spending too much time on it. */
 	maxcpus = 2;
 	maxcpus = 2;

+ 2 - 3
tools/Makefile.am

@@ -20,10 +20,9 @@ include $(top_srcdir)/starpu.mk
 
 
 SUBDIRS =
 SUBDIRS =
 
 
-AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(STARPU_COI_CPPFLAGS) $(GLOBAL_AM_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tools/ -I$(top_srcdir)/mpi/ -I$(top_builddir)/src -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tools/ -I$(top_srcdir)/mpi/ -I$(top_builddir)/src -I$(top_srcdir)/src $(STARPU_H_CPPFLAGS)
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
 AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@
-LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(FXT_LIBS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+LIBS += $(top_builddir)/src/@LIBSTARPU_LINK@ $(STARPU_EXPORTED_LIBS)
 
 
 bin_PROGRAMS =
 bin_PROGRAMS =
 dist_bin_SCRIPTS =
 dist_bin_SCRIPTS =