configuration.texi 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. @c -*-texinfo-*-
  2. @c This file is part of the StarPU Handbook.
  3. @c Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. @c Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
  5. @c Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. @c See the file starpu.texi for copying conditions.
  7. @menu
  8. * Compilation configuration::
  9. * Execution configuration through environment variables::
  10. @end menu
  11. @node Compilation configuration
  12. @section Compilation configuration
  13. The following arguments can be given to the @code{configure} script.
  14. @menu
  15. * Common configuration::
  16. * Configuring workers::
  17. * Extension configuration::
  18. * Advanced configuration::
  19. @end menu
  20. @node Common configuration
  21. @subsection Common configuration
  22. @table @code
  23. @item --enable-debug
  24. Enable debugging messages.
  25. @item --enable-fast
  26. Disable assertion checks, which saves computation time.
  27. @item --enable-verbose
  28. Increase the verbosity of the debugging messages. This can be disabled
  29. at runtime by setting the environment variable @code{STARPU_SILENT} to
  30. any value.
  31. @smallexample
  32. % STARPU_SILENT=1 ./vector_scal
  33. @end smallexample
  34. @item --enable-coverage
  35. Enable flags for the @code{gcov} coverage tool.
  36. @end table
  37. @node Configuring workers
  38. @subsection Configuring workers
  39. @table @code
  40. @item --enable-maxcpus=@var{count}
  41. Use at most @var{count} CPU cores. This information is then
  42. available as the @code{STARPU_MAXCPUS} macro.
  43. @item --disable-cpu
  44. Disable the use of CPUs of the machine. Only GPUs etc. will be used.
  45. @item --enable-maxcudadev=@var{count}
  46. Use at most @var{count} CUDA devices. This information is then
  47. available as the @code{STARPU_MAXCUDADEVS} macro.
  48. @item --disable-cuda
  49. Disable the use of CUDA, even if a valid CUDA installation was detected.
  50. @item --with-cuda-dir=@var{prefix}
  51. Search for CUDA under @var{prefix}, which should notably contain
  52. @file{include/cuda.h}.
  53. @item --with-cuda-include-dir=@var{dir}
  54. Search for CUDA headers under @var{dir}, which should
  55. notably contain @code{cuda.h}. This defaults to @code{/include} appended to the
  56. value given to @code{--with-cuda-dir}.
  57. @item --with-cuda-lib-dir=@var{dir}
  58. Search for CUDA libraries under @var{dir}, which should notably contain
  59. the CUDA shared libraries---e.g., @file{libcuda.so}. This defaults to
  60. @code{/lib} appended to the value given to @code{--with-cuda-dir}.
  61. @item --disable-cuda-memcpy-peer
  62. Explicitly disable peer transfers when using CUDA 4.0.
  63. @item --enable-maxopencldev=@var{count}
  64. Use at most @var{count} OpenCL devices. This information is then
  65. available as the @code{STARPU_MAXOPENCLDEVS} macro.
  66. @item --disable-opencl
  67. Disable the use of OpenCL, even if the SDK is detected.
  68. @item --with-opencl-dir=@var{prefix}
  69. Search for an OpenCL implementation under @var{prefix}, which should
  70. notably contain @file{include/CL/cl.h} (or @file{include/OpenCL/cl.h} on
  71. Mac OS).
  72. @item --with-opencl-include-dir=@var{dir}
  73. Search for OpenCL headers under @var{dir}, which should notably contain
  74. @file{CL/cl.h} (or @file{OpenCL/cl.h} on Mac OS). This defaults to
  75. @code{/include} appended to the value given to @code{--with-opencl-dir}.
  76. @item --with-opencl-lib-dir=@var{dir}
  77. Search for an OpenCL library under @var{dir}, which should notably
  78. contain the OpenCL shared libraries---e.g. @file{libOpenCL.so}. This defaults to
  79. @code{/lib} appended to the value given to @code{--with-opencl-dir}.
  80. @item --enable-gordon
  81. Enable the use of the Gordon runtime for Cell SPUs.
  82. @c TODO: rather default to enabled when detected
  83. @item --with-gordon-dir=@var{prefix}
  84. Search for the Gordon SDK under @var{prefix}.
  85. @item --enable-maximplementations=@var{count}
  86. Allow for at most @var{count} codelet implementations for the same
  87. target device. This information is then available as the
  88. @code{STARPU_MAXIMPLEMENTATIONS} macro.
  89. @item ----enable-max-sched-ctxs=@var{count}
  90. Allow for at most @var{count} scheduling contexts
  91. This information is then available as the
  92. @code{STARPU_NMAX_SCHED_CTXS} macro.
  93. @item --disable-asynchronous-copy
  94. Disable asynchronous copies between CPU and GPU devices.
  95. The AMD implementation of OpenCL is known to
  96. fail when copying data asynchronously. When using this implementation,
  97. it is therefore necessary to disable asynchronous data transfers.
  98. @item --disable-asynchronous-cuda-copy
  99. Disable asynchronous copies between CPU and CUDA devices.
  100. @item --disable-asynchronous-opencl-copy
  101. Disable asynchronous copies between CPU and OpenCL devices.
  102. The AMD implementation of OpenCL is known to
  103. fail when copying data asynchronously. When using this implementation,
  104. it is therefore necessary to disable asynchronous data transfers.
  105. @end table
  106. @node Extension configuration
  107. @subsection Extension configuration
  108. @table @code
  109. @item --disable-socl
  110. Disable the SOCL extension (@pxref{SOCL OpenCL Extensions}). By
  111. default, it is enabled when an OpenCL implementation is found.
  112. @item --disable-starpu-top
  113. Disable the StarPU-Top interface (@pxref{StarPU-Top}). By default, it
  114. is enabled when the required dependencies are found.
  115. @item --disable-gcc-extensions
  116. Disable the GCC plug-in (@pxref{C Extensions}). By default, it is
  117. enabled when the GCC compiler provides a plug-in support.
  118. @item --with-mpicc=@var{path}
  119. Use the @command{mpicc} compiler at @var{path}, for starpumpi
  120. (@pxref{StarPU MPI support}).
  121. @item --enable-comm-stats
  122. Enable communication statistics for starpumpi (@pxref{StarPU MPI
  123. support}).
  124. @end table
  125. @node Advanced configuration
  126. @subsection Advanced configuration
  127. @table @code
  128. @item --enable-perf-debug
  129. Enable performance debugging through gprof.
  130. @item --enable-model-debug
  131. Enable performance model debugging.
  132. @item --enable-stats
  133. @c see ../../src/datawizard/datastats.c
  134. Enable gathering of memory transfer statistics.
  135. @item --enable-maxbuffers
  136. Define the maximum number of buffers that tasks will be able to take
  137. as parameters, then available as the @code{STARPU_NMAXBUFS} macro.
  138. @item --enable-allocation-cache
  139. Enable the use of a data allocation cache to avoid the cost of it with
  140. CUDA. Still experimental.
  141. @item --enable-opengl-render
  142. Enable the use of OpenGL for the rendering of some examples.
  143. @c TODO: rather default to enabled when detected
  144. @item --enable-blas-lib
  145. Specify the blas library to be used by some of the examples. The
  146. library has to be 'atlas' or 'goto'.
  147. @item --disable-starpufft
  148. Disable the build of libstarpufft, even if fftw or cuFFT is available.
  149. @item --with-magma=@var{prefix}
  150. Search for MAGMA under @var{prefix}. @var{prefix} should notably
  151. contain @file{include/magmablas.h}.
  152. @item --with-fxt=@var{prefix}
  153. Search for FxT under @var{prefix}.
  154. @url{http://savannah.nongnu.org/projects/fkt, FxT} is used to generate
  155. traces of scheduling events, which can then be rendered them using ViTE
  156. (@pxref{Off-line, off-line performance feedback}). @var{prefix} should
  157. notably contain @code{include/fxt/fxt.h}.
  158. @item --with-perf-model-dir=@var{dir}
  159. Store performance models under @var{dir}, instead of the current user's
  160. home.
  161. @item --with-goto-dir=@var{prefix}
  162. Search for GotoBLAS under @var{prefix}.
  163. @item --with-atlas-dir=@var{prefix}
  164. Search for ATLAS under @var{prefix}, which should notably contain
  165. @file{include/cblas.h}.
  166. @item --with-mkl-cflags=@var{cflags}
  167. Use @var{cflags} to compile code that uses the MKL library.
  168. @item --with-mkl-ldflags=@var{ldflags}
  169. Use @var{ldflags} when linking code that uses the MKL library. Note
  170. that the
  171. @url{http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/,
  172. MKL website} provides a script to determine the linking flags.
  173. @item --enable-sched-ctx-hypervisor
  174. Enables the Scheduling Context Hypervisor plugin(@pxref{Scheduling Context Hypervisor}).
  175. By default, it is disabled.
  176. @end table
  177. @node Execution configuration through environment variables
  178. @section Execution configuration through environment variables
  179. @menu
  180. * Workers:: Configuring workers
  181. * Scheduling:: Configuring the Scheduling engine
  182. * Misc:: Miscellaneous and debug
  183. @end menu
  184. @node Workers
  185. @subsection Configuring workers
  186. @table @code
  187. @item @code{STARPU_NCPU}
  188. Specify the number of CPU workers (thus not including workers dedicated to control acceleratores). Note that by default, StarPU will not allocate
  189. more CPU workers than there are physical CPUs, and that some CPUs are used to control
  190. the accelerators.
  191. @item @code{STARPU_NCUDA}
  192. Specify the number of CUDA devices that StarPU can use. If
  193. @code{STARPU_NCUDA} is lower than the number of physical devices, it is
  194. possible to select which CUDA devices should be used by the means of the
  195. @code{STARPU_WORKERS_CUDAID} environment variable. By default, StarPU will
  196. create as many CUDA workers as there are CUDA devices.
  197. @item @code{STARPU_NOPENCL}
  198. OpenCL equivalent of the @code{STARPU_NCUDA} environment variable.
  199. @item @code{STARPU_NGORDON}
  200. Specify the number of SPUs that StarPU can use.
  201. @item @code{STARPU_WORKERS_NOBIND}
  202. Setting it to non-zero will prevent StarPU from binding its threads to
  203. CPUs. This is for instance useful when running the testsuite in parallel.
  204. @item @code{STARPU_WORKERS_CPUID}
  205. Passing an array of integers (starting from 0) in @code{STARPU_WORKERS_CPUID}
  206. specifies on which logical CPU the different workers should be
  207. bound. For instance, if @code{STARPU_WORKERS_CPUID = "0 1 4 5"}, the first
  208. worker will be bound to logical CPU #0, the second CPU worker will be bound to
  209. logical CPU #1 and so on. Note that the logical ordering of the CPUs is either
  210. determined by the OS, or provided by the @code{hwloc} library in case it is
  211. available.
  212. Note that the first workers correspond to the CUDA workers, then come the
  213. OpenCL and the SPU, and finally the CPU workers. For example if
  214. we have @code{STARPU_NCUDA=1}, @code{STARPU_NOPENCL=1}, @code{STARPU_NCPU=2}
  215. and @code{STARPU_WORKERS_CPUID = "0 2 1 3"}, the CUDA device will be controlled
  216. by logical CPU #0, the OpenCL device will be controlled by logical CPU #2, and
  217. the logical CPUs #1 and #3 will be used by the CPU workers.
  218. If the number of workers is larger than the array given in
  219. @code{STARPU_WORKERS_CPUID}, the workers are bound to the logical CPUs in a
  220. round-robin fashion: if @code{STARPU_WORKERS_CPUID = "0 1"}, the first and the
  221. third (resp. second and fourth) workers will be put on CPU #0 (resp. CPU #1).
  222. This variable is ignored if the @code{use_explicit_workers_bindid} flag of the
  223. @code{starpu_conf} structure passed to @code{starpu_init} is set.
  224. @item @code{STARPU_WORKERS_CUDAID}
  225. Similarly to the @code{STARPU_WORKERS_CPUID} environment variable, it is
  226. possible to select which CUDA devices should be used by StarPU. On a machine
  227. equipped with 4 GPUs, setting @code{STARPU_WORKERS_CUDAID = "1 3"} and
  228. @code{STARPU_NCUDA=2} specifies that 2 CUDA workers should be created, and that
  229. they should use CUDA devices #1 and #3 (the logical ordering of the devices is
  230. the one reported by CUDA).
  231. This variable is ignored if the @code{use_explicit_workers_cuda_gpuid} flag of
  232. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  233. @item @code{STARPU_WORKERS_OPENCLID}
  234. OpenCL equivalent of the @code{STARPU_WORKERS_CUDAID} environment variable.
  235. This variable is ignored if the @code{use_explicit_workers_opencl_gpuid} flag of
  236. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  237. @item @code{STARPU_SINGLE_COMBINED_WORKER}
  238. If set, StarPU will create several workers which won't be able to work
  239. concurrently. It will create combined workers which size goes from 1 to the
  240. total number of CPU workers in the system.
  241. @item @code{SYNTHESIZE_ARITY_COMBINED_WORKER}
  242. @item @code{STARPU_MIN_WORKERSIZE}
  243. Let the user give a hint to StarPU about which how many workers
  244. (minimum boundary) the combined workers should contain.
  245. @item @code{STARPU_MAX_WORKERSIZE}
  246. Let the user give a hint to StarPU about which how many workers
  247. (maximum boundary) the combined workers should contain.
  248. @item @code{STARPU_DISABLE_ASYNCHRONOUS_COPY}
  249. Disable asynchronous copies between CPU and GPU devices.
  250. The AMD implementation of OpenCL is known to
  251. fail when copying data asynchronously. When using this implementation,
  252. it is therefore necessary to disable asynchronous data transfers.
  253. @item @code{STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY}
  254. Disable asynchronous copies between CPU and CUDA devices.
  255. @item @code{STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY}
  256. Disable asynchronous copies between CPU and OpenCL devices.
  257. The AMD implementation of OpenCL is known to
  258. fail when copying data asynchronously. When using this implementation,
  259. it is therefore necessary to disable asynchronous data transfers.
  260. @end table
  261. >>>>>>> .merge-right.r7182
  262. @node Scheduling
  263. @subsection Configuring the Scheduling engine
  264. @table @code
  265. @item @code{STARPU_SCHED}
  266. Choose between the different scheduling policies proposed by StarPU: work
  267. random, stealing, greedy, with performance models, etc.
  268. Use @code{STARPU_SCHED=help} to get the list of available schedulers.
  269. @item @code{STARPU_CALIBRATE}
  270. If this variable is set to 1, the performance models are calibrated during
  271. the execution. If it is set to 2, the previous values are dropped to restart
  272. calibration from scratch. Setting this variable to 0 disable calibration, this
  273. is the default behaviour.
  274. Note: this currently only applies to @code{dm}, @code{dmda} and @code{heft} scheduling policies.
  275. @item @code{STARPU_BUS_CALIBRATE}
  276. If this variable is set to 1, the bus is recalibrated during intialization.
  277. @item @code{STARPU_PREFETCH}
  278. @anchor{STARPU_PREFETCH}
  279. This variable indicates whether data prefetching should be enabled (0 means
  280. that it is disabled). If prefetching is enabled, when a task is scheduled to be
  281. executed e.g. on a GPU, StarPU will request an asynchronous transfer in
  282. advance, so that data is already present on the GPU when the task starts. As a
  283. result, computation and data transfers are overlapped.
  284. Note that prefetching is enabled by default in StarPU.
  285. @item @code{STARPU_SCHED_ALPHA}
  286. To estimate the cost of a task StarPU takes into account the estimated
  287. computation time (obtained thanks to performance models). The alpha factor is
  288. the coefficient to be applied to it before adding it to the communication part.
  289. @item @code{STARPU_SCHED_BETA}
  290. To estimate the cost of a task StarPU takes into account the estimated
  291. data transfer time (obtained thanks to performance models). The beta factor is
  292. the coefficient to be applied to it before adding it to the computation part.
  293. @end table
  294. @node Misc
  295. @subsection Miscellaneous and debug
  296. @table @code
  297. @item @code{STARPU_SILENT}
  298. This variable allows to disable verbose mode at runtime when StarPU
  299. has been configured with the option @code{--enable-verbose}.
  300. @item @code{STARPU_LOGFILENAME}
  301. This variable specifies in which file the debugging output should be saved to.
  302. @item @code{STARPU_FXT_PREFIX}
  303. This variable specifies in which directory to save the trace generated if FxT is enabled. It needs to have a trailing '/' character.
  304. @item @code{STARPU_LIMIT_GPU_MEM}
  305. This variable specifies the maximum number of megabytes that should be
  306. available to the application on each GPUs. In case this value is smaller than
  307. the size of the memory of a GPU, StarPU pre-allocates a buffer to waste memory
  308. on the device. This variable is intended to be used for experimental purposes
  309. as it emulates devices that have a limited amount of memory.
  310. @item @code{STARPU_GENERATE_TRACE}
  311. When set to 1, this variable indicates that StarPU should automatically
  312. generate a Paje trace when starpu_shutdown is called.
  313. @end table