codelet_and_tasks.doxy 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 CNRS
  5. * Copyright (C) 2011, 2012, 2017 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Codelet_And_Tasks Codelet And Tasks
  9. \brief This section describes the interface to manipulate codelets and tasks.
  10. \enum starpu_codelet_type
  11. \ingroup API_Codelet_And_Tasks
  12. Describes the type of parallel task. See \ref ParallelTasks for details.
  13. \var starpu_codelet_type::STARPU_SEQ
  14. (default) for classical sequential tasks.
  15. \var starpu_codelet_type::STARPU_SPMD
  16. for a parallel task whose threads are handled by StarPU, the code
  17. has to use starpu_combined_worker_get_size() and
  18. starpu_combined_worker_get_rank() to distribute the work.
  19. \var starpu_codelet_type::STARPU_FORKJOIN
  20. for a parallel task whose threads are started by the codelet
  21. function, which has to use starpu_combined_worker_get_size() to
  22. determine how many threads should be started.
  23. \enum starpu_task_status
  24. \ingroup API_Codelet_And_Tasks
  25. Task status
  26. \var starpu_task_status::STARPU_TASK_INVALID
  27. The task has just been initialized.
  28. \var starpu_task_status::STARPU_TASK_BLOCKED
  29. The task has just been submitted, and its dependencies has not
  30. been checked yet.
  31. \var starpu_task_status::STARPU_TASK_READY
  32. The task is ready for execution.
  33. \var starpu_task_status::STARPU_TASK_RUNNING
  34. The task is running on some worker.
  35. \var starpu_task_status::STARPU_TASK_FINISHED
  36. The task is finished executing.
  37. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_TAG
  38. The task is waiting for a tag.
  39. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_TASK
  40. The task is waiting for a task.
  41. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_DATA
  42. The task is waiting for some data.
  43. \var starpu_task_status::STARPU_TASK_STOPPED
  44. The task is stopped.
  45. \def STARPU_NOWHERE
  46. \ingroup API_Codelet_And_Tasks
  47. This macro is used when setting the field starpu_codelet::where
  48. to specify that the codelet has no computation part, and thus does not need
  49. to be scheduled, and data does not need to be actually loaded. This is thus
  50. essentially used for synchronization tasks.
  51. \def STARPU_CPU
  52. \ingroup API_Codelet_And_Tasks
  53. This macro is used when setting the field starpu_codelet::where (or starpu_task::where)
  54. to specify the codelet (or the task) may be executed on a CPU processing unit.
  55. \def STARPU_CUDA
  56. \ingroup API_Codelet_And_Tasks
  57. This macro is used when setting the field starpu_codelet::where (or starpu_task::where)
  58. to specify the codelet (or the task) may be executed on a CUDA processing unit.
  59. \def STARPU_OPENCL
  60. \ingroup API_Codelet_And_Tasks
  61. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  62. specify the codelet (or the task) may be executed on a OpenCL processing unit.
  63. \def STARPU_MIC
  64. \ingroup API_Codelet_And_Tasks
  65. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  66. specify the codelet (or the task) may be executed on a MIC processing unit.
  67. \def STARPU_MPI_MS
  68. \ingroup API_Codelet_And_Tasks
  69. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  70. specify the codelet (or the task) may be executed on a MPI Slave processing unit.
  71. \def STARPU_SCC
  72. \ingroup API_Codelet_And_Tasks
  73. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  74. specify the codelet (or the task) may be executed on an SCC processing unit.
  75. \def STARPU_MAIN_RAM
  76. \ingroup API_Codelet_And_Tasks
  77. This macro is used when the RAM memory node is specified.
  78. \def STARPU_MULTIPLE_CPU_IMPLEMENTATIONS
  79. \deprecated
  80. \ingroup API_Codelet_And_Tasks
  81. Setting the field starpu_codelet::cpu_func with this macro
  82. indicates the codelet will have several implementations. The use of
  83. this macro is deprecated. One should always only define the field
  84. starpu_codelet::cpu_funcs.
  85. \def STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS
  86. \deprecated
  87. \ingroup API_Codelet_And_Tasks
  88. Setting the field starpu_codelet::cuda_func with this macro
  89. indicates the codelet will have several implementations. The use of
  90. this macro is deprecated. One should always only define the field
  91. starpu_codelet::cuda_funcs.
  92. \def STARPU_MULTIPLE_OPENCL_IMPLEMENTATIONS
  93. \deprecated
  94. \ingroup API_Codelet_And_Tasks
  95. Setting the field starpu_codelet::opencl_func with
  96. this macro indicates the codelet will have several implementations.
  97. The use of this macro is deprecated. One should always only define the
  98. field starpu_codelet::opencl_funcs.
  99. \def STARPU_NMAXBUFS
  100. \ingroup API_Codelet_And_Tasks
  101. Defines the maximum number of buffers that tasks will be able to take
  102. as parameters. The default value is 8, it can be changed by using the
  103. configure option \ref enable-maxbuffers "--enable-maxbuffers".
  104. \def STARPU_VARIABLE_NBUFFERS
  105. \ingroup API_Codelet_And_Tasks
  106. Value to set in starpu_codelet::nbuffers to specify that the codelet can accept
  107. a variable number of buffers, specified in starpu_task::nbuffers.
  108. \def STARPU_CUDA_ASYNC
  109. \ingroup API_Codelet_And_Tasks
  110. Value to be set in starpu_codelet::cuda_flags to allow asynchronous CUDA kernel execution.
  111. \def STARPU_OPENCL_ASYNC
  112. \ingroup API_Codelet_And_Tasks
  113. Value to be set in starpu_codelet::opencl_flags to allow asynchronous OpenCL kernel execution.
  114. \def STARPU_CODELET_SIMGRID_EXECUTE
  115. \ingroup API_Codelet_And_Tasks
  116. Value to be set in starpu_codelet::flags to execute the codelet functions even in simgrid mode.
  117. \def STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT
  118. \ingroup API_Codelet_And_Tasks
  119. Value to be set in starpu_codelet::flags to execute the codelet functions even in simgrid mode,
  120. and later inject the measured timing inside the simulation.
  121. \typedef starpu_cpu_func_t
  122. \ingroup API_Codelet_And_Tasks
  123. CPU implementation of a codelet.
  124. \typedef starpu_cuda_func_t
  125. \ingroup API_Codelet_And_Tasks
  126. CUDA implementation of a codelet.
  127. \typedef starpu_opencl_func_t
  128. \ingroup API_Codelet_And_Tasks
  129. OpenCL implementation of a codelet.
  130. \typedef starpu_mic_func_t
  131. \ingroup API_Codelet_And_Tasks
  132. MIC implementation of a codelet.
  133. \typedef starpu_mpi_ms_func_t
  134. \ingroup API_Codelet_And_Tasks
  135. MPI Master Slave implementation of a codelet.
  136. \typedef starpu_scc_func_t
  137. \ingroup API_Codelet_And_Tasks
  138. SCC implementation of a codelet.
  139. \typedef starpu_mic_kernel_t
  140. \ingroup API_Codelet_And_Tasks
  141. MIC kernel for a codelet
  142. \typedef starpu_mpi_ms_kernel_t
  143. \ingroup API_Codelet_And_Tasks
  144. MPI Master Slave kernel for a codelet
  145. \typedef starpu_scc_kernel_t
  146. \ingroup API_Codelet_And_Tasks
  147. SCC kernel for a codelet
  148. \struct starpu_codelet
  149. \ingroup API_Codelet_And_Tasks
  150. The codelet structure describes a kernel that is possibly
  151. implemented on various targets. For compatibility, make sure to
  152. initialize the whole structure to zero, either by using explicit
  153. memset, or the function starpu_codelet_init(), or by letting the
  154. compiler implicitly do it in e.g. static storage case.
  155. \var uint32_t starpu_codelet::where
  156. Optional field to indicate which types of processing units are
  157. able to execute the codelet. The different values ::STARPU_CPU,
  158. ::STARPU_CUDA, ::STARPU_OPENCL can be combined to specify on which
  159. types of processing units the codelet can be executed.
  160. ::STARPU_CPU|::STARPU_CUDA for instance indicates that the codelet
  161. is implemented for both CPU cores and CUDA devices while
  162. ::STARPU_OPENCL indicates that it is only available on OpenCL
  163. devices. If the field is unset, its value will be automatically
  164. set based on the availability of the XXX_funcs fields defined
  165. below. It can also be set to ::STARPU_NOWHERE to specify that no
  166. computation has to be actually done.
  167. \var int (*starpu_codelet::can_execute)(unsigned workerid, struct starpu_task *task, unsigned nimpl)
  168. Define a function which should return 1 if the worker designated
  169. by \p workerid can execute the \p nimpl -th implementation of \p
  170. task, 0 otherwise.
  171. \var enum starpu_codelet_type starpu_codelet::type
  172. Optional field to specify the type of the codelet. The default is
  173. ::STARPU_SEQ, i.e. usual sequential implementation. Other values
  174. (::STARPU_SPMD or ::STARPU_FORKJOIN declare that a parallel
  175. implementation is also available. See \ref ParallelTasks for
  176. details.
  177. \var int starpu_codelet::max_parallelism
  178. Optional field. If a parallel implementation is available, this
  179. denotes the maximum combined worker size that StarPU will use to
  180. execute parallel tasks for this codelet.
  181. \var starpu_cpu_func_t starpu_codelet::cpu_func
  182. \deprecated
  183. Optional field which has been made deprecated. One should use
  184. instead the field starpu_codelet::cpu_funcs.
  185. \var starpu_cuda_func_t starpu_codelet::cuda_func
  186. \deprecated
  187. Optional field which has been made deprecated. One should use
  188. instead the starpu_codelet::cuda_funcs field.
  189. \var starpu_opencl_func_t starpu_codelet::opencl_func
  190. \deprecated
  191. Optional field which has been made deprecated. One should use
  192. instead the starpu_codelet::opencl_funcs field.
  193. \var starpu_cpu_func_t starpu_codelet::cpu_funcs[STARPU_MAXIMPLEMENTATIONS]
  194. Optional array of function pointers to the CPU implementations of
  195. the codelet. The functions prototype must be:
  196. \code{.c}
  197. void cpu_func(void *buffers[], void *cl_arg)
  198. \endcode
  199. The first argument being the array of data managed by the data
  200. management library, and the second argument is a pointer to the
  201. argument passed from the field starpu_task::cl_arg. If the field
  202. starpu_codelet::where is set, then the field
  203. starpu_codelet::cpu_funcs is ignored if ::STARPU_CPU does not
  204. appear in the field starpu_codelet::where, it must be
  205. non-<c>NULL</c> otherwise.
  206. \var char *starpu_codelet::cpu_funcs_name[STARPU_MAXIMPLEMENTATIONS]
  207. Optional array of strings which provide the name of the CPU
  208. functions referenced in the array starpu_codelet::cpu_funcs. This
  209. can be used when running on MIC devices or the SCC platform, for
  210. StarPU to simply look up the MIC function implementation through
  211. its name.
  212. \var starpu_cuda_func_t starpu_codelet::cuda_funcs[STARPU_MAXIMPLEMENTATIONS]
  213. Optional array of function pointers to the CUDA implementations of
  214. the codelet. The functions must be host-functions written in the
  215. CUDA runtime API. Their prototype must be:
  216. \code{.c}
  217. void cuda_func(void *buffers[], void *cl_arg)
  218. \endcode
  219. If the field starpu_codelet::where is set, then the field
  220. starpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does not
  221. appear in the field starpu_codelet::where, it must be
  222. non-<c>NULL</c> otherwise.
  223. \var char starpu_codelet::cuda_flags[STARPU_MAXIMPLEMENTATIONS]
  224. Optional array of flags for CUDA execution. They specify some
  225. semantic details about CUDA kernel execution, such as asynchronous
  226. execution.
  227. \var starpu_opencl_func_t starpu_codelet::opencl_funcs[STARPU_MAXIMPLEMENTATIONS]
  228. Optional array of function pointers to the OpenCL implementations
  229. of the codelet. The functions prototype must be:
  230. \code{.c}
  231. void opencl_func(void *buffers[], void *cl_arg)
  232. \endcode
  233. If the field starpu_codelet::where field is set, then the field
  234. starpu_codelet::opencl_funcs is ignored if ::STARPU_OPENCL does
  235. not appear in the field starpu_codelet::where, it must be
  236. non-<c>NULL</c> otherwise.
  237. \var char starpu_codelet::opencl_flags[STARPU_MAXIMPLEMENTATIONS]
  238. Optional array of flags for OpenCL execution. They specify some
  239. semantic details about OpenCL kernel execution, such as
  240. asynchronous execution.
  241. \var starpu_mic_func_t starpu_codelet::mic_funcs[STARPU_MAXIMPLEMENTATIONS]
  242. Optional array of function pointers to a function which returns
  243. the MIC implementation of the codelet. The functions prototype
  244. must be:
  245. \code{.c}
  246. starpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)
  247. \endcode
  248. If the field starpu_codelet::where is set, then the field
  249. starpu_codelet::mic_funcs is ignored if ::STARPU_MIC does not
  250. appear in the field starpu_codelet::where. It can be <c>NULL</c>
  251. if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>, in which
  252. case StarPU will simply make a symbol lookup to get the
  253. implementation.
  254. \var starpu_mpi_ms_func_t starpu_codelet::mpi_ms_funcs[STARPU_MAXIMPLEMENTATIONS]
  255. Optional array of function pointers to a function which returns
  256. the MPI Master Slave implementation of the codelet. The functions
  257. prototype must be:
  258. \code{.c}
  259. starpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)
  260. \endcode
  261. If the field starpu_codelet::where is set, then the field
  262. starpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS does
  263. not appear in the field starpu_codelet::where. It can be
  264. <c>NULL</c> if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>,
  265. in which case StarPU will simply make a symbol lookup to get the
  266. implementation.
  267. \var starpu_scc_func_t starpu_codelet::scc_funcs[STARPU_MAXIMPLEMENTATIONS]
  268. Optional array of function pointers to a function which returns
  269. the SCC implementation of the codelet. The functions prototype
  270. must be:
  271. \code{.c}
  272. starpu_scc_kernel_t scc_func(struct starpu_codelet *cl, unsigned nimpl)
  273. \endcode
  274. If the field starpu_codelet::where is set, then the field
  275. starpu_codelet::scc_funcs is ignored if ::STARPU_SCC does not
  276. appear in the field starpu_codelet::where. It can be <c>NULL</c>
  277. if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>, in which
  278. case StarPU will simply make a symbol lookup to get the
  279. implementation.
  280. \var int starpu_codelet::nbuffers
  281. Specify the number of arguments taken by the codelet. These
  282. arguments are managed by the DSM and are accessed from the <c>void
  283. *buffers[]</c> array. The constant argument passed with the field
  284. starpu_task::cl_arg is not counted in this number. This value
  285. should not be above \ref STARPU_NMAXBUFS. It may be set to \ref
  286. STARPU_VARIABLE_NBUFFERS to specify that the number of buffers and
  287. their access modes will be set in starpu_task::nbuffers and
  288. starpu_task::modes or starpu_task::dyn_modes, which thus permits
  289. to define codelets with a varying number of data.
  290. \var enum starpu_data_access_mode starpu_codelet::modes[STARPU_NMAXBUFS]
  291. Is an array of ::starpu_data_access_mode. It describes the
  292. required access modes to the data neeeded by the codelet (e.g.
  293. ::STARPU_RW). The number of entries in this array must be
  294. specified in the field starpu_codelet::nbuffers, and should not
  295. exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can be
  296. set with the configure option
  297. \ref enable-maxbuffers "--enable-maxbuffers".
  298. \var enum starpu_data_access_mode *starpu_codelet::dyn_modes
  299. Is an array of ::starpu_data_access_mode. It describes the
  300. required access modes to the data needed by the codelet (e.g.
  301. ::STARPU_RW). The number of entries in this array must be
  302. specified in the field starpu_codelet::nbuffers. This field should
  303. be used for codelets having a number of datas greater than
  304. \ref STARPU_NMAXBUFS (see \ref SettingManyDataHandlesForATask).
  305. When defining a codelet, one should either define this field or
  306. the field starpu_codelet::modes defined above.
  307. \var unsigned starpu_codelet::specific_nodes
  308. Default value is 0. If this flag is set, StarPU will not
  309. systematically send all data to the memory node where the task will
  310. be executing, it will read the starpu_codelet::nodes or
  311. starpu_codelet::dyn_nodes array to determine, for each data,
  312. whether to send it on the memory node where the task will be
  313. executing (-1), or on a specific node (!= -1).
  314. \var int starpu_codelet::nodes[STARPU_NMAXBUFS]
  315. Optional field. When starpu_codelet::specific_nodes is 1, this
  316. specifies the memory nodes where each data should be sent to for
  317. task execution. The number of entries in this array is
  318. starpu_codelet::nbuffers, and should not exceed \ref STARPU_NMAXBUFS.
  319. \var int *starpu_codelet::dyn_nodes
  320. Optional field. When starpu_codelet::specific_nodes is 1, this
  321. specifies the memory nodes where each data should be sent to for
  322. task execution. The number of entries in this array is
  323. starpu_codelet::nbuffers. This field should be used for codelets
  324. having a number of datas greater than \ref STARPU_NMAXBUFS
  325. (see \ref SettingManyDataHandlesForATask). When defining a
  326. codelet, one should either define this field or the field
  327. starpu_codelet::nodes defined above.
  328. \var struct starpu_perfmodel *starpu_codelet::model
  329. Optional pointer to the task duration performance model associated
  330. to this codelet. This optional field is ignored when set to
  331. <c>NULL</c> or when its field starpu_perfmodel::symbol is not set.
  332. \var struct starpu_perfmodel *starpu_codelet::energy_model
  333. Optional pointer to the task energy consumption performance model
  334. associated to this codelet. This optional field is ignored when
  335. set to <c>NULL</c> or when its field starpu_perfmodel::symbol is
  336. not set. In the case of parallel codelets, this has to account for
  337. all processing units involved in the parallel execution.
  338. \var unsigned long starpu_codelet::per_worker_stats[STARPU_NMAXWORKERS]
  339. Optional array for statistics collected at runtime: this is filled
  340. by StarPU and should not be accessed directly, but for example by
  341. calling the function starpu_codelet_display_stats() (See
  342. starpu_codelet_display_stats() for details).
  343. \var const char *starpu_codelet::name
  344. Optional name of the codelet. This can be useful for debugging
  345. purposes.
  346. \var const char *starpu_codelet::flags
  347. Various flags for the codelet.
  348. \fn void starpu_codelet_init(struct starpu_codelet *cl)
  349. \ingroup API_Codelet_And_Tasks
  350. Initialize \p cl with default values. Codelets should
  351. preferably be initialized statically as shown in
  352. \ref DefiningACodelet. However such a initialisation is not always
  353. possible, e.g. when using C++.
  354. \struct starpu_data_descr
  355. \ingroup API_Codelet_And_Tasks
  356. This type is used to describe a data handle along with an access mode.
  357. \var starpu_data_handle_t starpu_data_descr::handle
  358. describes a data
  359. \var enum starpu_data_access_mode starpu_data_descr::mode
  360. describes its access mode
  361. \struct starpu_task
  362. \ingroup API_Codelet_And_Tasks
  363. The structure describes a task that can be offloaded on the
  364. various processing units managed by StarPU. It instantiates a codelet.
  365. It can either be allocated dynamically with the function
  366. starpu_task_create(), or declared statically. In the latter case, the
  367. programmer has to zero the structure starpu_task and to fill the
  368. different fields properly. The indicated default values correspond to
  369. the configuration of a task allocated with starpu_task_create().
  370. \var const char *starpu_task::name
  371. Optional name of the task. This can be useful for debugging
  372. purposes.
  373. \var struct starpu_codelet *starpu_task::cl
  374. Is a pointer to the corresponding structure starpu_codelet. This
  375. describes where the kernel should be executed, and supplies the
  376. appropriate implementations. When set to <c>NULL</c>, no code is
  377. executed during the tasks, such empty tasks can be useful for
  378. synchronization purposes.
  379. This field has been made deprecated. One should use instead the
  380. field starpu_task::handles to specify the data handles accessed by
  381. the task. The access modes are now defined in the field
  382. starpu_codelet::modes.
  383. \var uint32_t starpu_task::where
  384. When set, specifies where the task is allowed to be executed.
  385. When unset, it takes the value of starpu_codelet::where.
  386. \var int starpu_task::nbuffers
  387. Specifies the number of buffers. This is only used when
  388. starpu_codelet::nbuffers is \ref STARPU_VARIABLE_NBUFFERS.
  389. \var starpu_data_handle_t starpu_task::handles[STARPU_NMAXBUFS]
  390. Is an array of ::starpu_data_handle_t. It specifies the handles to
  391. the different pieces of data accessed by the task. The number of
  392. entries in this array must be specified in the field
  393. starpu_codelet::nbuffers, and should not exceed
  394. \ref STARPU_NMAXBUFS. If unsufficient, this value can be set with
  395. the configure option \ref enable-maxbuffers "--enable-maxbuffers".
  396. \var starpu_data_handle_t *starpu_task::dyn_handles
  397. Is an array of ::starpu_data_handle_t. It specifies the handles to
  398. the different pieces of data accessed by the task. The number of
  399. entries in this array must be specified in the field
  400. starpu_codelet::nbuffers. This field should be used for tasks
  401. having a number of datas greater than \ref STARPU_NMAXBUFS (see
  402. \ref SettingManyDataHandlesForATask).
  403. When defining a task, one should either define this field or the
  404. field starpu_task::handles defined above.
  405. \var void *starpu_task::interfaces[STARPU_NMAXBUFS]
  406. The actual data pointers to the memory node where execution will
  407. happen, managed by the DSM.
  408. \var void **starpu_task::dyn_interfaces
  409. The actual data pointers to the memory node where execution will
  410. happen, managed by the DSM. Is used when the field
  411. starpu_task::dyn_handles is defined.
  412. \var enum starpu_data_access_mode starpu_task::modes[STARPU_NMAXBUFS]
  413. Is used only when starpu_codelet::nbuffers is
  414. \ref STARPU_VARIABLE_NBUFFERS.
  415. It is an array of ::starpu_data_access_mode. It describes the
  416. required access modes to the data neeeded by the codelet (e.g.
  417. ::STARPU_RW). The number of entries in this array must be
  418. specified in the field starpu_task::nbuffers, and should not
  419. exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can be
  420. set with the configure option
  421. \ref enable-maxbuffers "--enable-maxbuffers".
  422. \var enum starpu_data_access_mode *starpu_task::dyn_modes
  423. Is used only when starpu_codelet::nbuffers is \ref
  424. STARPU_VARIABLE_NBUFFERS. It is an array of
  425. ::starpu_data_access_mode. It describes the required access modes
  426. to the data needed by the codelet (e.g. ::STARPU_RW). The number
  427. of entries in this array must be specified in the field
  428. starpu_codelet::nbuffers. This field should be used for codelets
  429. having a number of datas greater than \ref STARPU_NMAXBUFS
  430. (see \ref SettingManyDataHandlesForATask). When defining a
  431. codelet, one should either define this field or the field
  432. starpu_task::modes defined above.
  433. \var void *starpu_task::cl_arg
  434. Optional pointer which is passed to the codelet through the second
  435. argument of the codelet implementation (e.g.
  436. starpu_codelet::cpu_func or starpu_codelet::cuda_func). The
  437. default value is <c>NULL</c>. starpu_codelet_pack_args() and
  438. starpu_codelet_unpack_args() are helpers that can can be used to
  439. respectively pack and unpack data into and from it, but the
  440. application can manage it any way, the only requirement is that
  441. the size of the data must be set in starpu_task::cl_arg_size .
  442. \var size_t starpu_task::cl_arg_size
  443. Optional field. For some specific drivers, the pointer
  444. starpu_task::cl_arg cannot not be directly given to the driver
  445. function. A buffer of size starpu_task::cl_arg_size needs to be
  446. allocated on the driver. This buffer is then filled with the
  447. starpu_task::cl_arg_size bytes starting at address
  448. starpu_task::cl_arg. In this case, the argument given to the
  449. codelet is therefore not the starpu_task::cl_arg pointer, but the
  450. address of the buffer in local store (LS) instead. This field is
  451. ignored for CPU, CUDA and OpenCL codelets, where the
  452. starpu_task::cl_arg pointer is given as such.
  453. \var unsigned starpu_task::cl_arg_free
  454. Optional field. In case starpu_task::cl_arg was allocated by the
  455. application through <c>malloc()</c>, setting
  456. starpu_task::cl_arg_free to 1 makes StarPU automatically call
  457. <c>free(cl_arg)</c> when destroying the task. This saves the user
  458. from defining a callback just for that. This is mostly useful when
  459. targetting MIC or SCC, where the codelet does not execute in the
  460. same memory space as the main thread.
  461. \var void (*starpu_task::callback_func)(void *)
  462. Optional field, the default value is <c>NULL</c>. This is a
  463. function pointer of prototype <c>void (*f)(void *)</c> which
  464. specifies a possible callback. If this pointer is non-<c>NULL</c>,
  465. the callback function is executed on the host after the execution
  466. of the task. Tasks which depend on it might already be executing.
  467. The callback is passed the value contained in the
  468. starpu_task::callback_arg field. No callback is executed if the
  469. field is set to <c>NULL</c>.
  470. \var void *starpu_task::callback_arg (optional) (default: <c>NULL</c>)
  471. Optional field, the default value is <c>NULL</c>. This is the
  472. pointer passed to the callback function. This field is ignored if
  473. the field starpu_task::callback_func is set to <c>NULL</c>.
  474. \var unsigned starpu_task::callback_arg_free
  475. Optional field. In case starpu_task::callback_arg was allocated by
  476. the application through <c>malloc()</c>, setting
  477. starpu_task::callback_arg_free to 1 makes StarPU automatically
  478. call <c>free(callback_arg)</c> when destroying the task.
  479. \var void (*starpu_task::prologue_callback_func)(void *)
  480. Optional field, the default value is <c>NULL</c>. This is a
  481. function pointer of prototype <c>void (*f)(void *)</c> which
  482. specifies a possible callback.
  483. If this pointer is non-<c>NULL</c>, the callback function is
  484. executed on the host when the task becomes ready for execution,
  485. before getting scheduled. The callback is passed the value
  486. contained in the starpu_task::prologue_callback_arg field. No
  487. callback is executed if the field is set to <c>NULL</c>.
  488. \var void *starpu_task::prologue_callback_arg (optional) (default: <c>NULL</c>)
  489. Optional field, the default value is <c>NULL</c>. This is the
  490. pointer passed to the prologue callback function. This field is
  491. ignored if the field starpu_task::prologue_callback_func is set to
  492. <c>NULL</c>.
  493. \var unsigned starpu_task::prologue_callback_arg_free
  494. Optional field. In case starpu_task::prologue_callback_arg was
  495. allocated by the application through <c>malloc()</c>, setting
  496. starpu_task::prologue_callback_arg_free to 1 makes StarPU
  497. automatically call <c>free(prologue_callback_arg)</c> when
  498. destroying the task.
  499. \var void (*starpu_task::prologue_callback_pop_func)(void *)
  500. todo
  501. \var void *starpu_task::prologue_callback_pop_arg (optional) (default: <c>NULL</c>)
  502. todo
  503. \var unsigned starpu_task::prologue_callback_pop_arg_free
  504. todo
  505. \var unsigned starpu_task::use_tag
  506. Optional field, the default value is 0. If set, this flag
  507. indicates that the task should be associated with the tag
  508. contained in the starpu_task::tag_id field. Tag allow the
  509. application to synchronize with the task and to express task
  510. dependencies easily.
  511. \var starpu_tag_t starpu_task::tag_id
  512. This optional field contains the tag associated to the task if the
  513. field starpu_task::use_tag is set, it is ignored otherwise.
  514. \var unsigned starpu_task::sequential_consistency
  515. If this flag is set (which is the default), sequential consistency
  516. is enforced for the data parameters of this task for which
  517. sequential consistency is enabled. Clearing this flag permits to
  518. disable sequential consistency for this task, even if data have it
  519. enabled.
  520. \var unsigned starpu_task::synchronous
  521. If this flag is set, the function starpu_task_submit() is blocking
  522. and returns only when the task has been executed (or if no worker
  523. is able to process the task). Otherwise, starpu_task_submit()
  524. returns immediately.
  525. \var int starpu_task::priority
  526. Optional field, the default value is ::STARPU_DEFAULT_PRIO. This
  527. field indicates a level of priority for the task. This is an
  528. integer value that must be set between the return values of the
  529. function starpu_sched_get_min_priority() for the least important
  530. tasks, and that of the function starpu_sched_get_max_priority()
  531. for the most important tasks (included). The ::STARPU_MIN_PRIO and
  532. ::STARPU_MAX_PRIO macros are provided for convenience and
  533. respectively returns the value of starpu_sched_get_min_priority()
  534. and starpu_sched_get_max_priority(). Default priority is
  535. ::STARPU_DEFAULT_PRIO, which is always defined as 0 in order to
  536. allow static task initialization. Scheduling strategies that take
  537. priorities into account can use this parameter to take better
  538. scheduling decisions, but the scheduling policy may also ignore
  539. it.
  540. \var unsigned starpu_task::execute_on_a_specific_worker
  541. Default value is 0. If this flag is set, StarPU will bypass the
  542. scheduler and directly affect this task to the worker specified by
  543. the field starpu_task::workerid.
  544. \var unsigned starpu_task::workerid
  545. Optional field. If the field
  546. starpu_task::execute_on_a_specific_worker is set, this field
  547. indicates the identifier of the worker that should process this
  548. task (as returned by starpu_worker_get_id()). This field is
  549. ignored if the field starpu_task::execute_on_a_specific_worker is
  550. set to 0.
  551. \var unsigned starpu_task::workerorder
  552. Optional field. If the field
  553. starpu_task::execute_on_a_specific_worker is set, this field
  554. indicates the per-worker consecutive order in which tasks should
  555. be executed on the worker. Tasks will be executed in consecutive
  556. starpu_task::workerorder values, thus ignoring the availability
  557. order or task priority. See \ref StaticScheduling for more
  558. details. This field is ignored if the field
  559. starpu_task::execute_on_a_specific_worker is set to 0.
  560. \var unsigned starpu_task::workerids
  561. Optional field. If the field
  562. starpu_task::workerids_len is different from 0, this field indicates an
  563. array of bits (stored as uint32_t values) which indicate the set of workers
  564. which are allowed to execute the task. starpu_task::workerid takes
  565. precedence over this.
  566. \var unsigned starpu_task::workerids_len
  567. Optional field. This provides the number of uint32_t values in the
  568. starpu_task::workerids array.
  569. \var starpu_task_bundle_t starpu_task::bundle
  570. Optional field. The bundle that includes this task. If no bundle
  571. is used, this should be <c>NULL</c>.
  572. \var unsigned starpu_task::detach
  573. Optional field, default value is 1. If this flag is set, it is not
  574. possible to synchronize with the task by the means of
  575. starpu_task_wait() later on. Internal data structures are only
  576. guaranteed to be freed once starpu_task_wait() is called if the
  577. flag is not set.
  578. \var unsigned starpu_task::destroy
  579. Optional value. Default value is 0 for starpu_task_init(), and 1
  580. for starpu_task_create(). If this flag is set, the task structure
  581. will automatically be freed, either after the execution of the
  582. callback if the task is detached, or during starpu_task_wait()
  583. otherwise. If this flag is not set, dynamically allocated data
  584. structures will not be freed until starpu_task_destroy() is called
  585. explicitly. Setting this flag for a statically allocated task
  586. structure will result in undefined behaviour. The flag is set to 1
  587. when the task is created by calling starpu_task_create(). Note
  588. that starpu_task_wait_for_all() will not free any task.
  589. \var unsigned starpu_task::regenerate
  590. Optional field. If this flag is set, the task will be re-submitted
  591. to StarPU once it has been executed. This flag must not be set if
  592. the flag starpu_task::destroy is set. This flag must be set before
  593. making another task depend on this one.
  594. \var enum starpu_task_status starpu_task::status
  595. Optional field. Current state of the task.
  596. \var struct starpu_profiling_task_info *starpu_task::profiling_info
  597. Optional field. Profiling information for the task.
  598. \var double starpu_task::predicted
  599. Output field. Predicted duration of the task. This field is only
  600. set if the scheduling strategy uses performance models.
  601. \var double starpu_task::predicted_transfer
  602. Optional field. Predicted data transfer duration for the task in
  603. microseconds. This field is only valid if the scheduling strategy
  604. uses performance models.
  605. \var double starpu_task::predicted_start
  606. todo
  607. \var struct starpu_task *starpu_task::prev
  608. \private
  609. A pointer to the previous task. This should only be used by
  610. StarPU.
  611. \var struct starpu_task *starpu_task::next
  612. \private
  613. A pointer to the next task. This should only be used by StarPU.
  614. \var unsigned int starpu_task::mf_skip
  615. \private
  616. This is only used for tasks that use multiformat handle. This
  617. should only be used by StarPU.
  618. \var double starpu_task::flops
  619. This can be set to the number of floating points operations that
  620. the task will have to achieve. This is useful for easily getting
  621. GFlops curves from the tool <c>starpu_perfmodel_plot</c>, and for
  622. the hypervisor load balancing.
  623. \var void *starpu_task::starpu_private
  624. \private
  625. This is private to StarPU, do not modify. If the task is allocated
  626. by hand (without starpu_task_create()), this field should be set
  627. to <c>NULL</c>.
  628. \var int starpu_task::magic
  629. \private
  630. This field is set when initializing a task. The function
  631. starpu_task_submit() will fail if the field does not have the
  632. right value. This will hence avoid submitting tasks which have not
  633. been properly initialised.
  634. \var unsigned starpu_task::sched_ctx
  635. Scheduling context.
  636. \var int starpu_task::hypervisor_tag
  637. Helps the hypervisor monitor the execution of this task.
  638. \var unsigned starpu_task::possibly_parallel
  639. todo
  640. \var unsigned starpu_task::prefetched
  641. todo
  642. \var unsigned starpu_task::scheduled
  643. Whether the scheduler has pushed the task on some queue
  644. \var struct starpu_omp_task *starpu_task::omp_task
  645. todo
  646. \fn void starpu_task_init(struct starpu_task *task)
  647. \ingroup API_Codelet_And_Tasks
  648. Initialize \p task with default values. This function is
  649. implicitly called by starpu_task_create(). By default, tasks initialized
  650. with starpu_task_init() must be deinitialized explicitly with
  651. starpu_task_clean(). Tasks can also be initialized statically, using
  652. ::STARPU_TASK_INITIALIZER.
  653. \def STARPU_TASK_INITIALIZER
  654. \ingroup API_Codelet_And_Tasks
  655. It is possible to initialize statically allocated tasks with
  656. this value. This is equivalent to initializing a structure starpu_task
  657. with the function starpu_task_init().
  658. \def STARPU_TASK_GET_NBUFFERS(task)
  659. \ingroup API_Codelet_And_Tasks
  660. Return the number of buffers for \p task, i.e. starpu_codelet::nbuffers, or
  661. starpu_task::nbuffers if the former is \ref STARPU_VARIABLE_NBUFFERS.
  662. \def STARPU_TASK_GET_HANDLE(task, i)
  663. \ingroup API_Codelet_And_Tasks
  664. Return the \p i -th data handle of \p task. If \p task
  665. is defined with a static or dynamic number of handles, will either
  666. return the \p i -th element of the field starpu_task::handles or the \p
  667. i -th element of the field starpu_task::dyn_handles
  668. (see \ref SettingManyDataHandlesForATask)
  669. \def STARPU_TASK_SET_HANDLE(task, handle, i)
  670. \ingroup API_Codelet_And_Tasks
  671. Set the \p i -th data handle of \p task with \p handle.
  672. If \p task is defined with a static or dynamic number of
  673. handles, will either set the \p i -th element of the field
  674. starpu_task::handles or the \p i -th element of the field
  675. starpu_task::dyn_handles
  676. (see \ref SettingManyDataHandlesForATask)
  677. \def STARPU_CODELET_GET_MODE(codelet, i)
  678. \ingroup API_Codelet_And_Tasks
  679. Return the access mode of the \p i -th data handle of \p codelet.
  680. If \p codelet is defined with a static or dynamic number of
  681. handles, will either return the \p i -th element of the field
  682. starpu_codelet::modes or the \p i -th element of the field
  683. starpu_codelet::dyn_modes
  684. (see \ref SettingManyDataHandlesForATask)
  685. \def STARPU_CODELET_SET_MODE(codelet, mode, i)
  686. \ingroup API_Codelet_And_Tasks
  687. Set the access mode of the \p i -th data handle of \p codelet.
  688. If \p codelet is defined with a static or dynamic number of
  689. handles, will either set the \p i -th element of the field
  690. starpu_codelet::modes or the \p i -th element of the field
  691. starpu_codelet::dyn_modes
  692. (see \ref SettingManyDataHandlesForATask)
  693. \def STARPU_TASK_GET_MODE(task, i)
  694. \ingroup API_Codelet_And_Tasks
  695. Return the access mode of the \p i -th data handle of \p task.
  696. If \p task is defined with a static or dynamic number of
  697. handles, will either return the \p i -th element of the field
  698. starpu_task::modes or the \p i -th element of the field
  699. starpu_task::dyn_modes
  700. (see \ref SettingManyDataHandlesForATask)
  701. \def STARPU_TASK_SET_MODE(task, mode, i)
  702. \ingroup API_Codelet_And_Tasks
  703. Set the access mode of the \p i -th data handle of \p task.
  704. If \p task is defined with a static or dynamic number of
  705. handles, will either set the \p i -th element of the field
  706. starpu_task::modes or the \p i -th element of the field
  707. starpu_task::dyn_modes
  708. (see \ref SettingManyDataHandlesForATask)
  709. \fn struct starpu_task *starpu_task_create(void)
  710. \ingroup API_Codelet_And_Tasks
  711. Allocate a task structure and initialize it with default
  712. values. Tasks allocated dynamically with starpu_task_create() are
  713. automatically freed when the task is terminated. This means that the
  714. task pointer can not be used any more once the task is submitted,
  715. since it can be executed at any time (unless dependencies make it
  716. wait) and thus freed at any time. If the field starpu_task::destroy is
  717. explicitly unset, the resources used by the task have to be freed by
  718. calling starpu_task_destroy().
  719. \fn struct starpu_task *starpu_task_dup(struct starpu_task *task)
  720. \ingroup API_Codelet_And_Tasks
  721. Allocate a task structure which is the exact duplicate of \p task.
  722. \fn void starpu_task_clean(struct starpu_task *task)
  723. \ingroup API_Codelet_And_Tasks
  724. Release all the structures automatically allocated to execute
  725. \p task, but not the task structure itself and values set by the user
  726. remain unchanged. It is thus useful for statically allocated tasks for
  727. instance. It is also useful when users want to execute the same
  728. operation several times with as least overhead as possible. It is
  729. called automatically by starpu_task_destroy(). It has to be called
  730. only after explicitly waiting for the task or after starpu_shutdown()
  731. (waiting for the callback is not enough, since StarPU still
  732. manipulates the task after calling the callback).
  733. \fn void starpu_task_destroy(struct starpu_task *task)
  734. \ingroup API_Codelet_And_Tasks
  735. Free the resource allocated during starpu_task_create() and
  736. associated with \p task. This function is called automatically
  737. after the execution of a task when the field starpu_task::destroy is
  738. set, which is the default for tasks created by starpu_task_create().
  739. Calling this function on a statically allocated task results in an
  740. undefined behaviour.
  741. \fn int starpu_task_wait(struct starpu_task *task)
  742. \ingroup API_Codelet_And_Tasks
  743. Block until \p task has been executed. It is not
  744. possible to synchronize with a task more than once. It is not possible
  745. to wait for synchronous or detached tasks. Upon successful completion,
  746. this function returns 0. Otherwise, <c>-EINVAL</c> indicates that the
  747. specified task was either synchronous or detached.
  748. \fn int starpu_task_wait_array(struct starpu_task **tasks, unsigned nb_tasks)
  749. \ingroup API_Codelet_And_Tasks
  750. Allow to wait for an array of tasks. Upon successful completion,
  751. this function returns 0. Otherwise, <c>-EINVAL</c> indicates that one of the tasks
  752. was either synchronous or detached.
  753. \fn int starpu_task_submit(struct starpu_task *task)
  754. \ingroup API_Codelet_And_Tasks
  755. Submit \p task to StarPU. Calling this function
  756. does not mean that the task will be executed immediately as there can
  757. be data or task (tag) dependencies that are not fulfilled yet: StarPU
  758. will take care of scheduling this task with respect to such
  759. dependencies. This function returns immediately if the field
  760. starpu_task::synchronous is set to 0, and block until the
  761. termination of the task otherwise.
  762. It is also possible to synchronize
  763. the application with asynchronous tasks by the means of tags, using
  764. the function starpu_tag_wait() function for instance. In case of
  765. success, this function returns 0, a return value of <c>-ENODEV</c>
  766. means that there is no worker able to process this task (e.g. there is
  767. no GPU available and this task is only implemented for CUDA devices).
  768. starpu_task_submit() can be called from anywhere, including codelet
  769. functions and callbacks, provided that the field
  770. starpu_task::synchronous is set to 0.
  771. \fn int starpu_task_submit_to_ctx(struct starpu_task *task, unsigned sched_ctx_id)
  772. \ingroup API_Codelet_And_Tasks
  773. Submit \p task to the context \p sched_ctx_id.
  774. By default, starpu_task_submit() submits the task to a global context that is
  775. created automatically by StarPU.
  776. \fn int starpu_task_wait_for_all(void)
  777. \ingroup API_Codelet_And_Tasks
  778. Block until all the tasks that were submitted (to the
  779. current context or the global one if there is no current context) are terminated.
  780. It does not destroy these tasks.
  781. \fn int starpu_task_wait_for_all_in_ctx(unsigned sched_ctx_id)
  782. \ingroup API_Codelet_And_Tasks
  783. Wait until all the tasks that were already submitted to the context \p
  784. sched_ctx_id have been terminated.
  785. \fn int starpu_task_wait_for_n_submitted(unsigned n)
  786. \ingroup API_Codelet_And_Tasks
  787. Block until there are \p n submitted tasks left (to the
  788. current context or the global one if there is no current context) to be executed. It does
  789. not destroy these tasks.
  790. \fn int starpu_task_wait_for_n_submitted_in_ctx(unsigned sched_ctx_id, unsigned n)
  791. \ingroup API_Codelet_And_Tasks
  792. Wait until there are \p n tasks submitted left to be
  793. executed that were already submitted to the context \p sched_ctx_id.
  794. \fn int starpu_task_nready(void)
  795. \ingroup API_Codelet_And_Tasks
  796. TODO
  797. \fn int starpu_task_nsubmitted(void)
  798. \ingroup API_Codelet_And_Tasks
  799. Return the number of submitted tasks which have not completed yet.
  800. \fn int starpu_task_nready(void)
  801. \ingroup API_Codelet_And_Tasks
  802. Return the number of submitted tasks which are ready for
  803. execution are already executing. It thus does not include tasks
  804. waiting for dependencies.
  805. \fn struct starpu_task *starpu_task_get_current(void)
  806. \ingroup API_Codelet_And_Tasks
  807. Return the task currently executed by the
  808. worker, or <c>NULL</c> if it is called either from a thread that is not a
  809. task or simply because there is no task being executed at the moment.
  810. \fn const char *starpu_task_get_name(struct starpu_task *task)
  811. \ingroup API_Codelet_And_Tasks
  812. Return the name of \p task, i.e. either its starpu_task::name field, or
  813. the name of the corresponding performance model.
  814. \fn const char *starpu_task_get_model_name(struct starpu_task *task)
  815. \ingroup API_Codelet_And_Tasks
  816. Return the name of the performance model of \p task.
  817. \fn void starpu_codelet_display_stats(struct starpu_codelet *cl)
  818. \ingroup API_Codelet_And_Tasks
  819. Output on \c stderr some statistics on the codelet \p cl.
  820. \fn int starpu_task_wait_for_no_ready(void)
  821. \ingroup API_Codelet_And_Tasks
  822. Wait until there is no more ready task.
  823. \fn void starpu_task_set_implementation(struct starpu_task *task, unsigned impl)
  824. \ingroup API_Codelet_And_Tasks
  825. This function should be called by schedulers to specify the
  826. codelet implementation to be executed when executing \p task.
  827. \fn unsigned starpu_task_get_implementation(struct starpu_task *task)
  828. \ingroup API_Codelet_And_Tasks
  829. Return the codelet implementation to be executed
  830. when executing \p task.
  831. \fn void starpu_iteration_push(unsigned long iteration)
  832. \ingroup API_Codelet_And_Tasks
  833. Sets the iteration number for all the tasks to be submitted after
  834. this call. This is typically called at the beginning of a task
  835. submission loop. This number will then show up in tracing tools. A
  836. corresponding starpu_iteration_pop() call must be made to match the call to
  837. starpu_iteration_push(), at the end of the same task submission loop, typically.
  838. Nested calls to starpu_iteration_push and starpu_iteration_pop are allowed, to
  839. describe a loop nest for instance, provided that they match properly.
  840. \fn void starpu_iteration_pop(void)
  841. \ingroup API_Codelet_And_Tasks
  842. Drops the iteration number for submitted tasks. This must match a previous
  843. call to starpu_iteration_push(), and is typically called at the end of a task
  844. submission loop.
  845. \fn void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void (*callback)(void *), void *callback_arg)
  846. \ingroup API_Codelet_And_Tasks
  847. Create (and submit) an empty task that unlocks a tag once all its dependencies are fulfilled.
  848. */