configuration.texi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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 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. * Advanced configuration::
  18. @end menu
  19. @node Common configuration
  20. @subsection Common configuration
  21. @menu
  22. * --enable-debug::
  23. * --enable-fast::
  24. * --enable-verbose::
  25. * --enable-coverage::
  26. @end menu
  27. @node --enable-debug
  28. @subsubsection @code{--enable-debug}
  29. Enable debugging messages.
  30. @node --enable-fast
  31. @subsubsection @code{--enable-fast}
  32. Do not enforce assertions, saves a lot of time spent to compute them otherwise.
  33. @node --enable-verbose
  34. @subsubsection @code{--enable-verbose}
  35. Augment the verbosity of the debugging messages. This can be disabled
  36. at runtime by setting the environment variable @code{STARPU_SILENT} to
  37. any value.
  38. @smallexample
  39. % STARPU_SILENT=1 ./vector_scal
  40. @end smallexample
  41. @node --enable-coverage
  42. @subsubsection @code{--enable-coverage}
  43. Enable flags for the @code{gcov} coverage tool.
  44. @node Configuring workers
  45. @subsection Configuring workers
  46. @menu
  47. * --enable-maxcpus::
  48. * --disable-cpu::
  49. * --enable-maxcudadev::
  50. * --disable-cuda::
  51. * --with-cuda-dir::
  52. * --with-cuda-include-dir::
  53. * --with-cuda-lib-dir::
  54. * --disable-cuda-memcpy-peer::
  55. * --enable-maxopencldev::
  56. * --disable-opencl::
  57. * --with-opencl-dir::
  58. * --with-opencl-include-dir::
  59. * --with-opencl-lib-dir::
  60. * --enable-gordon::
  61. * --with-gordon-dir::
  62. * --enable-maximplementations::
  63. @end menu
  64. @node --enable-maxcpus
  65. @subsubsection @code{--enable-maxcpus=<number>}
  66. Define the maximum number of CPU cores that StarPU will support, then
  67. available as the @code{STARPU_MAXCPUS} macro.
  68. @node --disable-cpu
  69. @subsubsection @code{--disable-cpu}
  70. Disable the use of CPUs of the machine. Only GPUs etc. will be used.
  71. @node --enable-maxcudadev
  72. @subsubsection @code{--enable-maxcudadev=<number>}
  73. Define the maximum number of CUDA devices that StarPU will support, then
  74. available as the @code{STARPU_MAXCUDADEVS} macro.
  75. @node --disable-cuda
  76. @subsubsection @code{--disable-cuda}
  77. Disable the use of CUDA, even if a valid CUDA installation was detected.
  78. @node --with-cuda-dir
  79. @subsubsection @code{--with-cuda-dir=<path>}
  80. Specify the directory where CUDA is installed. This directory should notably contain
  81. @code{include/cuda.h}.
  82. @node --with-cuda-include-dir
  83. @subsubsection @code{--with-cuda-include-dir=<path>}
  84. Specify the directory where CUDA headers are installed. This directory should
  85. notably contain @code{cuda.h}. This defaults to @code{/include} appended to the
  86. value given to @code{--with-cuda-dir}.
  87. @node --with-cuda-lib-dir
  88. @subsubsection @code{--with-cuda-lib-dir=<path>}
  89. Specify the directory where the CUDA library is installed. This directory should
  90. notably contain the CUDA shared libraries (e.g. libcuda.so). This defaults to
  91. @code{/lib} appended to the value given to @code{--with-cuda-dir}.
  92. @node --disable-cuda-memcpy-peer
  93. @subsubsection @code{--disable-cuda-memcpy-peer}
  94. Explicitely disable peer transfers when using CUDA 4.0
  95. @node --enable-maxopencldev
  96. @subsubsection @code{--enable-maxopencldev=<number>}
  97. Define the maximum number of OpenCL devices that StarPU will support, then
  98. available as the @code{STARPU_MAXOPENCLDEVS} macro.
  99. @node --disable-opencl
  100. @subsubsection @code{--disable-opencl}
  101. Disable the use of OpenCL, even if the SDK is detected.
  102. @node --with-opencl-dir
  103. @subsubsection @code{--with-opencl-dir=<path>}
  104. Specify the location of the OpenCL SDK. This directory should notably contain
  105. @code{include/CL/cl.h} (or @code{include/OpenCL/cl.h} on Mac OS).
  106. @node --with-opencl-include-dir
  107. @subsubsection @code{--with-opencl-include-dir=<path>}
  108. Specify the location of OpenCL headers. This directory should notably contain
  109. @code{CL/cl.h} (or @code{OpenCL/cl.h} on Mac OS). This defaults to
  110. @code{/include} appended to the value given to @code{--with-opencl-dir}.
  111. @node --with-opencl-lib-dir
  112. @subsubsection @code{--with-opencl-lib-dir=<path>}
  113. Specify the location of the OpenCL library. This directory should notably
  114. contain the OpenCL shared libraries (e.g. libOpenCL.so). This defaults to
  115. @code{/lib} appended to the value given to @code{--with-opencl-dir}.
  116. @node --enable-gordon
  117. @subsubsection @code{--enable-gordon}
  118. Enable the use of the Gordon runtime for Cell SPUs.
  119. @c TODO: rather default to enabled when detected
  120. @node --with-gordon-dir
  121. @subsubsection @code{--with-gordon-dir=<path>}
  122. Specify the location of the Gordon SDK.
  123. @node --enable-maximplementations
  124. @subsubsection @code{--enable-maximplementations=<number>}
  125. Define the number of implementations that can be defined for a single kind of
  126. device. It is then available as the @code{STARPU_MAXIMPLEMENTATIONS} macro.
  127. @node Advanced configuration
  128. @subsection Advanced configuration
  129. @menu
  130. * --enable-perf-debug::
  131. * --enable-model-debug::
  132. * --enable-stats::
  133. * --enable-maxbuffers::
  134. * --enable-allocation-cache::
  135. * --enable-opengl-render::
  136. * --enable-blas-lib::
  137. * --disable-starpufft::
  138. * --with-magma::
  139. * --with-fxt::
  140. * --with-perf-model-dir::
  141. * --with-mpicc::
  142. * --with-goto-dir::
  143. * --with-atlas-dir::
  144. * --with-mkl-cflags::
  145. * --with-mkl-ldflags::
  146. * --disable-gcc-extensions::
  147. * --disable-socl::
  148. @end menu
  149. @node --enable-perf-debug
  150. @subsubsection @code{--enable-perf-debug}
  151. Enable performance debugging through gprof.
  152. @node --enable-model-debug
  153. @subsubsection @code{--enable-model-debug}
  154. Enable performance model debugging.
  155. @node --enable-stats
  156. @subsubsection @code{--enable-stats}
  157. Enable statistics.
  158. @node --enable-maxbuffers
  159. @subsubsection @code{--enable-maxbuffers=<nbuffers>}
  160. Define the maximum number of buffers that tasks will be able to take
  161. as parameters, then available as the @code{STARPU_NMAXBUFS} macro.
  162. @node --enable-allocation-cache
  163. @subsubsection @code{--enable-allocation-cache}
  164. Enable the use of a data allocation cache to avoid the cost of it with
  165. CUDA. Still experimental.
  166. @node --enable-opengl-render
  167. @subsubsection @code{--enable-opengl-render}
  168. Enable the use of OpenGL for the rendering of some examples.
  169. @c TODO: rather default to enabled when detected
  170. @node --enable-blas-lib
  171. @subsubsection @code{--enable-blas-lib=<name>}
  172. Specify the blas library to be used by some of the examples. The
  173. library has to be 'atlas' or 'goto'.
  174. @node --disable-starpufft
  175. @subsubsection @code{--disable-starpufft}
  176. Disable the build of libstarpufft, even if fftw or cuFFT is available.
  177. @node --with-magma
  178. @subsubsection @code{--with-magma=<path>}
  179. Specify where magma is installed. This directory should notably contain
  180. @code{include/magmablas.h}.
  181. @node --with-fxt
  182. @subsubsection @code{--with-fxt=<path>}
  183. Specify the location of FxT (for generating traces and rendering them
  184. using ViTE). This directory should notably contain
  185. @code{include/fxt/fxt.h}.
  186. @c TODO add ref to other section
  187. @node --with-perf-model-dir
  188. @subsubsection @code{--with-perf-model-dir=<dir>}
  189. Specify where performance models should be stored (instead of defaulting to the
  190. current user's home).
  191. @node --with-mpicc
  192. @subsubsection @code{--with-mpicc=<path to mpicc>}
  193. Specify the location of the @code{mpicc} compiler to be used for starpumpi.
  194. @node --with-goto-dir
  195. @subsubsection @code{--with-goto-dir=<dir>}
  196. Specify the location of GotoBLAS.
  197. @node --with-atlas-dir
  198. @subsubsection @code{--with-atlas-dir=<dir>}
  199. Specify the location of ATLAS. This directory should notably contain
  200. @code{include/cblas.h}.
  201. @node --with-mkl-cflags
  202. @subsubsection @code{--with-mkl-cflags=<cflags>}
  203. Specify the compilation flags for the MKL Library.
  204. @node --with-mkl-ldflags
  205. @subsubsection @code{--with-mkl-ldflags=<ldflags>}
  206. Specify the linking flags for the MKL Library. Note that the
  207. @url{http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/}
  208. website provides a script to determine the linking flags.
  209. @node --disable-gcc-extensions
  210. @subsubsection @code{--disable-gcc-extensions}
  211. Disable the GCC plug-in. It is by default enabled if the GCC compiler
  212. provides a plug-in support.
  213. @node --disable-socl
  214. @subsubsection @code{--disable-socl}
  215. Disable the SOCL extension. It is by default enabled if a valid OpenCL
  216. installation is found.
  217. @node Execution configuration through environment variables
  218. @section Execution configuration through environment variables
  219. @menu
  220. * Workers:: Configuring workers
  221. * Scheduling:: Configuring the Scheduling engine
  222. * Misc:: Miscellaneous and debug
  223. @end menu
  224. Note: the values given in @code{starpu_conf} structure passed when
  225. calling @code{starpu_init} will override the values of the environment
  226. variables.
  227. @node Workers
  228. @subsection Configuring workers
  229. @menu
  230. * STARPU_NCPUS:: Number of CPU workers
  231. * STARPU_NCUDA:: Number of CUDA workers
  232. * STARPU_NOPENCL:: Number of OpenCL workers
  233. * STARPU_NGORDON:: Number of SPU workers (Cell)
  234. * STARPU_WORKERS_CPUID:: Bind workers to specific CPUs
  235. * STARPU_WORKERS_CUDAID:: Select specific CUDA devices
  236. * STARPU_WORKERS_OPENCLID:: Select specific OpenCL devices
  237. @end menu
  238. @node STARPU_NCPUS
  239. @subsubsection @code{STARPU_NCPUS} -- Number of CPU workers
  240. Specify the number of CPU workers (thus not including workers dedicated to control acceleratores). Note that by default, StarPU will not allocate
  241. more CPU workers than there are physical CPUs, and that some CPUs are used to control
  242. the accelerators.
  243. @node STARPU_NCUDA
  244. @subsubsection @code{STARPU_NCUDA} -- Number of CUDA workers
  245. Specify the number of CUDA devices that StarPU can use. If
  246. @code{STARPU_NCUDA} is lower than the number of physical devices, it is
  247. possible to select which CUDA devices should be used by the means of the
  248. @code{STARPU_WORKERS_CUDAID} environment variable. By default, StarPU will
  249. create as many CUDA workers as there are CUDA devices.
  250. @node STARPU_NOPENCL
  251. @subsubsection @code{STARPU_NOPENCL} -- Number of OpenCL workers
  252. OpenCL equivalent of the @code{STARPU_NCUDA} environment variable.
  253. @node STARPU_NGORDON
  254. @subsubsection @code{STARPU_NGORDON} -- Number of SPU workers (Cell)
  255. Specify the number of SPUs that StarPU can use.
  256. @node STARPU_WORKERS_CPUID
  257. @subsubsection @code{STARPU_WORKERS_CPUID} -- Bind workers to specific CPUs
  258. Passing an array of integers (starting from 0) in @code{STARPU_WORKERS_CPUID}
  259. specifies on which logical CPU the different workers should be
  260. bound. For instance, if @code{STARPU_WORKERS_CPUID = "0 1 4 5"}, the first
  261. worker will be bound to logical CPU #0, the second CPU worker will be bound to
  262. logical CPU #1 and so on. Note that the logical ordering of the CPUs is either
  263. determined by the OS, or provided by the @code{hwloc} library in case it is
  264. available.
  265. Note that the first workers correspond to the CUDA workers, then come the
  266. OpenCL and the SPU, and finally the CPU workers. For example if
  267. we have @code{STARPU_NCUDA=1}, @code{STARPU_NOPENCL=1}, @code{STARPU_NCPUS=2}
  268. and @code{STARPU_WORKERS_CPUID = "0 2 1 3"}, the CUDA device will be controlled
  269. by logical CPU #0, the OpenCL device will be controlled by logical CPU #2, and
  270. the logical CPUs #1 and #3 will be used by the CPU workers.
  271. If the number of workers is larger than the array given in
  272. @code{STARPU_WORKERS_CPUID}, the workers are bound to the logical CPUs in a
  273. round-robin fashion: if @code{STARPU_WORKERS_CPUID = "0 1"}, the first and the
  274. third (resp. second and fourth) workers will be put on CPU #0 (resp. CPU #1).
  275. This variable is ignored if the @code{use_explicit_workers_bindid} flag of the
  276. @code{starpu_conf} structure passed to @code{starpu_init} is set.
  277. @node STARPU_WORKERS_CUDAID
  278. @subsubsection @code{STARPU_WORKERS_CUDAID} -- Select specific CUDA devices
  279. Similarly to the @code{STARPU_WORKERS_CPUID} environment variable, it is
  280. possible to select which CUDA devices should be used by StarPU. On a machine
  281. equipped with 4 GPUs, setting @code{STARPU_WORKERS_CUDAID = "1 3"} and
  282. @code{STARPU_NCUDA=2} specifies that 2 CUDA workers should be created, and that
  283. they should use CUDA devices #1 and #3 (the logical ordering of the devices is
  284. the one reported by CUDA).
  285. This variable is ignored if the @code{use_explicit_workers_cuda_gpuid} flag of
  286. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  287. @node STARPU_WORKERS_OPENCLID
  288. @subsubsection @code{STARPU_WORKERS_OPENCLID} -- Select specific OpenCL devices
  289. OpenCL equivalent of the @code{STARPU_WORKERS_CUDAID} environment variable.
  290. This variable is ignored if the @code{use_explicit_workers_opencl_gpuid} flag of
  291. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  292. @node Scheduling
  293. @subsection Configuring the Scheduling engine
  294. @menu
  295. * STARPU_SCHED:: Scheduling policy
  296. * STARPU_CALIBRATE:: Calibrate performance models
  297. * STARPU_PREFETCH:: Use data prefetch
  298. * STARPU_SCHED_ALPHA:: Computation factor
  299. * STARPU_SCHED_BETA:: Communication factor
  300. @end menu
  301. @node STARPU_SCHED
  302. @subsubsection @code{STARPU_SCHED} -- Scheduling policy
  303. Choose between the different scheduling policies proposed by StarPU: work
  304. random, stealing, greedy, with performance models, etc.
  305. Use @code{STARPU_SCHED=help} to get the list of available schedulers.
  306. @node STARPU_CALIBRATE
  307. @subsubsection @code{STARPU_CALIBRATE} -- Calibrate performance models
  308. If this variable is set to 1, the performance models are calibrated during
  309. the execution. If it is set to 2, the previous values are dropped to restart
  310. calibration from scratch. Setting this variable to 0 disable calibration, this
  311. is the default behaviour.
  312. Note: this currently only applies to @code{dm}, @code{dmda} and @code{heft} scheduling policies.
  313. @node STARPU_PREFETCH
  314. @subsubsection @code{STARPU_PREFETCH} -- Use data prefetch
  315. This variable indicates whether data prefetching should be enabled (0 means
  316. that it is disabled). If prefetching is enabled, when a task is scheduled to be
  317. executed e.g. on a GPU, StarPU will request an asynchronous transfer in
  318. advance, so that data is already present on the GPU when the task starts. As a
  319. result, computation and data transfers are overlapped.
  320. Note that prefetching is enabled by default in StarPU.
  321. @node STARPU_SCHED_ALPHA
  322. @subsubsection @code{STARPU_SCHED_ALPHA} -- Computation factor
  323. To estimate the cost of a task StarPU takes into account the estimated
  324. computation time (obtained thanks to performance models). The alpha factor is
  325. the coefficient to be applied to it before adding it to the communication part.
  326. @node STARPU_SCHED_BETA
  327. @subsubsection @code{STARPU_SCHED_BETA} -- Communication factor
  328. To estimate the cost of a task StarPU takes into account the estimated
  329. data transfer time (obtained thanks to performance models). The beta factor is
  330. the coefficient to be applied to it before adding it to the computation part.
  331. @node Misc
  332. @subsection Miscellaneous and debug
  333. @menu
  334. * STARPU_SILENT:: Disable verbose mode
  335. * STARPU_LOGFILENAME:: Select debug file name
  336. * STARPU_FXT_PREFIX:: FxT trace location
  337. * STARPU_LIMIT_GPU_MEM:: Restrict memory size on the GPUs
  338. * STARPU_GENERATE_TRACE:: Generate a Paje trace when StarPU is shut down
  339. @end menu
  340. @node STARPU_SILENT
  341. @subsubsection @code{STARPU_SILENT} -- Disable verbose mode
  342. This variable allows to disable verbose mode at runtime when StarPU
  343. has been configured with the option @code{--enable-verbose}.
  344. @node STARPU_LOGFILENAME
  345. @subsubsection @code{STARPU_LOGFILENAME} -- Select debug file name
  346. This variable specifies in which file the debugging output should be saved to.
  347. @node STARPU_FXT_PREFIX
  348. @subsubsection @code{STARPU_FXT_PREFIX} -- FxT trace location
  349. This variable specifies in which directory to save the trace generated if FxT is enabled. It needs to have a trailing '/' character.
  350. @node STARPU_LIMIT_GPU_MEM
  351. @subsubsection @code{STARPU_LIMIT_GPU_MEM} -- Restrict memory size on the GPUs
  352. This variable specifies the maximum number of megabytes that should be
  353. available to the application on each GPUs. In case this value is smaller than
  354. the size of the memory of a GPU, StarPU pre-allocates a buffer to waste memory
  355. on the device. This variable is intended to be used for experimental purposes
  356. as it emulates devices that have a limited amount of memory.
  357. @node STARPU_GENERATE_TRACE
  358. @subsubsection @code{STARPU_GENERATE_TRACE} -- Generate a Paje trace when StarPU is shut down
  359. When set to 1, this variable indicates that StarPU should automatically
  360. generate a Paje trace when starpu_shutdown is called.