瀏覽代碼

Cluster support is disabled by default, unless the configure option --enable-cluster is specified

Nathalie Furmento 6 年之前
父節點
當前提交
3c7ede1d6b

+ 2 - 0
ChangeLog

@@ -149,6 +149,8 @@ Changes:
     operation in favor of new starpu_data_interface_ops::to_pointer
     operation.
   * Sort data access requests by priority.
+  * Cluster support is disabled by default, unless the configure
+    option --enable-cluster is specified
 
 Small changes:
   * Use asynchronous transfers for task data fetches with were not prefetched.

+ 21 - 2
configure.ac

@@ -5,7 +5,7 @@
 # Copyright (C) 2017                                     Guillaume Beauchamp
 # Copyright (C) 2018                                     Federal University of Rio Grande do Sul (UFRGS)
 # Copyright (C) 2018                                     Umeà University
-# Copyright (C) 2010-2018                                CNRS
+# Copyright (C) 2010-2019                                CNRS
 # Copyright (C) 2013                                     Thibaut Lambert
 # Copyright (C) 2011                                     Télécom-SudParis
 #
@@ -91,7 +91,6 @@ AC_PROG_INSTALL
 AC_PROG_MKDIR_P
 AC_CHECK_PROGS(PROG_STAT,gstat stat)
 AC_CHECK_PROGS(PROG_DATE,gdate date)
-AC_OPENMP
 
 if test x$enable_perf_debug = xyes; then
     enable_shared=no
@@ -2815,6 +2814,25 @@ AM_CONDITIONAL([BUILD_GCC_PLUGIN], [test "x$build_gcc_plugin" = "xyes"])
 AM_CONDITIONAL([RUN_GCC_PLUGIN_TESTS],
   [test "x$run_gcc_plugin_test_suite" = "xyes"])
 
+########################################################################
+#                                                                      #
+#                            Cluster support                           #
+#                                                                      #
+########################################################################
+
+AC_ARG_ENABLE(cluster, [AS_HELP_STRING([--enable-cluster], [build the cluster support])],
+			enable_cluster=$enableval, enable_cluster=no)
+
+AC_MSG_CHECKING(for cluster support)
+
+if test x$enable_cluster = xyes; then
+	AC_DEFINE(STARPU_CLUSTER, [1], [Define this to enable cluster support])
+	AC_OPENMP
+fi
+
+AM_CONDITIONAL([STARPU_CLUSTER], [test "x$enable_cluster" = "xyes"])
+AC_MSG_RESULT($enable_cluster)
+
 ###############################################################################
 #                                                                             #
 #                            OpenMP runtime support                           #
@@ -3781,6 +3799,7 @@ AC_MSG_NOTICE([
 	       GCC plug-in:                                   $build_gcc_plugin
 	       GCC plug-in test suite (requires GNU Guile):   $run_gcc_plugin_test_suite
 	       OpenMP runtime support enabled:                $enable_openmp
+	       Cluster support enabled:                       $enable_cluster
 	       SOCL enabled:                                  $build_socl
                SOCL test suite:                               $run_socl_check
                Scheduler Hypervisor:                          $build_sc_hypervisor

+ 3 - 0
doc/doxygen/chapters/490_clustering_a_machine.doxy

@@ -46,6 +46,9 @@ An example of code running on clusters is available in
 
 Let's first look at how to create a cluster.
 
+To enable clusters in StarPU, one needs to set the configure option
+\ref enable-cluster "--enable-cluster".
+
 \section CreatingClusters Creating Clusters
 
 Partitioning a machine into clusters with the cluster API is fairly

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

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2013,2015-2017                      Inria
- * Copyright (C) 2010-2017                                CNRS
+ * Copyright (C) 2010-2017, 2019                                CNRS
  * Copyright (C) 2009-2011,2013-2018                      Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -481,6 +481,13 @@ The default value is <c>x86_64-k1om-linux</c>
 Enable OpenMP Support (\ref OpenMPRuntimeSupport)
 </dd>
 
+<dt>--enable-cluster</dt>
+<dd>
+\anchor enable-cluster
+\addindex __configure__--enable-cluster
+Enable cluster Support (\ref ClusteringAMachine)
+</dd>
+
 </dl>
 
 \section AdvancedConfiguration Advanced Configuration

+ 1 - 0
doc/doxygen/doxygen.cfg

@@ -1624,6 +1624,7 @@ PREDEFINED             = STARPU_USE_OPENCL=1 \
 			 STARPU_USE_SC_HYPERVISOR=1 \
 			 STARPU_SIMGRID=1 \
 			 STARPU_OPENMP=1 \
+			 STARPU_CLUSTER=1 \
 			 STARPU_MKL=1 \
 			 STARPU_WORKER_CALLBACKS=1 \
 			 STARPU_HAVE_GLPK_H=1 \

+ 8 - 1
examples/sched_ctx/parallel_tasks_with_cluster_api.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2015,2017                                CNRS
+ * Copyright (C) 2015,2017,2019                                CNRS
  * Copyright (C) 2015,2017                                Inria
  * Copyright (C) 2015,2017                                Université de Bordeaux
  *
@@ -19,6 +19,12 @@
 #include <starpu.h>
 #include <omp.h>
 
+#if !defined(STARPU_CLUSTER)
+int main(void)
+{
+	return 77;
+}
+#else
 #ifdef STARPU_QUICK_CHECK
 #define NTASKS 8
 #else
@@ -133,3 +139,4 @@ out:
 	starpu_shutdown();
 	return 0;
 }
+#endif

+ 4 - 1
include/starpu_clusters.h

@@ -19,6 +19,9 @@
 #ifndef __STARPU_CLUSTERS_UTIL_H__
 #define __STARPU_CLUSTERS_UTIL_H__
 
+#include <starpu_config.h>
+
+#ifdef STARPU_CLUSTER
 #ifdef STARPU_HAVE_HWLOC
 
 #include <hwloc.h>
@@ -79,7 +82,7 @@ void starpu_gnu_openmp_mkl_prologue(void*);
 #ifdef __cplusplus
 }
 #endif
-
+#endif
 #endif
 
 #endif /* __STARPU_CLUSTERS_UTIL_H__ */

+ 2 - 1
include/starpu_config.h.in

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2011,2012,2014,2016,2017                 Inria
  * Copyright (C) 2009-2018                                Université de Bordeaux
- * Copyright (C) 2010-2017                                CNRS
+ * Copyright (C) 2010-2017,2019                           CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -38,6 +38,7 @@
 #undef STARPU_USE_MPI_MASTER_SLAVE
 
 #undef STARPU_OPENMP
+#undef STARPU_CLUSTER
 
 #undef STARPU_SIMGRID
 #undef STARPU_SIMGRID_MC

+ 4 - 0
src/util/starpu_clusters_create.c

@@ -21,6 +21,8 @@
 
 #include <util/starpu_clusters_create.h>
 
+#ifdef STARPU_CLUSTER
+
 starpu_binding_function _starpu_cluster_type_get_func(enum starpu_cluster_types type)
 {
 	starpu_binding_function prologue_func;
@@ -768,3 +770,5 @@ void _starpu_cluster(struct _starpu_cluster_group *group)
 
 	return;
 }
+
+#endif

+ 3 - 0
src/util/starpu_clusters_create.h

@@ -28,6 +28,8 @@
 #include <mkl_service.h>
 #endif
 
+#ifdef STARPU_CLUSTER
+
 #ifdef __cplusplus
 extern
 #endif
@@ -124,4 +126,5 @@ static struct starpu_codelet _starpu_cluster_bind_cl=
 typedef void (*starpu_binding_function)(void*);
 starpu_binding_function _starpu_cluster_type_get_func(enum starpu_cluster_types type);
 
+#endif
 #endif /* __STARPU_CLUSTERS_CREATE_H__ */