210_check_list_performance.doxy 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. /*! \page CheckListWhenPerformanceAreNotThere Check List When Performance Are Not There
  17. TODO: improve!
  18. To achieve good
  19. performance, we give below a list of features which should be checked.
  20. For a start, you can use \ref OfflinePerformanceTools to get a Gantt chart which
  21. will show roughly where time is spent, and focus correspondingly.
  22. \section CheckTaskSize Check Task Size
  23. Make sure that your tasks are not too small, as the StarPU runtime overhead
  24. is not completely zero. As explained in \ref TaskSizeOverhead, you can
  25. run the script \c tasks_size_overhead.sh to get an
  26. idea of the scalability of tasks depending on their duration (in µs), on your
  27. own system.
  28. Typically, 10µs-ish tasks are definitely too small, the CUDA overhead itself is
  29. much bigger than this.
  30. 1ms-ish tasks may be a good start, but will not necessarily scale to many dozens
  31. of cores, so it's better to try to get 10ms-ish tasks.
  32. Tasks durations can easily be observed when performance models are defined (see
  33. \ref PerformanceModelExample) by using the tools <c>starpu_perfmodel_plot</c> or
  34. <c>starpu_perfmodel_display</c> (see \ref PerformanceOfCodelets)
  35. When using parallel tasks, the problem is even worse since StarPU has to
  36. synchronize the tasks execution.
  37. \section ConfigurationImprovePerformance Configuration Which May Improve Performance
  38. The \c configure option \ref enable-fast "--enable-fast" disables all
  39. assertions. This makes StarPU more performant for really small tasks by
  40. disabling all sanity checks. Only use this for measurements and production, not for development, since this will drop all basic checks.
  41. \section DataRelatedFeaturesToImprovePerformance Data Related Features Which May Improve Performance
  42. link to \ref DataManagement
  43. link to \ref DataPrefetch
  44. \section TaskRelatedFeaturesToImprovePerformance Task Related Features Which May Improve Performance
  45. link to \ref TaskGranularity
  46. link to \ref TaskSubmission
  47. link to \ref TaskPriorities
  48. \section SchedulingRelatedFeaturesToImprovePerformance Scheduling Related Features Which May Improve Performance
  49. link to \ref TaskSchedulingPolicy
  50. link to \ref TaskDistributionVsDataTransfer
  51. link to \ref Energy-basedScheduling
  52. link to \ref StaticScheduling
  53. \section CUDA-specificOptimizations CUDA-specific Optimizations
  54. For proper overlapping of asynchronous GPU data transfers, data has to be pinned
  55. by CUDA. Data allocated with starpu_malloc() is always properly pinned. If the
  56. application registers to StarPU some data which has not been allocated with
  57. starpu_malloc(), starpu_memory_pin() should be called to pin the data memory.
  58. Due to CUDA limitations, StarPU will have a hard time overlapping its own
  59. communications and the codelet computations if the application does not use a
  60. dedicated CUDA stream for its computations instead of the default stream,
  61. which synchronizes all operations of the GPU. The function
  62. starpu_cuda_get_local_stream() returns a stream which can be used by all CUDA codelet
  63. operations to avoid this issue. For instance:
  64. \code{.c}
  65. func <<<grid,block,0,starpu_cuda_get_local_stream()>>> (foo, bar);
  66. cudaStreamSynchronize(starpu_cuda_get_local_stream());
  67. \endcode
  68. as well as the use of \c cudaMemcpyAsync(), etc. for each CUDA operation one needs
  69. to use a version that takes the a stream parameter.
  70. Unfortunately, some CUDA libraries do not have stream variants of
  71. kernels. This will seriously lower the potential for overlapping.
  72. If some CUDA calls are made without specifying this local stream,
  73. synchronization needs to be explicited with cudaDeviceSynchronize() around these
  74. calls, to make sure that they get properly synchronized with the calls using
  75. the local stream. Notably, \c cudaMemcpy() and \c cudaMemset() are actually
  76. asynchronous and need such explicit synchronization! Use \c cudaMemcpyAsync() and
  77. \c cudaMemsetAsync() instead.
  78. Calling starpu_cublas_init() will ensure StarPU to properly call the
  79. CUBLAS library functions. Some libraries like Magma may however change the current stream of CUBLAS v1,
  80. one then has to call <c>cublasSetKernelStream(</c>starpu_cuda_get_local_stream()<c>)</c> at
  81. the beginning of the codelet to make sure that CUBLAS is really using the proper
  82. stream. When using CUBLAS v2, starpu_cublas_get_local_handle() can be called to queue CUBLAS
  83. kernels with the proper configuration.
  84. Similarly, calling starpu_cusparse_init() makes StarPU create CUSPARSE handles
  85. on each CUDA device, starpu_cusparse_get_local_handle() can then be used to
  86. queue CUSPARSE kernels with the proper configuration.
  87. If the kernel can be made to only use this local stream or other self-allocated
  88. streams, i.e. the whole kernel submission can be made asynchronous, then
  89. one should enable asynchronous execution of the kernel. This means setting
  90. the flag ::STARPU_CUDA_ASYNC in the corresponding field starpu_codelet::cuda_flags, and dropping the
  91. <c>cudaStreamSynchronize()</c> call at the end of the <c>cuda_func</c> function, so that it
  92. returns immediately after having queued the kernel to the local stream. That way, StarPU will be
  93. able to submit and complete data transfers while kernels are executing, instead of only at each
  94. kernel submission. The kernel just has to make sure that StarPU can use the
  95. local stream to synchronize with the kernel startup and completion.
  96. If the kernel uses its own non-default stream, one can synchronize this stream
  97. with the StarPU-provided stream this way:
  98. \code{.c}
  99. cudaEvent_t event;
  100. call_kernel_with_its_own_stream()
  101. cudaEventCreateWithFlags(&event, cudaEventDisableTiming);
  102. cudaEventRecord(event, get_kernel_stream());
  103. cudaStreamWaitEvent(starpu_cuda_get_local_stream(), event, 0);
  104. cudaEventDestroy(event);
  105. \endcode
  106. This code makes the StarPU-provided stream wait for a new event, which will be
  107. triggered by the completion of the kernel.
  108. Using the flag ::STARPU_CUDA_ASYNC also permits to enable concurrent kernel
  109. execution, on cards which support it (Kepler and later, notably). This is
  110. enabled by setting the environment variable \ref STARPU_NWORKER_PER_CUDA to the
  111. number of kernels to be executed concurrently. This is useful when kernels are
  112. small and do not feed the whole GPU with threads to run.
  113. Concerning memory allocation, you should really not use \c cudaMalloc()/ \c cudaFree()
  114. within the kernel, since \c cudaFree() introduces a awfully lot of synchronizations
  115. within CUDA itself. You should instead add a parameter to the codelet with the
  116. ::STARPU_SCRATCH mode access. You can then pass to the task a handle registered
  117. with the desired size but with the \c NULL pointer, the handle can even be
  118. shared between tasks, StarPU will allocate per-task data on the fly before task
  119. execution, and reuse the allocated data between tasks.
  120. See <c>examples/pi/pi_redux.c</c> for an example of use.
  121. \section OpenCL-specificOptimizations OpenCL-specific Optimizations
  122. If the kernel can be made to only use the StarPU-provided command queue or other self-allocated
  123. queues, i.e. the whole kernel submission can be made asynchronous, then
  124. one should enable asynchronous execution of the kernel. This means setting
  125. the flag ::STARPU_OPENCL_ASYNC in the corresponding field starpu_codelet::opencl_flags and dropping the
  126. <c>clFinish()</c> and starpu_opencl_collect_stats() calls at the end of the kernel, so
  127. that it returns immediately after having queued the kernel to the provided queue.
  128. That way, StarPU will be able to submit and complete data transfers while kernels are executing, instead of
  129. only at each kernel submission. The kernel just has to make sure
  130. that StarPU can use the command queue it has provided to synchronize with the
  131. kernel startup and completion.
  132. \section DetectionStuckConditions Detecting Stuck Conditions
  133. It may happen that for some reason, StarPU does not make progress for a long
  134. period of time. Reason are sometimes due to contention inside StarPU, but
  135. sometimes this is due to external reasons, such as a stuck MPI or CUDA
  136. driver.
  137. <c>export STARPU_WATCHDOG_TIMEOUT=10000</c> (\ref STARPU_WATCHDOG_TIMEOUT)
  138. allows to make StarPU print an error message whenever StarPU does not terminate
  139. any task for 10ms, but lets the application continue normally. In addition to that,
  140. <c>export STARPU_WATCHDOG_CRASH=1</c> (\ref STARPU_WATCHDOG_CRASH)
  141. raises <c>SIGABRT</c> in this condition, thus allowing to catch the
  142. situation in \c gdb.
  143. It can also be useful to type <c>handle SIGABRT nopass</c> in <c>gdb</c> to be able to let
  144. the process continue, after inspecting the state of the process.
  145. \section HowToLimitMemoryPerNode How to Limit Memory Used By StarPU And Cache Buffer Allocations
  146. By default, StarPU makes sure to use at most 90% of the memory of GPU devices,
  147. moving data in and out of the device as appropriate, as well as using
  148. prefetch and writeback optimizations.
  149. The environment variables \ref STARPU_LIMIT_CUDA_MEM, \ref STARPU_LIMIT_CUDA_devid_MEM,
  150. \ref STARPU_LIMIT_OPENCL_MEM, and \ref STARPU_LIMIT_OPENCL_devid_MEM
  151. can be used to control how much (in MiB) of the GPU device memory
  152. should be used at most by StarPU (the default value is to use 90% of the
  153. available memory).
  154. By default, the usage of the main memory is not limited, as the
  155. default mechanims do not provide means to evict main memory when it
  156. gets too tight. This also means that by default StarPU will not cache buffer
  157. allocations in main memory, since it does not know how much of the
  158. system memory it can afford.
  159. The environment variable \ref STARPU_LIMIT_CPU_MEM can be used to
  160. specify how much (in MiB) of the main memory should be used at most by
  161. StarPU for buffer allocations. This way, StarPU will be able to
  162. cache buffer allocations (which can be a real benefit if a lot of buffers are
  163. involved, or if allocation fragmentation can become a problem), and when using
  164. \ref OutOfCore, StarPU will know when it should evict data out to the disk.
  165. It should be noted that by default only buffer allocations automatically
  166. done by StarPU are accounted here, i.e. allocations performed through
  167. starpu_malloc_on_node() which are used by the data interfaces
  168. (matrix, vector, etc.). This does not include allocations performed by
  169. the application through e.g. malloc(). It does not include allocations
  170. performed through starpu_malloc() either, only allocations
  171. performed explicitly with the \ref STARPU_MALLOC_COUNT flag, i.e. by calling
  172. \code{.c}
  173. starpu_malloc_flags(STARPU_MALLOC_COUNT)
  174. \endcode
  175. are taken into account. If the
  176. application wants to make StarPU aware of its own allocations, so that StarPU
  177. knows precisely how much data is allocated, and thus when to evict allocation
  178. caches or data out to the disk, starpu_memory_allocate() can be used to
  179. specify an amount of memory to be accounted for. starpu_memory_deallocate()
  180. can be used to account freed memory back. Those can for instance be used by data
  181. interfaces with dynamic data buffers: instead of using starpu_malloc_on_node(),
  182. they would dynamically allocate data with \c malloc()/\c realloc(), and notify StarPU of
  183. the delta by calling starpu_memory_allocate() and starpu_memory_deallocate().
  184. starpu_memory_get_total() and starpu_memory_get_available()
  185. can be used to get an estimation of how much memory is available.
  186. starpu_memory_wait_available() can also be used to block until an
  187. amount of memory becomes available, but it may be preferrable to call
  188. \code{.c}
  189. starpu_memory_allocate(STARPU_MEMORY_WAIT)
  190. \endcode
  191. to reserve this amount immediately.
  192. \section HowToReduceTheMemoryFootprintOfInternalDataStructures How To Reduce The Memory Footprint Of Internal Data Structures
  193. It is possible to reduce the memory footprint of the task and data internal
  194. structures of StarPU by describing the shape of your machine and/or your
  195. application when calling \c configure.
  196. To reduce the memory footprint of the data internal structures of StarPU, one
  197. can set the
  198. \ref enable-maxcpus "--enable-maxcpus",
  199. \ref enable-maxnumanodes "--enable-maxnumanodes",
  200. \ref enable-maxcudadev "--enable-maxcudadev",
  201. \ref enable-maxopencldev "--enable-maxopencldev" and
  202. \ref enable-maxnodes "--enable-maxnodes"
  203. \c configure parameters to give StarPU
  204. the architecture of the machine it will run on, thus tuning the size of the
  205. structures to the machine.
  206. To reduce the memory footprint of the task internal structures of StarPU, one
  207. can set the \ref enable-maxbuffers "--enable-maxbuffers" \c configure parameter to
  208. give StarPU the maximum number of buffers that a task can use during an
  209. execution. For example, in the Cholesky factorization (dense linear algebra
  210. application), the GEMM task uses up to 3 buffers, so it is possible to set the
  211. maximum number of task buffers to 3 to run a Cholesky factorization on StarPU.
  212. The size of the various structures of StarPU can be printed by
  213. <c>tests/microbenchs/display_structures_size</c>.
  214. It is also often useless to submit *all* the tasks at the same time.
  215. Task submission can be blocked when a reasonable given number of
  216. tasks have been submitted, by setting the environment variables \ref
  217. STARPU_LIMIT_MIN_SUBMITTED_TASKS and \ref STARPU_LIMIT_MAX_SUBMITTED_TASKS.
  218. <c>
  219. export STARPU_LIMIT_MAX_SUBMITTED_TASKS=10000
  220. export STARPU_LIMIT_MIN_SUBMITTED_TASKS=9000
  221. </c>
  222. will make StarPU block submission when 10000 tasks are submitted, and unblock
  223. submission when only 9000 tasks are still submitted, i.e. 1000 tasks have
  224. completed among the 10000 which were submitted when submission was blocked. Of
  225. course this may reduce parallelism if the threshold is set too low. The precise
  226. balance depends on the application task graph.
  227. An idea of how much memory is used for tasks and data handles can be obtained by
  228. setting the environment variable \ref STARPU_MAX_MEMORY_USE to <c>1</c>.
  229. \section HowtoReuseMemory How To Reuse Memory
  230. When your application needs to allocate more data than the available amount of
  231. memory usable by StarPU (given by starpu_memory_get_available()), the
  232. allocation cache system can reuse data buffers used by previously executed
  233. tasks. For this system to work with MPI tasks, you need to submit tasks progressively instead
  234. of as soon as possible, because in the case of MPI receives, the allocation cache check for reusing data
  235. buffers will be done at submission time, not at execution time.
  236. There is two options to control the task submission flow. The first one is by
  237. controlling the number of submitted tasks during the whole execution. This can
  238. be done whether by setting the environment variables
  239. \ref STARPU_LIMIT_MAX_SUBMITTED_TASKS and \ref STARPU_LIMIT_MIN_SUBMITTED_TASKS to
  240. tell StarPU when to stop submitting tasks and when to wake up and submit tasks
  241. again, or by explicitely calling starpu_task_wait_for_n_submitted() in
  242. your application code for finest grain control (for example, between two
  243. iterations of a submission loop).
  244. The second option is to control the memory size of the allocation cache. This
  245. can be done in the application by using jointly
  246. starpu_memory_get_available() and starpu_memory_wait_available() to submit
  247. tasks only when there is enough memory space to allocate the data needed by the
  248. task, i.e when enough data are available for reuse in the allocation cache.
  249. \section PerformanceModelCalibration Performance Model Calibration
  250. Most schedulers are based on an estimation of codelet duration on each kind
  251. of processing unit. For this to be possible, the application programmer needs
  252. to configure a performance model for the codelets of the application (see
  253. \ref PerformanceModelExample for instance). History-based performance models
  254. use on-line calibration. StarPU will automatically calibrate codelets
  255. which have never been calibrated yet, and save the result in
  256. <c>$STARPU_HOME/.starpu/sampling/codelets</c>.
  257. The models are indexed by machine name.
  258. By default, StarPU stores separate performance models according to the hostname
  259. of the system. To avoid having to calibrate performance models for each node
  260. of a homogeneous cluster for instance, the model can be shared by using
  261. <c>export STARPU_HOSTNAME=some_global_name</c> (\ref STARPU_HOSTNAME), where
  262. <c>some_global_name</c> is the name of the cluster for instance, which thus
  263. overrides the hostname of the system.
  264. By default, StarPU stores separate performance models for each GPU. To avoid
  265. having to calibrate performance models for each GPU of a homogeneous set of GPU
  266. devices for instance, the model can be shared by setting
  267. <c>export STARPU_PERF_MODEL_HOMOGENEOUS_CUDA=1</c> (\ref STARPU_PERF_MODEL_HOMOGENEOUS_CUDA),
  268. <c>export STARPU_PERF_MODEL_HOMOGENEOUS_OPENCL=1</c> (\ref STARPU_PERF_MODEL_HOMOGENEOUS_OPENCL),
  269. <c>export STARPU_PERF_MODEL_HOMOGENEOUS_MIC=1</c> (\ref STARPU_PERF_MODEL_HOMOGENEOUS_MIC),
  270. <c>export STARPU_PERF_MODEL_HOMOGENEOUS_MPI_MS=1</c> (\ref STARPU_PERF_MODEL_HOMOGENEOUS_MPI_MS) depending on your GPU device type.
  271. To force continuing calibration,
  272. use <c>export STARPU_CALIBRATE=1</c> (\ref STARPU_CALIBRATE). This may be necessary if your application
  273. has not-so-stable performance. StarPU will force calibration (and thus ignore
  274. the current result) until 10 (<c>_STARPU_CALIBRATION_MINIMUM</c>) measurements have been
  275. made on each architecture, to avoid bad scheduling decisions just because the
  276. first measurements were not so good. Details on the current performance model status
  277. can be obtained with the tool <c>starpu_perfmodel_display</c>: the
  278. option <c>-l</c> lists the available performance models, and the
  279. option <c>-s</c> allows to choose the performance model to be
  280. displayed. The result looks like:
  281. \verbatim
  282. $ starpu_perfmodel_display -s starpu_slu_lu_model_11
  283. performance model for cpu_impl_0
  284. # hash size flops mean dev n
  285. 914f3bef 1048576 0.000000e+00 2.503577e+04 1.982465e+02 8
  286. 3e921964 65536 0.000000e+00 5.527003e+02 1.848114e+01 7
  287. e5a07e31 4096 0.000000e+00 1.717457e+01 5.190038e+00 14
  288. ...
  289. \endverbatim
  290. which shows that for the LU 11 kernel with a 1MiB matrix, the average
  291. execution time on CPUs was about 25ms, with a 0.2ms standard deviation, over
  292. 8 samples. It is a good idea to check this before doing actual performance
  293. measurements.
  294. A graph can be drawn by using the tool <c>starpu_perfmodel_plot</c>:
  295. \verbatim
  296. $ starpu_perfmodel_plot -s starpu_slu_lu_model_11
  297. 4096 16384 65536 262144 1048576 4194304
  298. $ gnuplot starpu_starpu_slu_lu_model_11.gp
  299. $ gv starpu_starpu_slu_lu_model_11.eps
  300. \endverbatim
  301. \image html starpu_starpu_slu_lu_model_11.png
  302. \image latex starpu_starpu_slu_lu_model_11.eps "" width=\textwidth
  303. If a kernel source code was modified (e.g. performance improvement), the
  304. calibration information is stale and should be dropped, to re-calibrate from
  305. start. This can be done by using <c>export STARPU_CALIBRATE=2</c> (\ref STARPU_CALIBRATE).
  306. Note: history-based performance models get calibrated
  307. only if a performance-model-based scheduler is chosen.
  308. The history-based performance models can also be explicitly filled by the
  309. application without execution, if e.g. the application already has a series of
  310. measurements. This can be done by using starpu_perfmodel_update_history(),
  311. for instance:
  312. \code{.c}
  313. static struct starpu_perfmodel perf_model =
  314. {
  315. .type = STARPU_HISTORY_BASED,
  316. .symbol = "my_perfmodel",
  317. };
  318. struct starpu_codelet cl =
  319. {
  320. .cuda_funcs = { cuda_func1, cuda_func2 },
  321. .nbuffers = 1,
  322. .modes = {STARPU_W},
  323. .model = &perf_model
  324. };
  325. void feed(void)
  326. {
  327. struct my_measure *measure;
  328. struct starpu_task task;
  329. starpu_task_init(&task);
  330. task.cl = &cl;
  331. for (measure = &measures[0]; measure < measures[last]; measure++)
  332. {
  333. starpu_data_handle_t handle;
  334. starpu_vector_data_register(&handle, -1, 0, measure->size, sizeof(float));
  335. task.handles[0] = handle;
  336. starpu_perfmodel_update_history(&perf_model, &task, STARPU_CUDA_DEFAULT + measure->cudadev, 0, measure->implementation, measure->time);
  337. starpu_task_clean(&task);
  338. starpu_data_unregister(handle);
  339. }
  340. }
  341. \endcode
  342. Measurement has to be provided in milliseconds for the completion time models,
  343. and in Joules for the energy consumption models.
  344. \section Profiling Profiling
  345. A quick view of how many tasks each worker has executed can be obtained by setting
  346. <c>export STARPU_WORKER_STATS=1</c> (\ref STARPU_WORKER_STATS). This is a convenient way to check that
  347. execution did happen on accelerators, without penalizing performance with
  348. the profiling overhead. \ref STARPU_WORKER_STATS_FILE can be defined
  349. to specify a filename in which to display statistics, by default
  350. statistics are printed on the standard error stream.
  351. A quick view of how much data transfers have been issued can be obtained by setting
  352. <c>export STARPU_BUS_STATS=1</c> (\ref STARPU_BUS_STATS). \ref
  353. STARPU_BUS_STATS_FILE can be defined to specify a filename in which to
  354. display statistics, by default statistics are printed on the standard error stream.
  355. More detailed profiling information can be enabled by using <c>export STARPU_PROFILING=1</c> (\ref STARPU_PROFILING)
  356. or by
  357. calling starpu_profiling_status_set() from the source code.
  358. Statistics on the execution can then be obtained by using <c>export
  359. STARPU_BUS_STATS=1</c> and <c>export STARPU_WORKER_STATS=1</c> .
  360. More details on performance feedback are provided in the next chapter.
  361. \section OverheadProfiling Overhead Profiling
  362. \ref OfflinePerformanceTools can already provide an idea of to what extent and
  363. which part of StarPU brings an overhead on the execution time. To get a more precise
  364. analysis of which parts of StarPU bring the most overhead, <c>gprof</c> can be used.
  365. First, recompile and reinstall StarPU with <c>gprof</c> support:
  366. \code
  367. ../configure --enable-perf-debug --disable-shared --disable-build-tests --disable-build-examples
  368. \endcode
  369. Make sure not to leave a dynamic version of StarPU in the target path: remove
  370. any remaining <c>libstarpu-*.so</c>
  371. Then relink your application with the static StarPU library, make sure that
  372. running <c>ldd</c> on your application does not mention any \c libstarpu
  373. (i.e. it's really statically-linked).
  374. \code
  375. gcc test.c -o test $(pkg-config --cflags starpu-1.3) $(pkg-config --libs starpu-1.3)
  376. \endcode
  377. Now you can run your application, this will create a file
  378. <c>gmon.out</c> in the current directory, it can be processed by
  379. running <c>gprof</c> on your application:
  380. \code
  381. gprof ./test
  382. \endcode
  383. This will dump an analysis of the time spent in StarPU functions.
  384. */