configuration.texi 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. @item --enable-quick-check
  37. Specify tests and examples should be run on a smaller data set, i.e
  38. allowing a faster execution time
  39. @item --with-hwloc
  40. Specify hwloc should be used by StarPU. hwloc should be found by the
  41. means of the tools @code{pkg-config}.
  42. @item --with-hwloc=@var{prefix}
  43. Specify hwloc should be used by StarPU. hwloc should be found in the
  44. directory specified by @var{prefix}.
  45. @item --without-hwloc
  46. Specify hwloc should not be used by StarPU.
  47. @end table
  48. Additionally, the @command{configure} script recognize many variables, which
  49. can be listed by typing @code{./configure --help}. For example,
  50. @code{./configure NVCCFLAGS="-arch sm_13"} adds a flag for the compilation of
  51. CUDA kernels.
  52. @node Configuring workers
  53. @subsection Configuring workers
  54. @table @code
  55. @item --enable-maxcpus=@var{count}
  56. Use at most @var{count} CPU cores. This information is then
  57. available as the @code{STARPU_MAXCPUS} macro.
  58. @item --disable-cpu
  59. Disable the use of CPUs of the machine. Only GPUs etc. will be used.
  60. @item --enable-maxcudadev=@var{count}
  61. Use at most @var{count} CUDA devices. This information is then
  62. available as the @code{STARPU_MAXCUDADEVS} macro.
  63. @item --disable-cuda
  64. Disable the use of CUDA, even if a valid CUDA installation was detected.
  65. @item --with-cuda-dir=@var{prefix}
  66. Search for CUDA under @var{prefix}, which should notably contain
  67. @file{include/cuda.h}.
  68. @item --with-cuda-include-dir=@var{dir}
  69. Search for CUDA headers under @var{dir}, which should
  70. notably contain @code{cuda.h}. This defaults to @code{/include} appended to the
  71. value given to @code{--with-cuda-dir}.
  72. @item --with-cuda-lib-dir=@var{dir}
  73. Search for CUDA libraries under @var{dir}, which should notably contain
  74. the CUDA shared libraries---e.g., @file{libcuda.so}. This defaults to
  75. @code{/lib} appended to the value given to @code{--with-cuda-dir}.
  76. @item --disable-cuda-memcpy-peer
  77. Explicitly disable peer transfers when using CUDA 4.0.
  78. @item --enable-maxopencldev=@var{count}
  79. Use at most @var{count} OpenCL devices. This information is then
  80. available as the @code{STARPU_MAXOPENCLDEVS} macro.
  81. @item --disable-opencl
  82. Disable the use of OpenCL, even if the SDK is detected.
  83. @item --with-opencl-dir=@var{prefix}
  84. Search for an OpenCL implementation under @var{prefix}, which should
  85. notably contain @file{include/CL/cl.h} (or @file{include/OpenCL/cl.h} on
  86. Mac OS).
  87. @item --with-opencl-include-dir=@var{dir}
  88. Search for OpenCL headers under @var{dir}, which should notably contain
  89. @file{CL/cl.h} (or @file{OpenCL/cl.h} on Mac OS). This defaults to
  90. @code{/include} appended to the value given to @code{--with-opencl-dir}.
  91. @item --with-opencl-lib-dir=@var{dir}
  92. Search for an OpenCL library under @var{dir}, which should notably
  93. contain the OpenCL shared libraries---e.g. @file{libOpenCL.so}. This defaults to
  94. @code{/lib} appended to the value given to @code{--with-opencl-dir}.
  95. @item --enable-maximplementations=@var{count}
  96. Allow for at most @var{count} codelet implementations for the same
  97. target device. This information is then available as the
  98. @code{STARPU_MAXIMPLEMENTATIONS} macro.
  99. @item --disable-asynchronous-copy
  100. Disable asynchronous copies between CPU and GPU devices.
  101. The AMD implementation of OpenCL is known to
  102. fail when copying data asynchronously. When using this implementation,
  103. it is therefore necessary to disable asynchronous data transfers.
  104. @item --disable-asynchronous-cuda-copy
  105. Disable asynchronous copies between CPU and CUDA devices.
  106. @item --disable-asynchronous-opencl-copy
  107. Disable asynchronous copies between CPU and OpenCL devices.
  108. The AMD implementation of OpenCL is known to
  109. fail when copying data asynchronously. When using this implementation,
  110. it is therefore necessary to disable asynchronous data transfers.
  111. @end table
  112. @node Extension configuration
  113. @subsection Extension configuration
  114. @table @code
  115. @item --disable-socl
  116. Disable the SOCL extension (@pxref{SOCL OpenCL Extensions}). By
  117. default, it is enabled when an OpenCL implementation is found.
  118. @item --disable-starpu-top
  119. Disable the StarPU-Top interface (@pxref{StarPU-Top}). By default, it
  120. is enabled when the required dependencies are found.
  121. @item --disable-gcc-extensions
  122. Disable the GCC plug-in (@pxref{C Extensions}). By default, it is
  123. enabled when the GCC compiler provides a plug-in support.
  124. @item --with-mpicc=@var{path}
  125. Use the @command{mpicc} compiler at @var{path}, for starpumpi
  126. (@pxref{StarPU MPI support}).
  127. @end table
  128. @node Advanced configuration
  129. @subsection Advanced configuration
  130. @table @code
  131. @item --enable-perf-debug
  132. Enable performance debugging through gprof.
  133. @item --enable-model-debug
  134. Enable performance model debugging.
  135. @item --enable-stats
  136. @c see ../../src/datawizard/datastats.c
  137. Enable gathering of memory transfer statistics.
  138. @item --enable-maxbuffers
  139. Define the maximum number of buffers that tasks will be able to take
  140. as parameters, then available as the @code{STARPU_NMAXBUFS} macro.
  141. @item --enable-allocation-cache
  142. Enable the use of a data allocation cache to avoid the cost of it with
  143. CUDA. Still experimental.
  144. @item --enable-opengl-render
  145. Enable the use of OpenGL for the rendering of some examples.
  146. @c TODO: rather default to enabled when detected
  147. @item --enable-blas-lib
  148. Specify the blas library to be used by some of the examples. The
  149. library has to be 'atlas' or 'goto'.
  150. @item --disable-starpufft
  151. Disable the build of libstarpufft, even if fftw or cuFFT is available.
  152. @item --with-magma=@var{prefix}
  153. Search for MAGMA under @var{prefix}. @var{prefix} should notably
  154. contain @file{include/magmablas.h}.
  155. @item --with-fxt=@var{prefix}
  156. Search for FxT under @var{prefix}.
  157. @url{http://savannah.nongnu.org/projects/fkt, FxT} is used to generate
  158. traces of scheduling events, which can then be rendered them using ViTE
  159. (@pxref{Off-line, off-line performance feedback}). @var{prefix} should
  160. notably contain @code{include/fxt/fxt.h}.
  161. @item --with-perf-model-dir=@var{dir}
  162. Store performance models under @var{dir}, instead of the current user's
  163. home.
  164. @item --with-goto-dir=@var{prefix}
  165. Search for GotoBLAS under @var{prefix}, which should notably contain @file{libgoto.so} or @file{libgoto2.so}.
  166. @item --with-atlas-dir=@var{prefix}
  167. Search for ATLAS under @var{prefix}, which should notably contain
  168. @file{include/cblas.h}.
  169. @item --with-mkl-cflags=@var{cflags}
  170. Use @var{cflags} to compile code that uses the MKL library.
  171. @item --with-mkl-ldflags=@var{ldflags}
  172. Use @var{ldflags} when linking code that uses the MKL library. Note
  173. that the
  174. @url{http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/,
  175. MKL website} provides a script to determine the linking flags.
  176. @item --disable-build-examples
  177. Disable the build of examples.
  178. @end table
  179. @node Execution configuration through environment variables
  180. @section Execution configuration through environment variables
  181. @menu
  182. * Workers:: Configuring workers
  183. * Scheduling:: Configuring the Scheduling engine
  184. * Extensions::
  185. * Misc:: Miscellaneous and debug
  186. @end menu
  187. @node Workers
  188. @subsection Configuring workers
  189. @table @code
  190. @item @code{STARPU_NCPU}
  191. Specify the number of CPU workers (thus not including workers dedicated to control acceleratores). Note that by default, StarPU will not allocate
  192. more CPU workers than there are physical CPUs, and that some CPUs are used to control
  193. the accelerators.
  194. @item @code{STARPU_NCUDA}
  195. Specify the number of CUDA devices that StarPU can use. If
  196. @code{STARPU_NCUDA} is lower than the number of physical devices, it is
  197. possible to select which CUDA devices should be used by the means of the
  198. @code{STARPU_WORKERS_CUDAID} environment variable. By default, StarPU will
  199. create as many CUDA workers as there are CUDA devices.
  200. @item @code{STARPU_NOPENCL}
  201. OpenCL equivalent of the @code{STARPU_NCUDA} environment variable.
  202. @item @code{STARPU_WORKERS_NOBIND}
  203. Setting it to non-zero will prevent StarPU from binding its threads to
  204. CPUs. This is for instance useful when running the testsuite in parallel.
  205. @item @code{STARPU_WORKERS_CPUID}
  206. Passing an array of integers (starting from 0) in @code{STARPU_WORKERS_CPUID}
  207. specifies on which logical CPU the different workers should be
  208. bound. For instance, if @code{STARPU_WORKERS_CPUID = "0 1 4 5"}, the first
  209. worker will be bound to logical CPU #0, the second CPU worker will be bound to
  210. logical CPU #1 and so on. Note that the logical ordering of the CPUs is either
  211. determined by the OS, or provided by the @code{hwloc} library in case it is
  212. available.
  213. Note that the first workers correspond to the CUDA workers, then come the
  214. OpenCL workers, and finally the CPU workers. For example if
  215. we have @code{STARPU_NCUDA=1}, @code{STARPU_NOPENCL=1}, @code{STARPU_NCPU=2}
  216. and @code{STARPU_WORKERS_CPUID = "0 2 1 3"}, the CUDA device will be controlled
  217. by logical CPU #0, the OpenCL device will be controlled by logical CPU #2, and
  218. the logical CPUs #1 and #3 will be used by the CPU workers.
  219. If the number of workers is larger than the array given in
  220. @code{STARPU_WORKERS_CPUID}, the workers are bound to the logical CPUs in a
  221. round-robin fashion: if @code{STARPU_WORKERS_CPUID = "0 1"}, the first and the
  222. third (resp. second and fourth) workers will be put on CPU #0 (resp. CPU #1).
  223. This variable is ignored if the @code{use_explicit_workers_bindid} flag of the
  224. @code{starpu_conf} structure passed to @code{starpu_init} is set.
  225. @item @code{STARPU_WORKERS_CUDAID}
  226. Similarly to the @code{STARPU_WORKERS_CPUID} environment variable, it is
  227. possible to select which CUDA devices should be used by StarPU. On a machine
  228. equipped with 4 GPUs, setting @code{STARPU_WORKERS_CUDAID = "1 3"} and
  229. @code{STARPU_NCUDA=2} specifies that 2 CUDA workers should be created, and that
  230. they should use CUDA devices #1 and #3 (the logical ordering of the devices is
  231. the one reported by CUDA).
  232. This variable is ignored if the @code{use_explicit_workers_cuda_gpuid} flag of
  233. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  234. @item @code{STARPU_WORKERS_OPENCLID}
  235. OpenCL equivalent of the @code{STARPU_WORKERS_CUDAID} environment variable.
  236. This variable is ignored if the @code{use_explicit_workers_opencl_gpuid} flag of
  237. the @code{starpu_conf} structure passed to @code{starpu_init} is set.
  238. @item @code{STARPU_SINGLE_COMBINED_WORKER}
  239. If set, StarPU will create several workers which won't be able to work
  240. concurrently. It will create combined workers which size goes from 1 to the
  241. total number of CPU workers in the system.
  242. @item @code{SYNTHESIZE_ARITY_COMBINED_WORKER}
  243. Let the user decide how many elements are allowed between combined workers
  244. created from hwloc information. For instance, in the case of sockets with 6
  245. cores without shared L2 caches, if @code{SYNTHESIZE_ARITY_COMBINED_WORKER} is
  246. set to 6, no combined worker will be synthesized beyond one for the socket
  247. and one per core. If it is set to 3, 3 intermediate combined workers will be
  248. synthesized, to divide the socket cores into 3 chunks of 2 cores. If it set to
  249. 2, 2 intermediate combined workers will be synthesized, to divide the the socket
  250. cores into 2 chunks of 3 cores, and then 3 additional combined workers will be
  251. synthesized, to divide the former synthesized workers into a bunch of 2 cores,
  252. and the remaining core (for which no combined worker is synthesized since there
  253. is already a normal worker for it).
  254. The default, 2, thus makes StarPU tend to building a binary trees of combined
  255. workers.
  256. @item @code{STARPU_DISABLE_ASYNCHRONOUS_COPY}
  257. Disable asynchronous copies between CPU and GPU devices.
  258. The AMD implementation of OpenCL is known to
  259. fail when copying data asynchronously. When using this implementation,
  260. it is therefore necessary to disable asynchronous data transfers.
  261. @item @code{STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY}
  262. Disable asynchronous copies between CPU and CUDA devices.
  263. @item @code{STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY}
  264. Disable asynchronous copies between CPU and OpenCL devices.
  265. The AMD implementation of OpenCL is known to
  266. fail when copying data asynchronously. When using this implementation,
  267. it is therefore necessary to disable asynchronous data transfers.
  268. @item @code{STARPU_DISABLE_CUDA_GPU_GPU_DIRECT}
  269. Disable direct CUDA transfers from GPU to GPU, and let CUDA copy through RAM
  270. instead. This permits to test the performance effect of GPU-Direct.
  271. @end table
  272. @node Scheduling
  273. @subsection Configuring the Scheduling engine
  274. @table @code
  275. @item @code{STARPU_SCHED}
  276. Choose between the different scheduling policies proposed by StarPU: work
  277. random, stealing, greedy, with performance models, etc.
  278. Use @code{STARPU_SCHED=help} to get the list of available schedulers.
  279. @item @code{STARPU_CALIBRATE}
  280. If this variable is set to 1, the performance models are calibrated during
  281. the execution. If it is set to 2, the previous values are dropped to restart
  282. calibration from scratch. Setting this variable to 0 disable calibration, this
  283. is the default behaviour.
  284. Note: this currently only applies to @code{dm}, @code{dmda} and @code{heft} scheduling policies.
  285. @item @code{STARPU_BUS_CALIBRATE}
  286. If this variable is set to 1, the bus is recalibrated during intialization.
  287. @item @code{STARPU_PREFETCH}
  288. @anchor{STARPU_PREFETCH}
  289. This variable indicates whether data prefetching should be enabled (0 means
  290. that it is disabled). If prefetching is enabled, when a task is scheduled to be
  291. executed e.g. on a GPU, StarPU will request an asynchronous transfer in
  292. advance, so that data is already present on the GPU when the task starts. As a
  293. result, computation and data transfers are overlapped.
  294. Note that prefetching is enabled by default in StarPU.
  295. @item @code{STARPU_SCHED_ALPHA}
  296. To estimate the cost of a task StarPU takes into account the estimated
  297. computation time (obtained thanks to performance models). The alpha factor is
  298. the coefficient to be applied to it before adding it to the communication part.
  299. @item @code{STARPU_SCHED_BETA}
  300. To estimate the cost of a task StarPU takes into account the estimated
  301. data transfer time (obtained thanks to performance models). The beta factor is
  302. the coefficient to be applied to it before adding it to the computation part.
  303. @end table
  304. @node Extensions
  305. @subsection Extensions
  306. @table @code
  307. @item @code{SOCL_OCL_LIB_OPENCL}
  308. THE SOCL test suite is only run when the environment variable
  309. @code{SOCL_OCL_LIB_OPENCL} is defined. It should contain the location
  310. of the libOpenCL.so file of the OCL ICD implementation.
  311. @item @code{STARPU_COMM_STATS}
  312. @anchor{STARPU_COMM_STATS}
  313. Communication statistics for starpumpi (@pxref{StarPU MPI support})
  314. will be enabled when the environment variable @code{STARPU_COMM_STATS}
  315. is defined to an value other than 0.
  316. @item @code{STARPU_MPI_CACHE}
  317. @anchor{STARPU_MPI_CACHE}
  318. Communication cache for starpumpi (@pxref{StarPU MPI support}) will be
  319. disabled when the environment variable @code{STARPU_MPI_CACHE} is set
  320. to 0. It is enabled by default or for any other values of the variable
  321. @code{STARPU_MPI_CACHE}.
  322. @end table
  323. @node Misc
  324. @subsection Miscellaneous and debug
  325. @table @code
  326. @item @code{STARPU_SILENT}
  327. This variable allows to disable verbose mode at runtime when StarPU
  328. has been configured with the option @code{--enable-verbose}. It also
  329. disables the display of StarPU information and warning messages.
  330. @item @code{STARPU_LOGFILENAME}
  331. This variable specifies in which file the debugging output should be saved to.
  332. @item @code{STARPU_FXT_PREFIX}
  333. This variable specifies in which directory to save the trace generated if FxT is enabled. It needs to have a trailing '/' character.
  334. @item @code{STARPU_LIMIT_GPU_MEM}
  335. This variable specifies the maximum number of megabytes that should be
  336. available to the application on each GPUs. In case this value is smaller than
  337. the size of the memory of a GPU, StarPU pre-allocates a buffer to waste memory
  338. on the device. This variable is intended to be used for experimental purposes
  339. as it emulates devices that have a limited amount of memory.
  340. @item @code{STARPU_GENERATE_TRACE}
  341. When set to 1, this variable indicates that StarPU should automatically
  342. generate a Paje trace when starpu_shutdown is called.
  343. @end table