mpi.doxy 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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 CNRS
  5. * Copyright (C) 2011, 2012 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_MPI_Support MPI Support
  9. @name Initialisation
  10. \ingroup API_MPI_Support
  11. \def STARPU_USE_MPI
  12. \ingroup API_MPI_Support
  13. This macro is defined when StarPU has been installed with MPI
  14. support. It should be used in your code to detect the availability of
  15. MPI.
  16. \fn int starpu_mpi_init_comm(int *argc, char ***argv, int initialize_mpi, MPI_Comm comm)
  17. \ingroup API_MPI_Support
  18. Initializes the starpumpi library with the given communicator.
  19. \p initialize_mpi indicates if MPI should be initialized or not by StarPU.
  20. If the value is not 0, MPI will be initialized by calling
  21. <c>MPI_Init_Thread(argc, argv, MPI_THREAD_SERIALIZED, ...)</c>.
  22. starpu_init() must be called before starpu_mpi_init_comm().
  23. \fn int starpu_mpi_init(int *argc, char ***argv, int initialize_mpi)
  24. \ingroup API_MPI_Support
  25. Call starpu_mpi_init_comm() with the MPI communicator MPI_COMM_WORLD.
  26. \fn int starpu_mpi_initialize(void)
  27. \deprecated
  28. \ingroup API_MPI_Support
  29. This function has been made deprecated. One should use instead the
  30. function starpu_mpi_init(). This function does not call MPI_Init(), it
  31. should be called beforehand.
  32. \fn int starpu_mpi_initialize_extended(int *rank, int *world_size)
  33. \deprecated
  34. \ingroup API_MPI_Support
  35. This function has been made deprecated. One should use instead the
  36. function starpu_mpi_init(). MPI will be initialized by starpumpi by
  37. calling <c>MPI_Init_Thread(argc, argv, MPI_THREAD_SERIALIZED,
  38. ...)</c>.
  39. \fn int starpu_mpi_shutdown(void)
  40. \ingroup API_MPI_Support
  41. Cleans the starpumpi library. This must be called between calling
  42. starpu_mpi functions and starpu_shutdown(). MPI_Finalize() will be
  43. called if StarPU-MPI has been initialized by starpu_mpi_init().
  44. \fn void starpu_mpi_comm_amounts_retrieve(size_t *comm_amounts)
  45. \ingroup API_MPI_Support
  46. Retrieve the current amount of communications from the current node in
  47. the array \p comm_amounts which must have a size greater or equal to
  48. the world size. Communications statistics must be enabled (see
  49. \ref STARPU_COMM_STATS).
  50. @name Communication
  51. \anchor MPIPtpCommunication
  52. \ingroup API_MPI_Support
  53. \fn int starpu_mpi_send(starpu_data_handle_t data_handle, int dest, int mpi_tag, MPI_Comm comm)
  54. \ingroup API_MPI_Support
  55. Performs a standard-mode, blocking send of \p data_handle to the node
  56. \p dest using the message tag \p mpi_tag within the communicator \p
  57. comm.
  58. \fn int starpu_mpi_recv(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, MPI_Status *status)
  59. \ingroup API_MPI_Support
  60. Performs a standard-mode, blocking receive in \p data_handle from the
  61. node \p source using the message tag \p mpi_tag within the
  62. communicator \p comm.
  63. \fn int starpu_mpi_isend(starpu_data_handle_t data_handle, starpu_mpi_req *req, int dest, int mpi_tag, MPI_Comm comm)
  64. \ingroup API_MPI_Support
  65. Posts a standard-mode, non blocking send of \p data_handle to the node
  66. \p dest using the message tag \p mpi_tag within the communicator \p
  67. comm. After the call, the pointer to the request \p req can be used to
  68. test or to wait for the completion of the communication.
  69. \fn int starpu_mpi_irecv(starpu_data_handle_t data_handle, starpu_mpi_req *req, int source, int mpi_tag, MPI_Comm comm)
  70. \ingroup API_MPI_Support
  71. Posts a nonblocking receive in \p data_handle from the node \p source
  72. using the message tag \p mpi_tag within the communicator \p comm.
  73. After the call, the pointer to the request \p req can be used to test
  74. or to wait for the completion of the communication.
  75. \fn int starpu_mpi_isend_detached(starpu_data_handle_t data_handle, int dest, int mpi_tag, MPI_Comm comm, void (*callback)(void *), void *arg)
  76. \ingroup API_MPI_Support
  77. Posts a standard-mode, non blocking send of \p data_handle to the node
  78. \p dest using the message tag \p mpi_tag within the communicator \p
  79. comm. On completion, the \p callback function is called with the
  80. argument \p arg.
  81. Similarly to the pthread detached functionality, when a detached
  82. communication completes, its resources are automatically released back
  83. to the system, there is no need to test or to wait for the completion
  84. of the request.
  85. \fn int starpu_mpi_irecv_detached(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, void (*callback)(void *), void *arg)
  86. \ingroup API_MPI_Support
  87. Posts a nonblocking receive in \p data_handle from the node \p source
  88. using the message tag \p mpi_tag within the communicator \p comm. On
  89. completion, the \p callback function is called with the argument \p
  90. arg.
  91. Similarly to the pthread detached functionality, when a detached
  92. communication completes, its resources are automatically released back
  93. to the system, there is no need to test or to wait for the completion
  94. of the request.
  95. \fn int starpu_mpi_irecv_detached_sequential_consistency(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, void (*callback)(void *), void *arg, int sequential_consistency)
  96. \ingroup API_MPI_Support
  97. Posts a nonblocking receive in \p data_handle from the node \p source
  98. using the message tag \p mpi_tag within the communicator \p comm. On
  99. completion, the \p callback function is called with the argument \p
  100. arg.
  101. The parameter \p sequential_consistency allows to enable or disable
  102. the sequential consistency for \p data handle (sequential consistency
  103. will be enabled or disabled based on the value of the parameter \p
  104. sequential_consistency and the value of the sequential consistency
  105. defined for \p data_handle).
  106. Similarly to the pthread detached functionality, when a detached
  107. communication completes, its resources are automatically released back
  108. to the system, there is no need to test or to wait for the completion
  109. of the request.
  110. \fn int starpu_mpi_issend(starpu_data_handle_t data_handle, starpu_mpi_req *req, int dest, int mpi_tag, MPI_Comm comm)
  111. \ingroup API_MPI_Support
  112. Performs a synchronous-mode, non-blocking send of \p data_handle to the node
  113. \p dest using the message tag \p mpi_tag within the communicator \p
  114. comm.
  115. \fn int starpu_mpi_issend_detached(starpu_data_handle_t data_handle, int dest, int mpi_tag, MPI_Comm comm, void (*callback)(void *), void *arg)
  116. \ingroup API_MPI_Support
  117. Performs a synchronous-mode, non-blocking send of \p data_handle to the node
  118. \p dest using the message tag \p mpi_tag within the communicator \p
  119. comm. On completion, the \p callback function is called with the argument \p
  120. arg.
  121. Similarly to the pthread detached functionality, when a detached
  122. communication completes, its resources are automatically released back
  123. to the system, there is no need to test or to wait for the completion
  124. of the request.
  125. \fn int starpu_mpi_wait(starpu_mpi_req *req, MPI_Status *status)
  126. \ingroup API_MPI_Support
  127. Returns when the operation identified by request \p req is complete.
  128. \fn int starpu_mpi_test(starpu_mpi_req *req, int *flag, MPI_Status *status)
  129. \ingroup API_MPI_Support
  130. If the operation identified by \p req is complete, set \p flag to 1.
  131. The \p status object is set to contain information on the completed
  132. operation.
  133. \fn int starpu_mpi_barrier(MPI_Comm comm)
  134. \ingroup API_MPI_Support
  135. Blocks the caller until all group members of the communicator \p comm
  136. have called it.
  137. \fn int starpu_mpi_wait_for_all(MPI_Comm comm)
  138. \ingroup API_MPI_Support
  139. Wait until all StarPU tasks and communications for the given communicator are completed.
  140. \fn int starpu_mpi_isend_detached_unlock_tag(starpu_data_handle_t data_handle, int dest, int mpi_tag, MPI_Comm comm, starpu_tag_t tag)
  141. \ingroup API_MPI_Support
  142. Posts a standard-mode, non blocking send of \p data_handle to the node
  143. \p dest using the message tag \p mpi_tag within the communicator \p
  144. comm. On completion, \p tag is unlocked.
  145. \fn int starpu_mpi_irecv_detached_unlock_tag(starpu_data_handle_t data_handle, int source, int mpi_tag, MPI_Comm comm, starpu_tag_t tag)
  146. \ingroup API_MPI_Support
  147. Posts a nonblocking receive in \p data_handle from the node \p source
  148. using the message tag \p mpi_tag within the communicator \p comm. On
  149. completion, \p tag is unlocked.
  150. \fn int starpu_mpi_isend_array_detached_unlock_tag(unsigned array_size, starpu_data_handle_t *data_handle, int *dest, int *mpi_tag, MPI_Comm *comm, starpu_tag_t tag)
  151. \ingroup API_MPI_Support
  152. Posts \p array_size standard-mode, non blocking send. Each post sends
  153. the n-th data of the array \p data_handle to the n-th node of the
  154. array \p dest using the n-th message tag of the array \p mpi_tag
  155. within the n-th communicator of the array \p comm. On completion of
  156. the all the requests, \p tag is unlocked.
  157. \fn int starpu_mpi_irecv_array_detached_unlock_tag(unsigned array_size, starpu_data_handle_t *data_handle, int *source, int *mpi_tag, MPI_Comm *comm, starpu_tag_t tag)
  158. \ingroup API_MPI_Support
  159. Posts \p array_size nonblocking receive. Each post receives in the n-th
  160. data of the array \p data_handle from the n-th node of the array \p
  161. source using the n-th message tag of the array \p mpi_tag within the
  162. n-th communicator of the array \p comm. On completion of the all the
  163. requests, \p tag is unlocked.
  164. \fn int starpu_mpi_get_communication_tag(void)
  165. \ingroup API_MPI_Support
  166. todo
  167. \fn void starpu_mpi_set_communication_tag(int tag)
  168. \ingroup API_MPI_Support
  169. todo
  170. \fn int starpu_mpi_datatype_register(starpu_data_handle_t handle, starpu_mpi_datatype_allocate_func_t allocate_datatype_func, starpu_mpi_datatype_free_func_t free_datatype_func)
  171. \ingroup API_MPI_Support
  172. Register functions to create and free a MPI datatype for the given handle.
  173. It is important that the function is called before any communication can take place for a data with the given handle. See \ref ExchangingUserDefinedDataInterface for an example.
  174. \fn int starpu_mpi_datatype_unregister(starpu_data_handle_t handle);
  175. \ingroup API_MPI_Support
  176. Unregister the MPI datatype functions stored for the interface of the given handle.
  177. @name Communication Cache
  178. \ingroup API_MPI_Support
  179. \fn int starpu_mpi_cache_is_enabled()
  180. \ingroup API_MPI_Support
  181. Return 1 if the communication cache is enabled, 0 otherwise
  182. \fn int starpu_mpi_cache_set(int enabled)
  183. \ingroup API_MPI_Support
  184. If \p enabled is 1, enable the communication cache. Otherwise, clean the cache if it was enabled and disable it.
  185. \fn void starpu_mpi_cache_flush(MPI_Comm comm, starpu_data_handle_t data_handle)
  186. \ingroup API_MPI_Support
  187. Clear the send and receive communication cache for the data
  188. \p data_handle and invalidate the value. The function has to be called synchronously by all the
  189. MPI nodes. The function does nothing if the cache mechanism is
  190. disabled (see \ref STARPU_MPI_CACHE).
  191. \fn void starpu_mpi_cache_flush_all_data(MPI_Comm comm)
  192. \ingroup API_MPI_Support
  193. Clear the send and receive communication cache for all data and invalidate their values. The
  194. function has to be called synchronously by all the MPI nodes. The
  195. function does nothing if the cache mechanism is disabled (see
  196. \ref STARPU_MPI_CACHE).
  197. @name MPI Insert Task
  198. \anchor MPIInsertTask
  199. \ingroup API_MPI_Support
  200. \fn void starpu_mpi_data_register_comm(starpu_data_handle_t data_handle, int tag, int rank, MPI_Comm comm)
  201. \ingroup API_MPI_Support
  202. Register to MPI a StarPU data handle with the given tag, rank and MPI communicator.
  203. It also automatically clears the MPI communication cache when unregistering the data.
  204. \def starpu_mpi_data_register(data_handle, tag, rank)
  205. \ingroup API_MPI_Support
  206. Register to MPI a StarPU data handle with the given tag, rank and the MPI communicator MPI_COMM_WORLD.
  207. It also automatically clears the MPI communication cache when unregistering the data.
  208. \fn void starpu_mpi_data_set_tag(starpu_data_handle_t handle, int tag)
  209. \ingroup API_MPI_Support
  210. Register to MPI a StarPU data handle with the given tag. No rank will be defined.
  211. It also automatically clears the MPI communication cache when unregistering the data.
  212. \def starpu_data_set_tag
  213. \ingroup API_MPI_Support
  214. Symbol kept for backward compatibility. Calling function starpu_mpi_data_set_tag
  215. \fn void starpu_mpi_data_set_rank_comm(starpu_data_handle_t handle, int rank, MPI_Comm comm)
  216. \ingroup API_MPI_Support
  217. Register to MPI a StarPU data handle with the given rank and given communicator. No tag will be defined.
  218. It also automatically clears the MPI communication cache when unregistering the data.
  219. \def starpu_mpi_data_set_rank
  220. \ingroup API_MPI_Support
  221. Register to MPI a StarPU data handle with the given rank and the MPI communicator MPI_COMM_WORLD. No tag will be defined.
  222. It also automatically clears the MPI communication cache when unregistering the data.
  223. Symbol kept for backward compatibility. Calling function starpu_mpi_data_set_rank
  224. \def starpu_data_set_rank
  225. \ingroup API_MPI_Support
  226. Register to MPI a StarPU data handle with the given rank and the MPI communicator MPI_COMM_WORLD. No tag will be defined.
  227. It also automatically clears the MPI communication cache when unregistering the data.
  228. Symbol kept for backward compatibility. Calling function starpu_mpi_data_set_rank
  229. \fn int starpu_mpi_data_get_rank(starpu_data_handle_t handle)
  230. \ingroup API_MPI_Support
  231. Return the rank of the given data.
  232. \def starpu_data_get_rank(starpu_data_handle_t handle)
  233. \ingroup API_MPI_Support
  234. Return the rank of the given data.
  235. Symbol kept for backward compatibility. Calling function starpu_mpi_data_get_rank
  236. \fn int starpu_mpi_data_get_tag(starpu_data_handle_t handle)
  237. \ingroup API_MPI_Support
  238. Return the tag of the given data.
  239. \def starpu_data_get_tag(starpu_data_handle_t handle)
  240. \ingroup API_MPI_Support
  241. Return the tag of the given data.
  242. Symbol kept for backward compatibility. Calling function starpu_mpi_data_get_tag
  243. \def starpu_mpi_data_migrate(MPI_Comm comm, starpu_data_handle_t handle, int new_rank)
  244. \ingroup API_MPI_Support
  245. Migrate the data onto the \p new_rank MPI node. This means both transferring
  246. the data to node \p new_rank if it hasn't been transferred already, and setting
  247. the home node of the data to the new node. Further data transfers triggered by
  248. starpu_mpi_task_insert() will be done from that new node. This function thus
  249. needs to be called on all nodes which have registered the data. This also
  250. flushes the cache for this data to avoid incoherencies.
  251. \def STARPU_EXECUTE_ON_NODE
  252. \ingroup API_MPI_Support
  253. this macro is used when calling starpu_mpi_task_insert(), and must be
  254. followed by a integer value which specified the node on which to
  255. execute the codelet.
  256. \def STARPU_EXECUTE_ON_DATA
  257. \ingroup API_MPI_Support
  258. this macro is used when calling starpu_mpi_task_insert(), and must be
  259. followed by a data handle to specify that the node owning the given
  260. data will execute the codelet.
  261. \def STARPU_NODE_SELECTION_POLICY
  262. \ingroup API_MPI_Support
  263. this macro is used when calling starpu_mpi_task_insert(), and must be
  264. followed by a identifier to a node selection policy. This is needed when several
  265. nodes own data in ::STARPU_W mode.
  266. \fn int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
  267. \ingroup API_MPI_Support
  268. This function does the same as the function starpu_mpi_task_insert(). It has been kept to avoid breaking old codes.
  269. \fn int starpu_mpi_task_insert(MPI_Comm comm, struct starpu_codelet *codelet, ...)
  270. \ingroup API_MPI_Support
  271. Create and submit a task corresponding to codelet with the following
  272. arguments. The argument list must be zero-terminated.
  273. The arguments following the codelet are the same types as for the
  274. function starpu_task_insert(). Access modes for data can also be set
  275. with ::STARPU_SSEND to specify the data has to be sent using a
  276. synchronous and non-blocking mode (see starpu_mpi_issend()).
  277. The extra argument
  278. ::STARPU_EXECUTE_ON_NODE followed by an integer allows to specify the
  279. MPI node to execute the codelet. It is also possible to specify that
  280. the node owning a specific data will execute the codelet, by using
  281. ::STARPU_EXECUTE_ON_DATA followed by a data handle.
  282. The internal algorithm is as follows:
  283. <ol>
  284. <li>
  285. Find out which MPI node is going to execute the codelet.
  286. <ul>
  287. <li>If there is only one node owning data in ::STARPU_W mode, it will be selected;
  288. <li>If there is several nodes owning data in ::STARPU_W mode, a node will be selected according to a given node selection policy (see ::STARPU_NODE_SELECTION_POLICY or starpu_mpi_node_selection_set_current_policy())
  289. <li>The argument ::STARPU_EXECUTE_ON_NODE followed by an integer can be used to specify the node;
  290. <li>The argument ::STARPU_EXECUTE_ON_DATA followed by a data handle can be used to specify that the node owing the given data will execute the codelet.
  291. </ul>
  292. </li>
  293. <li>
  294. Send and receive data as requested. Nodes owning data which need to be read by the task are sending them to the MPI node which will execute it. The latter receives them.
  295. </li>
  296. <li>
  297. Execute the codelet. This is done by the MPI node selected in the 1st step of the algorithm.
  298. </li>
  299. <li>
  300. If several MPI nodes own data to be written to, send written data back to their owners.
  301. </li>
  302. </ol>
  303. The algorithm also includes a communication cache mechanism that
  304. allows not to send data twice to the same MPI node, unless the data
  305. has been modified. The cache can be disabled (see \ref STARPU_MPI_CACHE).
  306. \fn struct starpu_task *starpu_mpi_task_build(MPI_Comm comm, struct starpu_codelet *codelet, ...)
  307. \ingroup API_MPI_Support
  308. Create a task corresponding to codelet with the following arguments.
  309. The argument list must be zero-terminated. The function performs the
  310. first two steps of the function starpu_mpi_task_insert(). Only the MPI
  311. node selected in the first step of the algorithm will return a valid
  312. task structure which can then be submitted, others will return NULL. The function
  313. starpu_mpi_task_post_build() MUST be called after that on all nodes, and after the submission of
  314. the task on the node which creates it, with the SAME list of arguments.
  315. \fn int starpu_mpi_task_post_build(MPI_Comm comm, struct starpu_codelet *codelet, ...)
  316. \ingroup API_MPI_Support
  317. This function MUST be called after a call to starpu_mpi_task_build(),
  318. with the SAME list of arguments. It performs the fourth -- last -- step of the algorithm described in
  319. starpu_mpi_task_insert().
  320. \fn void starpu_mpi_get_data_on_node(MPI_Comm comm, starpu_data_handle_t data_handle, int node)
  321. \ingroup API_MPI_Support
  322. Transfer data \p data_handle to MPI node \p node, sending it from its
  323. owner if needed. At least the target node and the owner have to call
  324. the function.
  325. \fn void starpu_mpi_get_data_on_node_detached(MPI_Comm comm, starpu_data_handle_t data_handle, int node, void (*callback)(void*), void *arg)
  326. \ingroup API_MPI_Support
  327. Transfer data \p data_handle to MPI node \p node, sending it from its
  328. owner if needed. At least the target node and the owner have to call
  329. the function. On reception, the \p callback function is called with
  330. the argument \p arg.
  331. @name Node Selection Policy
  332. \anchor MPINodeSelectionPolicy
  333. \ingroup API_MPI_Support
  334. \fn int starpu_mpi_node_selection_get_current_policy()
  335. \ingroup API_MPI_Support
  336. Return the current policy used to select the node which will execute the codelet
  337. \fn int starpu_mpi_node_selection_set_current_policy(int policy)
  338. \ingroup API_MPI_Support
  339. Set the current policy used to select the node which will
  340. execute the codelet. The policy STARPU_MPI_NODE_SELECTION_MOST_R_DATA selects the
  341. node having the most data in R mode so as to minimize the amount of
  342. data to be transfered.
  343. \fn int starpu_mpi_node_selection_register_policy(starpu_mpi_select_node_policy_func_t policy_func)
  344. \ingroup API_MPI_Support
  345. Register a new policy which can then be used when there is several nodes owning data in W mode.
  346. Here an example of function defining a node selection policy.
  347. The codelet will be executed on the node owing the first data with a size bigger than 1M, or on the node
  348. 0 if no data fits the given size.
  349. \code{.c}
  350. int my_node_selection_policy(int me, int nb_nodes, struct starpu_data_descr *descr, int nb_data)
  351. {
  352. // me is the current MPI rank
  353. // nb_nodes is the number of MPI nodes
  354. // descr is the description of the data specified when calling starpu_mpi_task_insert
  355. // nb_data is the number of data in descr
  356. int i;
  357. for(i= 0 ; i<nb_data ; i++)
  358. {
  359. starpu_data_handle_t data = descr[i].handle;
  360. enum starpu_data_access_mode mode = descr[i].mode;
  361. if (mode & STARPU_R)
  362. {
  363. int rank = starpu_data_get_rank(data);
  364. size_t size = starpu_data_get_size(data);
  365. if (size > 1024*1024) return rank;
  366. }
  367. }
  368. return 0;
  369. }
  370. \endcode
  371. \fn int starpu_mpi_node_selection_unregister_policy(int policy)
  372. \ingroup API_MPI_Support
  373. Unregister a previously registered policy.
  374. @name Collective Operations
  375. \anchor MPICollectiveOperations
  376. \ingroup API_MPI_Support
  377. \fn void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle)
  378. \ingroup API_MPI_Support
  379. Perform a reduction on the given data. All nodes send the data to its
  380. owner node which will perform a reduction.
  381. \fn int starpu_mpi_scatter_detached(starpu_data_handle_t *data_handles, int count, int root, MPI_Comm comm, void (*scallback)(void *), void *sarg, void (*rcallback)(void *), void *rarg)
  382. \ingroup API_MPI_Support
  383. Scatter data among processes of the communicator based on the
  384. ownership of the data. For each data of the array \p data_handles, the
  385. process \p root sends the data to the process owning this data. Processes
  386. receiving data must have valid data handles to receive them. On
  387. completion of the collective communication, the \p scallback function is
  388. called with the argument \p sarg on the process \p root, the \p
  389. rcallback function is called with the argument \p rarg on any other
  390. process.
  391. \fn int starpu_mpi_gather_detached(starpu_data_handle_t *data_handles, int count, int root, MPI_Comm comm, void (*scallback)(void *), void *sarg, void (*rcallback)(void *), void *rarg)
  392. \ingroup API_MPI_Support
  393. Gather data from the different processes of the communicator onto the
  394. process \p root. Each process owning data handle in the array
  395. \p data_handles will send them to the process \p root. The process \p
  396. root must have valid data handles to receive the data. On completion
  397. of the collective communication, the \p rcallback function is called
  398. with the argument \p rarg on the process root, the \p scallback
  399. function is called with the argument \p sarg on any other process.
  400. */