starpu.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. * Copyright (C) 2021 Federal University of Rio Grande do Sul (UFRGS)
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __STARPU_H__
  18. #define __STARPU_H__
  19. #include <stdlib.h>
  20. #ifndef _MSC_VER
  21. #include <stdint.h>
  22. #else
  23. #include <windows.h>
  24. typedef unsigned char uint8_t;
  25. typedef unsigned short uint16_t;
  26. typedef unsigned int uint32_t;
  27. typedef unsigned long long uint64_t;
  28. typedef UINT_PTR uintptr_t;
  29. typedef char int8_t;
  30. typedef short int16_t;
  31. typedef int int32_t;
  32. typedef long long int64_t;
  33. typedef INT_PTR intptr_t;
  34. #endif
  35. #include <starpu_config.h>
  36. #ifdef STARPU_HAVE_WINDOWS
  37. #include <windows.h>
  38. #endif
  39. #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
  40. #include <starpu_opencl.h>
  41. #endif
  42. #include <starpu_thread.h>
  43. #include <starpu_thread_util.h>
  44. #include <starpu_util.h>
  45. #include <starpu_data.h>
  46. #include <starpu_helper.h>
  47. #include <starpu_disk.h>
  48. #include <starpu_data_interfaces.h>
  49. #include <starpu_data_filters.h>
  50. #include <starpu_stdlib.h>
  51. #include <starpu_task_bundle.h>
  52. #include <starpu_task_dep.h>
  53. #include <starpu_task.h>
  54. #include <starpu_worker.h>
  55. #include <starpu_perfmodel.h>
  56. #include <starpu_worker.h>
  57. #ifndef BUILDING_STARPU
  58. #include <starpu_task_list.h>
  59. #endif
  60. #include <starpu_task_util.h>
  61. #include <starpu_scheduler.h>
  62. #include <starpu_sched_ctx.h>
  63. #include <starpu_expert.h>
  64. #include <starpu_rand.h>
  65. #include <starpu_cuda.h>
  66. #include <starpu_cublas.h>
  67. #include <starpu_cusparse.h>
  68. #include <starpu_bound.h>
  69. #include <starpu_hash.h>
  70. #include <starpu_profiling.h>
  71. #include <starpu_fxt.h>
  72. #include <starpu_driver.h>
  73. #include <starpu_tree.h>
  74. #include <starpu_openmp.h>
  75. #include <starpu_simgrid_wrap.h>
  76. #include <starpu_bitmap.h>
  77. #include <starpu_clusters.h>
  78. #include <starpu_perf_monitoring.h>
  79. #include <starpu_perf_steering.h>
  80. #include <starpu_fpga.h>
  81. #ifdef __cplusplus
  82. extern "C"
  83. {
  84. #endif
  85. /**
  86. @defgroup API_Initialization_and_Termination Initialization and Termination
  87. @{
  88. */
  89. /**
  90. Structure passed to the starpu_init() function to configure StarPU.
  91. It has to be initialized with starpu_conf_init(). When the default
  92. value is used, StarPU automatically selects the number of
  93. processing units and takes the default scheduling policy. The
  94. environment variables overwrite the equivalent parameters unless
  95. starpu_conf::precedence_over_environment_variables is set.
  96. */
  97. struct starpu_conf
  98. {
  99. /**
  100. @private
  101. Will be initialized by starpu_conf_init(). Should not be
  102. set by hand.
  103. */
  104. int magic;
  105. /**
  106. @private
  107. Tell starpu_init() if MPI will be initialized later.
  108. */
  109. int will_use_mpi;
  110. /**
  111. Name of the scheduling policy. This can also be specified
  112. with the environment variable \ref STARPU_SCHED. (default =
  113. <c>NULL</c>).
  114. */
  115. const char *sched_policy_name;
  116. /**
  117. Definition of the scheduling policy. This field is ignored
  118. if starpu_conf::sched_policy_name is set.
  119. (default = <c>NULL</c>)
  120. */
  121. struct starpu_sched_policy *sched_policy;
  122. /**
  123. Callback function that can later be used by the scheduler.
  124. The scheduler can retrieve this function by calling
  125. starpu_sched_ctx_get_sched_policy_callback()
  126. */
  127. void (*sched_policy_callback)(unsigned);
  128. /**
  129. For all parameters specified in this structure that can
  130. also be set with environment variables, by default,
  131. StarPU chooses the value of the environment variable
  132. against the value set in starpu_conf. Setting the parameter
  133. starpu_conf::precedence_over_environment_variables to 1 allows to give precedence
  134. to the value set in the structure over the environment
  135. variable.
  136. */
  137. int precedence_over_environment_variables;
  138. /**
  139. Number of CPU cores that StarPU can use. This can also be
  140. specified with the environment variable \ref STARPU_NCPU.
  141. (default = \c -1)
  142. */
  143. int ncpus;
  144. /**
  145. Number of CPU cores to that StarPU should leave aside. They can then
  146. be used by application threads, by calling starpu_get_next_bindid() to
  147. get their ID, and starpu_bind_thread_on() to bind the current thread to them.
  148. */
  149. int reserve_ncpus;
  150. /**
  151. Number of CUDA devices that StarPU can use. This can also
  152. be specified with the environment variable \ref
  153. STARPU_NCUDA.
  154. (default = \c -1)
  155. */
  156. int ncuda;
  157. /**
  158. Number of OpenCL devices that StarPU can use. This can also
  159. be specified with the environment variable \ref
  160. STARPU_NOPENCL.
  161. (default = \c -1)
  162. */
  163. int nopencl;
  164. /**
  165. Number of FPGA devices that StarPU can use. This can also
  166. be specified with the environment variable \ref
  167. STARPU_NFPGA.
  168. (default = -1)
  169. */
  170. int nfpga;
  171. /**
  172. Number of MPI Master Slave devices that StarPU can use.
  173. This can also be specified with the environment variable
  174. \ref STARPU_NMPI_MS.
  175. (default = \c -1)
  176. */
  177. int nmpi_ms;
  178. /**
  179. If this flag is set, the starpu_conf::workers_bindid array
  180. indicates where the different workers are bound, otherwise
  181. StarPU automatically selects where to bind the different
  182. workers. This can also be specified with the environment
  183. variable \ref STARPU_WORKERS_CPUID.
  184. (default = \c 0)
  185. */
  186. unsigned use_explicit_workers_bindid;
  187. /**
  188. If the starpu_conf::use_explicit_workers_bindid flag is
  189. set, this array indicates where to bind the different
  190. workers. The i-th entry of the starpu_conf::workers_bindid
  191. indicates the logical identifier of the processor which
  192. should execute the i-th worker. Note that the logical
  193. ordering of the CPUs is either determined by the OS, or
  194. provided by the \c hwloc library in case it is available.
  195. */
  196. unsigned workers_bindid[STARPU_NMAXWORKERS];
  197. /**
  198. If this flag is set, the CUDA workers will be attached to
  199. the CUDA devices specified in the
  200. starpu_conf::workers_cuda_gpuid array. Otherwise, StarPU
  201. affects the CUDA devices in a round-robin fashion. This can
  202. also be specified with the environment variable \ref
  203. STARPU_WORKERS_CUDAID.
  204. (default = \c 0)
  205. */
  206. unsigned use_explicit_workers_cuda_gpuid;
  207. /**
  208. If the starpu_conf::use_explicit_workers_cuda_gpuid flag is
  209. set, this array contains the logical identifiers of the
  210. CUDA devices (as used by \c cudaGetDevice()).
  211. */
  212. unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
  213. /**
  214. If this flag is set, the OpenCL workers will be attached to
  215. the OpenCL devices specified in the
  216. starpu_conf::workers_opencl_gpuid array. Otherwise, StarPU
  217. affects the OpenCL devices in a round-robin fashion. This
  218. can also be specified with the environment variable \ref
  219. STARPU_WORKERS_OPENCLID.
  220. (default = \c 0)
  221. */
  222. unsigned use_explicit_workers_opencl_gpuid;
  223. /**
  224. If the starpu_conf::use_explicit_workers_opencl_gpuid flag
  225. is set, this array contains the logical identifiers of the
  226. OpenCL devices to be used.
  227. */
  228. unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
  229. /**
  230. If this flag is set, the FPGA workers will be attached to
  231. the FPGA devices specified in the
  232. starpu_conf::workers_fpga_deviceid array. Otherwise, StarPU
  233. affects the FPGA devices in a round-robin fashion. This
  234. can also be specified with the environment variable \ref
  235. STARPU_WORKERS_FPGAID.
  236. (default = 0)
  237. */
  238. unsigned use_explicit_workers_fpga_deviceid;
  239. /**
  240. If the starpu_conf::use_explicit_workers_fpga_deviceid flag
  241. is set, this array contains the logical identifiers of the
  242. FPGA devices to be used.
  243. */
  244. unsigned workers_fpga_deviceid[STARPU_NMAXWORKERS];
  245. #ifdef STARPU_USE_FPGA
  246. /**
  247. This allows to specify the Maxeler file(s) to be loaded on FPGAs.
  248. This is an array of starpu_max_load, the last of which shall have
  249. file set to NULL. In order to use all available devices,
  250. starpu_max_load::engine_id_pattern can be set to "*", but only the
  251. last non-NULL entry can be set so.
  252. If this is not set, it is assumed that the basic static SLiC
  253. interface is used.
  254. */
  255. struct starpu_max_load *fpga_load;
  256. #else
  257. void *fpga_load;
  258. #endif
  259. /**
  260. If this flag is set, the MPI Master Slave workers will be
  261. attached to the MPI Master Slave devices specified in the
  262. array starpu_conf::workers_mpi_ms_deviceid. Otherwise,
  263. StarPU affects the MPI Master Slave devices in a
  264. round-robin fashion.
  265. (default = \c 0)
  266. */
  267. unsigned use_explicit_workers_mpi_ms_deviceid;
  268. /**
  269. If the flag
  270. starpu_conf::use_explicit_workers_mpi_ms_deviceid is set,
  271. the array contains the logical identifiers of the MPI
  272. Master Slave devices to be used.
  273. */
  274. unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS];
  275. /**
  276. If this flag is set, StarPU will recalibrate the bus. If
  277. this value is equal to -1, the default value is used. This
  278. can also be specified with the environment variable \ref
  279. STARPU_BUS_CALIBRATE.
  280. (default = \c 0)
  281. */
  282. int bus_calibrate;
  283. /**
  284. If this flag is set, StarPU will calibrate the performance
  285. models when executing tasks. If this value is equal to -1,
  286. the default value is used. If the value is equal to 1, it
  287. will force continuing calibration. If the value is equal to
  288. 2, the existing performance models will be overwritten.
  289. This can also be specified with the environment variable
  290. \ref STARPU_CALIBRATE.
  291. (default = \c 0)
  292. */
  293. int calibrate;
  294. /**
  295. By default, StarPU executes parallel tasks concurrently.
  296. Some parallel libraries (e.g. most OpenMP implementations)
  297. however do not support concurrent calls to parallel code.
  298. In such case, setting this flag makes StarPU only start one
  299. parallel task at a time (but other CPU and GPU tasks are
  300. not affected and can be run concurrently). The parallel
  301. task scheduler will however still try varying combined
  302. worker sizes to look for the most efficient ones.
  303. This can also be specified with the environment variable
  304. \ref STARPU_SINGLE_COMBINED_WORKER.
  305. (default = \c 0)
  306. */
  307. int single_combined_worker;
  308. /**
  309. This flag should be set to 1 to disable asynchronous copies
  310. between CPUs and all accelerators.
  311. The AMD implementation of OpenCL is known to fail when
  312. copying data asynchronously. When using this
  313. implementation, it is therefore necessary to disable
  314. asynchronous data transfers.
  315. This can also be specified with the environment variable
  316. \ref STARPU_DISABLE_ASYNCHRONOUS_COPY.
  317. This can also be specified at compilation time by giving to
  318. the configure script the option \ref
  319. disable-asynchronous-copy "--disable-asynchronous-copy".
  320. (default = \c 0)
  321. */
  322. int disable_asynchronous_copy;
  323. /**
  324. This flag should be set to 1 to disable asynchronous copies
  325. between CPUs and CUDA accelerators.
  326. This can also be specified with the environment variable
  327. \ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.
  328. This can also be specified at compilation time by giving to
  329. the configure script the option \ref
  330. disable-asynchronous-cuda-copy
  331. "--disable-asynchronous-cuda-copy".
  332. (default = \c 0)
  333. */
  334. int disable_asynchronous_cuda_copy;
  335. /**
  336. This flag should be set to 1 to disable asynchronous copies
  337. between CPUs and OpenCL accelerators.
  338. The AMD implementation of OpenCL is known to fail when
  339. copying data asynchronously. When using this
  340. implementation, it is therefore necessary to disable
  341. asynchronous data transfers.
  342. This can also be specified with the environment variable
  343. \ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.
  344. This can also be specified at compilation time by giving to
  345. the configure script the option \ref
  346. disable-asynchronous-opencl-copy
  347. "--disable-asynchronous-opencl-copy".
  348. (default = \c 0)
  349. */
  350. int disable_asynchronous_opencl_copy;
  351. /**
  352. This flag should be set to 1 to disable asynchronous copies
  353. between CPUs and MPI Master Slave devices.
  354. This can also be specified with the environment variable
  355. \ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.
  356. This can also be specified at compilation time by giving to
  357. the configure script the option \ref
  358. disable-asynchronous-mpi-master-slave-copy
  359. "--disable-asynchronous-mpi-master-slave-copy".
  360. (default = \c 0).
  361. */
  362. int disable_asynchronous_mpi_ms_copy;
  363. /**
  364. This flag should be set to 1 to disable asynchronous copies
  365. between CPUs and FPGA devices.
  366. This can also be specified with the environment variable
  367. \ref STARPU_DISABLE_ASYNCHRONOUS_FPGA_COPY.
  368. This can also be specified at compilation time by giving to
  369. the configure script the option \ref
  370. disable-asynchronous-fpga-copy
  371. "--disable-asynchronous-fpga-copy".
  372. (default = 0).
  373. */
  374. int disable_asynchronous_fpga_copy;
  375. /**
  376. Enable CUDA/OpenGL interoperation on these CUDA devices.
  377. This can be set to an array of CUDA device identifiers for
  378. which \c cudaGLSetGLDevice() should be called instead of \c
  379. cudaSetDevice(). Its size is specified by the
  380. starpu_conf::n_cuda_opengl_interoperability field below
  381. (default = <c>NULL</c>)
  382. */
  383. unsigned *cuda_opengl_interoperability;
  384. /**
  385. Size of the array starpu_conf::cuda_opengl_interoperability
  386. */
  387. unsigned n_cuda_opengl_interoperability;
  388. /**
  389. Array of drivers that should not be launched by StarPU. The
  390. application will run in one of its own threads.
  391. (default = <c>NULL</c>)
  392. */
  393. struct starpu_driver *not_launched_drivers;
  394. /**
  395. The number of StarPU drivers that should not be launched by
  396. StarPU, i.e number of elements of the array
  397. starpu_conf::not_launched_drivers.
  398. (default = \c 0)
  399. */
  400. unsigned n_not_launched_drivers;
  401. /**
  402. Specify the buffer size used for FxT tracing. Starting from
  403. FxT version 0.2.12, the buffer will automatically be
  404. flushed when it fills in, but it may still be interesting
  405. to specify a bigger value to avoid any flushing (which
  406. would disturb the trace).
  407. */
  408. uint64_t trace_buffer_size;
  409. /**
  410. Set the mininum priority used by priorities-aware
  411. schedulers.
  412. This also can be specified with the environment variable \ref
  413. STARPU_MIN_PRIO
  414. */
  415. int global_sched_ctx_min_priority;
  416. /**
  417. Set the maxinum priority used by priorities-aware
  418. schedulers.
  419. This also can be specified with the environment variable \ref
  420. STARPU_MAX_PRIO
  421. */
  422. int global_sched_ctx_max_priority;
  423. #ifdef STARPU_WORKER_CALLBACKS
  424. void (*callback_worker_going_to_sleep)(unsigned workerid);
  425. void (*callback_worker_waking_up)(unsigned workerid);
  426. #endif
  427. /**
  428. Specify if StarPU should catch \c SIGINT, \c SIGSEGV and \c SIGTRAP
  429. signals to make sure final actions (e.g dumping FxT trace
  430. files) are done even though the application has crashed. By
  431. default (value = \c 1), signals are catched. It should be
  432. disabled on systems which already catch these signals for
  433. their own needs (e.g JVM)
  434. This can also be specified with the environment variable
  435. \ref STARPU_CATCH_SIGNALS.
  436. */
  437. int catch_signals;
  438. /**
  439. Specify whether StarPU should automatically start to collect
  440. performance counters after initialization
  441. */
  442. unsigned start_perf_counter_collection;
  443. /**
  444. Minimum spinning backoff of drivers (default = \c 1)
  445. */
  446. unsigned driver_spinning_backoff_min;
  447. /**
  448. Maximum spinning backoff of drivers. (default = \c 32)
  449. */
  450. unsigned driver_spinning_backoff_max;
  451. /**
  452. Specify if CUDA workers should do only fast allocations
  453. when running the datawizard progress of
  454. other memory nodes. This will pass the interval value
  455. _STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.
  456. Default value is 0, allowing CUDA workers to do slow
  457. allocations.
  458. This can also be specified with the environment variable
  459. \ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES.
  460. */
  461. int cuda_only_fast_alloc_other_memnodes;
  462. };
  463. /**
  464. Initialize the \p conf structure with the default values. In case
  465. some configuration parameters are already specified through
  466. environment variables, starpu_conf_init() initializes the fields of
  467. \p conf according to the environment variables.
  468. For instance if \ref STARPU_CALIBRATE is set, its value is put in
  469. the field starpu_conf::calibrate of \p conf.
  470. Upon successful completion, this function returns 0. Otherwise,
  471. <c>-EINVAL</c> indicates that the argument was <c>NULL</c>.
  472. */
  473. int starpu_conf_init(struct starpu_conf *conf);
  474. /**
  475. Set fields of \p conf so that no worker is enabled, i.e. set
  476. starpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.
  477. This allows to portably enable only a given type of worker:
  478. <br/>
  479. <c>
  480. starpu_conf_noworker(&conf);<br/>
  481. conf.ncpus = -1;
  482. </c>
  483. */
  484. int starpu_conf_noworker(struct starpu_conf *conf);
  485. /**
  486. StarPU initialization method, must be called prior to any other
  487. StarPU call. It is possible to specify StarPU’s configuration (e.g.
  488. scheduling policy, number of cores, ...) by passing a
  489. non-<c>NULL</c> \p conf. Default configuration is used if \p conf
  490. is <c>NULL</c>. Upon successful completion, this function returns
  491. 0. Otherwise, <c>-ENODEV</c> indicates that no worker was available
  492. (and thus StarPU was not initialized).
  493. */
  494. int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
  495. /**
  496. Similar to starpu_init(), but also take the \p argc and \p argv as
  497. defined by the application, which is necessary when running in
  498. Simgrid mode or MPI Master Slave mode.
  499. Do not call starpu_init() and starpu_initialize() in the same
  500. program.
  501. */
  502. int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
  503. /**
  504. Return 1 if StarPU is already initialized.
  505. */
  506. int starpu_is_initialized(void);
  507. /**
  508. Wait for starpu_init() call to finish.
  509. */
  510. void starpu_wait_initialized(void);
  511. /**
  512. StarPU termination method, must be called at the end of the
  513. application: statistics and other post-mortem debugging information
  514. are not guaranteed to be available until this method has been
  515. called.
  516. */
  517. void starpu_shutdown(void);
  518. /**
  519. Suspend the processing of new tasks by workers. It can be used in a
  520. program where StarPU is used during only a part of the execution.
  521. Without this call, the workers continue to poll for new tasks in a
  522. tight loop, wasting CPU time. The symmetric call to starpu_resume()
  523. should be used to unfreeze the workers.
  524. */
  525. void starpu_pause(void);
  526. /**
  527. Symmetrical call to starpu_pause(), used to resume the workers
  528. polling for new tasks.
  529. */
  530. void starpu_resume(void);
  531. /**
  532. Return !0 if task processing by workers is currently paused, 0 otherwise.
  533. */
  534. int starpu_is_paused(void);
  535. /**
  536. Value to be passed to starpu_get_next_bindid() and
  537. starpu_bind_thread_on() when binding a thread which will
  538. significantly eat CPU time, and should thus have its own dedicated
  539. CPU.
  540. */
  541. #define STARPU_THREAD_ACTIVE (1 << 0)
  542. /**
  543. Return a PU binding ID which can be used to bind threads with
  544. starpu_bind_thread_on(). \p flags can be set to
  545. ::STARPU_THREAD_ACTIVE or 0. When \p npreferred is set to non-zero,
  546. \p preferred is an array of size \p npreferred in which a
  547. preference of PU binding IDs can be set. By default StarPU will
  548. return the first PU available for binding.
  549. */
  550. unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred);
  551. /**
  552. Bind the calling thread on the given \p cpuid (which should have
  553. been obtained with starpu_get_next_bindid()).
  554. Return -1 if a thread was already bound to this PU (but binding
  555. will still have been done, and a warning will have been printed),
  556. so the caller can tell the user how to avoid the issue.
  557. \p name should be set to a unique string so that different calls
  558. with the same name for the same \p cpuid does not produce a warning.
  559. */
  560. int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name);
  561. /**
  562. Print a description of the topology on \p f.
  563. */
  564. void starpu_topology_print(FILE *f);
  565. /**
  566. Return 1 if asynchronous data transfers between CPU and
  567. accelerators are disabled.
  568. */
  569. int starpu_asynchronous_copy_disabled(void);
  570. /**
  571. Return 1 if asynchronous data transfers between CPU and CUDA
  572. accelerators are disabled.
  573. */
  574. int starpu_asynchronous_cuda_copy_disabled(void);
  575. /**
  576. Return 1 if asynchronous data transfers between CPU and OpenCL
  577. accelerators are disabled.
  578. */
  579. int starpu_asynchronous_opencl_copy_disabled(void);
  580. /**
  581. Return 1 if asynchronous data transfers between CPU and FPGA
  582. devices are disabled.
  583. */
  584. int starpu_asynchronous_fpga_copy_disabled(void);
  585. /**
  586. Return 1 if asynchronous data transfers between CPU and MPI Slave
  587. devices are disabled.
  588. */
  589. int starpu_asynchronous_mpi_ms_copy_disabled(void);
  590. /**
  591. Call starpu_profiling_bus_helper_display_summary() and
  592. starpu_profiling_worker_helper_display_summary()
  593. */
  594. void starpu_display_stats(void);
  595. /** @} */
  596. /**
  597. @defgroup API_Versioning Versioning
  598. @{
  599. */
  600. /**
  601. Return as 3 integers the version of StarPU used when running the
  602. application.
  603. */
  604. void starpu_get_version(int *major, int *minor, int *release);
  605. /** @} */
  606. #ifdef __cplusplus
  607. }
  608. #endif
  609. #include "starpu_deprecated_api.h"
  610. #endif /* __STARPU_H__ */