소스 검색

Related-cpu option renaming.

Rename configure option --enable-nmaxcpus into --enable-maxcpu
and macro STARPU_NMAXCPUS into STARPU_MAXCPUS to be consistent with CUDA and OpenCL
Nathalie Furmento 14 년 전
부모
커밋
4bce668274
7개의 변경된 파일22개의 추가작업 그리고 22개의 파일을 삭제
  1. 8 9
      configure.ac
  2. 5 5
      doc/starpu.texi
  3. 1 1
      include/starpu_config.h.in
  4. 3 3
      include/starpu_perfmodel.h
  5. 2 2
      src/core/topology.c
  6. 1 1
      tools/starpu_perfmodel_display.c
  7. 2 1
      tools/starpu_regression_display.c

+ 8 - 9
configure.ac

@@ -161,12 +161,11 @@ fi
 ###############################################################################
 
 AC_MSG_CHECKING(maximum number of CPUs)
-AC_ARG_ENABLE(nmaxcpus, [AS_HELP_STRING([--enable-nmaxcpus=<number>],
+AC_ARG_ENABLE(maxcpus, [AS_HELP_STRING([--enable-maxcpu=<number>],
 			[maximum number of CPUs])],
-			nmaxcpus=$enableval, nmaxcpus=16)
-AC_MSG_RESULT($nmaxcpus)
-# TODO: rename to STARPU_MAXCPUS for coherency with CUDA/OpenCL?
-AC_DEFINE_UNQUOTED(STARPU_NMAXCPUS, [$nmaxcpus], [Maximum number of CPUs supported])
+			maxcpus=$enableval, maxcpus=16)
+AC_MSG_RESULT($maxcpus)
+AC_DEFINE_UNQUOTED(STARPU_MAXCPUS, [$maxcpus], [Maximum number of CPUs supported])
 
 AC_MSG_CHECKING(whether CPUs should be used)
 AC_ARG_ENABLE(cpu, [AS_HELP_STRING([--disable-cpu],
@@ -182,7 +181,7 @@ if test x$enable_cpu = xyes; then
 fi
 
 # How many parallel worker can we support ?
-nmaxcombinedworkers=`expr 2 \* $nmaxcpus`
+nmaxcombinedworkers=`expr 2 \* $maxcpus`
 AC_DEFINE_UNQUOTED(STARPU_NMAX_COMBINEDWORKERS,
 	[$nmaxcombinedworkers], [Maximum number of worker combinations])
 
@@ -879,7 +878,7 @@ AC_CHECK_FUNCS([clock_gettime])
 
 # Compute the maximum number of workers (we round it to 16 for alignment
 # purposes).
-nmaxworkers=`expr 16 \* \( \( $nmaxcpus + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
+nmaxworkers=`expr 16 \* \( \( $maxcpus + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
 AC_MSG_CHECKING(Maximum number of workers)
 AC_MSG_RESULT($nmaxworkers)
 AC_DEFINE_UNQUOTED(STARPU_NMAXWORKERS, [$nmaxworkers], [Maximum number of workers])
@@ -1349,10 +1348,10 @@ AC_MSG_NOTICE([
 	GCC plugin: $build_gcc_plugin
 
 	Compile-time limits
-	(change these with --enable-nmaxcpus, --enable-maxcudadev,
+	(change these with --enable-maxcpus, --enable-maxcudadev,
 	--enable-maxopencldev, --enable-maxbuffers)
 
-	Maximum number of CPUs:           $nmaxcpus
+	Maximum number of CPUs:           $maxcpus
 	Maximum number of CUDA devices:   $nmaxcudadev
 	Maximum number of OpenCL devices: $nmaxopencldev
 	Maximum number of memory nodes:   $maxnodes

+ 5 - 5
doc/starpu.texi

@@ -2494,7 +2494,7 @@ Enable flags for the @code{gcov} coverage tool.
 @subsection Configuring workers
 
 @menu
-* --enable-nmaxcpus::         
+* --enable-maxcpus::         
 * --disable-cpu::               
 * --enable-maxcudadev::         
 * --disable-cuda::              
@@ -2510,12 +2510,12 @@ Enable flags for the @code{gcov} coverage tool.
 * --with-gordon-dir::           
 @end menu
 
-@node --enable-nmaxcpus
-@subsubsection @code{--enable-nmaxcpus=<number>}
+@node --enable-maxcpus
+@subsubsection @code{--enable-maxcpus=<number>}
 @table @asis
 @item @emph{Description}:
 Defines the maximum number of CPU cores that StarPU will support, then
-available as the @code{STARPU_NMAXCPUS} macro.
+available as the @code{STARPU_MAXCPUS} macro.
 @end table
 
 @node --disable-cpu
@@ -3216,7 +3216,7 @@ the type is not valid otherwise.
 @subsection @code{starpu_cpu_worker_get_count} -- Get the number of CPU controlled by StarPU
 @deftypefun unsigned starpu_cpu_worker_get_count (void)
 This function returns the number of CPUs controlled by StarPU. The returned
-value should be at most @code{STARPU_NMAXCPUS}.
+value should be at most @code{STARPU_MAXCPUS}.
 @end deftypefun
 
 @node starpu_cuda_worker_get_count

+ 1 - 1
include/starpu_config.h.in

@@ -42,7 +42,7 @@
 #undef STARPU_HAVE_CURAND
 
 #undef STARPU_NMAXBUFS
-#undef STARPU_NMAXCPUS
+#undef STARPU_MAXCPUS
 #undef STARPU_MAXCUDADEVS
 #undef STARPU_MAXOPENCLDEVS
 #undef STARPU_NMAXWORKERS

+ 3 - 3
include/starpu_perfmodel.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -43,8 +43,8 @@ struct starpu_buffer_descr_t;
 
 enum starpu_perf_archtype {
 	STARPU_CPU_DEFAULT = 0,
-	/* CPU combined workers between 0 and STARPU_NMAXCPUS-1 */
-	STARPU_CUDA_DEFAULT = STARPU_NMAXCPUS,
+	/* CPU combined workers between 0 and STARPU_MAXCPUS-1 */
+	STARPU_CUDA_DEFAULT = STARPU_MAXCPUS,
 	STARPU_OPENCL_DEFAULT = STARPU_CUDA_DEFAULT + STARPU_MAXCUDADEVS,
 	/* STARPU_OPENCL_DEFAULT + devid */
 	STARPU_GORDON_DEFAULT = STARPU_OPENCL_DEFAULT + STARPU_MAXOPENCLDEVS

+ 2 - 2
src/core/topology.c

@@ -448,11 +448,11 @@ static int _starpu_init_machine_config(struct starpu_machine_config_s *config,
 		long avail_cpus = topology->nhwcpus - (use_accelerator?already_busy_cpus:0);
 		if (avail_cpus < 0)
 			avail_cpus = 0;
-		topology->ncpus = STARPU_MIN(avail_cpus, STARPU_NMAXCPUS);
+		topology->ncpus = STARPU_MIN(avail_cpus, STARPU_MAXCPUS);
 	} else {
 		/* use the specified value */
 		topology->ncpus = (unsigned)explicitval;
-		STARPU_ASSERT(topology->ncpus <= STARPU_NMAXCPUS);
+		STARPU_ASSERT(topology->ncpus <= STARPU_MAXCPUS);
 	}
 	STARPU_ASSERT(topology->ncpus + topology->nworkers <= STARPU_NMAXWORKERS);
 

+ 1 - 1
tools/starpu_perfmodel_display.c

@@ -258,7 +258,7 @@ static void display_all_perf_models(struct starpu_perfmodel_t *model)
 		if (sscanf(arch, "cpu:%d", &k) == 1)
 		{
 			/* For combined CPU workers */
-			if ((k < 1) || (k > STARPU_NMAXCPUS))
+			if ((k < 1) || (k > STARPU_MAXCPUS))
 			{
 				fprintf(stderr, "Invalid CPU size\n");
 				exit(-1);

+ 2 - 1
tools/starpu_regression_display.c

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011  Université de Bordeaux 1
+ * Copyright (C) 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -239,7 +240,7 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel_
 		if (sscanf(arch, "cpu:%d", &k) == 1)
 		{
 			/* For combined CPU workers */
-			if ((k < 1) || (k > STARPU_NMAXCPUS))
+			if ((k < 1) || (k > STARPU_MAXCPUS))
 			{
 				fprintf(stderr, "Invalid CPU size\n");
 				exit(-1);