starpu_paje.c 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011-2014,2016-2017 Inria
  4. * Copyright (C) 2012,2014,2017,2018 CNRS
  5. * Copyright (C) 2017 Universidade Federal do Rio Grande do Sul (UFRGS)
  6. * Copyright (C) 2010-2018 Université de Bordeaux
  7. *
  8. * StarPU is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation; either version 2.1 of the License, or (at
  11. * your option) any later version.
  12. *
  13. * StarPU is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. *
  17. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. */
  19. #include "starpu_fxt.h"
  20. #include <common/config.h>
  21. #ifdef STARPU_HAVE_POTI
  22. #include <poti.h>
  23. #endif
  24. #ifdef STARPU_USE_FXT
  25. #ifdef STARPU_HAVE_POTI
  26. #ifdef HAVE_POTI_INIT_CUSTOM
  27. int _starpu_poti_extendedSetState = -1;
  28. int _starpu_poti_semiExtendedSetState = -1;
  29. int _starpu_poti_MemoryEvent = -1;
  30. #endif
  31. #endif
  32. void _starpu_fxt_write_paje_header(FILE *file STARPU_ATTRIBUTE_UNUSED, struct starpu_fxt_options *options)
  33. {
  34. unsigned i;
  35. #ifdef STARPU_HAVE_POTI
  36. #ifdef HAVE_POTI_INIT_CUSTOM
  37. poti_header(); /* see poti_init_custom to customize the header */
  38. _starpu_poti_extendedSetState = poti_header_DeclareEvent (PAJE_SetState,
  39. 11,
  40. "Size string",
  41. "Params string",
  42. "Footprint string",
  43. "Tag string",
  44. "JobId string",
  45. "SubmitOrder string",
  46. "GFlop string",
  47. "X string",
  48. "Y string",
  49. /* "Z string", */
  50. "Iteration string",
  51. "Subiteration string");
  52. _starpu_poti_semiExtendedSetState = poti_header_DeclareEvent (PAJE_SetState,
  53. 6,
  54. "Size string",
  55. "Params string",
  56. "Footprint string",
  57. "Tag string",
  58. "JobId string",
  59. "SubmitOrder string"
  60. );
  61. #ifdef HAVE_POTI_USER_NEWEVENT
  62. if (options->memory_states)
  63. {
  64. _starpu_poti_MemoryEvent = poti_header_DeclareEvent (PAJE_NewEvent,
  65. 4,
  66. "Handle string",
  67. "Info string",
  68. "Size string",
  69. "Dest string");
  70. }
  71. #endif
  72. #else
  73. poti_header(1,1);
  74. #endif
  75. #else
  76. fprintf(file, "%%EventDef PajeDefineContainerType 1\n");
  77. fprintf(file, "%% Alias string\n");
  78. fprintf(file, "%% Type string\n");
  79. fprintf(file, "%% Name string\n");
  80. fprintf(file, "%%EndEventDef\n");
  81. fprintf(file, "%%EventDef PajeDefineEventType 2\n");
  82. fprintf(file, "%% Alias string\n");
  83. fprintf(file, "%% Type string\n");
  84. fprintf(file, "%% Name string\n");
  85. fprintf(file, "%%EndEventDef\n");
  86. fprintf(file, "%%EventDef PajeDefineStateType 3\n");
  87. fprintf(file, "%% Alias string\n");
  88. fprintf(file, "%% Type string\n");
  89. fprintf(file, "%% Name string\n");
  90. fprintf(file, "%%EndEventDef\n");
  91. fprintf(file, "%%EventDef PajeDefineVariableType 4\n");
  92. fprintf(file, "%% Alias string\n");
  93. fprintf(file, "%% Type string\n");
  94. fprintf(file, "%% Name string\n");
  95. fprintf(file, "%%EndEventDef\n");
  96. fprintf(file, "%%EventDef PajeDefineLinkType 5\n");
  97. fprintf(file, "%% Alias string\n");
  98. fprintf(file, "%% Type string\n");
  99. fprintf(file, "%% StartContainerType string\n");
  100. fprintf(file, "%% EndContainerType string\n");
  101. fprintf(file, "%% Name string\n");
  102. fprintf(file, "%%EndEventDef\n");
  103. fprintf(file, "%%EventDef PajeDefineEntityValue 6\n");
  104. fprintf(file, "%% Alias string\n");
  105. fprintf(file, "%% Type string\n");
  106. fprintf(file, "%% Name string\n");
  107. fprintf(file, "%% Color color\n");
  108. fprintf(file, "%%EndEventDef\n");
  109. fprintf(file, "%%EventDef PajeCreateContainer 7\n");
  110. fprintf(file, "%% Time date\n");
  111. fprintf(file, "%% Alias string\n");
  112. fprintf(file, "%% Type string\n");
  113. fprintf(file, "%% Container string\n");
  114. fprintf(file, "%% Name string\n");
  115. fprintf(file, "%%EndEventDef\n");
  116. fprintf(file, "%%EventDef PajeDestroyContainer 8\n");
  117. fprintf(file, "%% Time date\n");
  118. fprintf(file, "%% Name string\n");
  119. fprintf(file, "%% Type string\n");
  120. fprintf(file, "%%EndEventDef\n");
  121. fprintf(file, "%%EventDef PajeNewEvent 9\n");
  122. fprintf(file, "%% Time date\n");
  123. fprintf(file, "%% Type string\n");
  124. fprintf(file, "%% Container string\n");
  125. fprintf(file, "%% Value string\n");
  126. fprintf(file, "%%EndEventDef\n");
  127. fprintf(file, "%%EventDef PajeSetState 10\n");
  128. fprintf(file, "%% Time date\n");
  129. fprintf(file, "%% Container string\n");
  130. fprintf(file, "%% Type string\n");
  131. fprintf(file, "%% Value string\n");
  132. fprintf(file, "%%EndEventDef\n");
  133. fprintf(file, "%%EventDef PajePushState 11\n");
  134. fprintf(file, "%% Time date\n");
  135. fprintf(file, "%% Container string\n");
  136. fprintf(file, "%% Type string\n");
  137. fprintf(file, "%% Value string\n");
  138. fprintf(file, "%%EndEventDef\n");
  139. fprintf(file, "%%EventDef PajePopState 12\n");
  140. fprintf(file, "%% Time date\n");
  141. fprintf(file, "%% Container string\n");
  142. fprintf(file, "%% Type string\n");
  143. fprintf(file, "%%EndEventDef\n");
  144. fprintf(file, "%%EventDef PajeSetVariable 13\n");
  145. fprintf(file, "%% Time date\n");
  146. fprintf(file, "%% Container string\n");
  147. fprintf(file, "%% Type string\n");
  148. fprintf(file, "%% Value double\n");
  149. fprintf(file, "%%EndEventDef\n");
  150. fprintf(file, "%%EventDef PajeAddVariable 14\n");
  151. fprintf(file, "%% Time date\n");
  152. fprintf(file, "%% Type string\n");
  153. fprintf(file, "%% Container string\n");
  154. fprintf(file, "%% Value double\n");
  155. fprintf(file, "%%EndEventDef\n");
  156. fprintf(file, "%%EventDef PajeSubVariable 15\n");
  157. fprintf(file, "%% Time date\n");
  158. fprintf(file, "%% Type string\n");
  159. fprintf(file, "%% Container string\n");
  160. fprintf(file, "%% Value double\n");
  161. fprintf(file, "%%EndEventDef\n");
  162. fprintf(file, "%%EventDef PajeStartLink 18\n");
  163. fprintf(file, "%% Time date\n");
  164. fprintf(file, "%% Type string\n");
  165. fprintf(file, "%% Container string\n");
  166. fprintf(file, "%% Value string\n");
  167. fprintf(file, "%% StartContainer string\n");
  168. fprintf(file, "%% Key string\n");
  169. fprintf(file, "%%EndEventDef\n");
  170. fprintf(file, "%%EventDef PajeEndLink 19\n");
  171. fprintf(file, "%% Time date\n");
  172. fprintf(file, "%% Type string\n");
  173. fprintf(file, "%% Container string\n");
  174. fprintf(file, "%% Value string\n");
  175. fprintf(file, "%% EndContainer string\n");
  176. fprintf(file, "%% Key string\n");
  177. fprintf(file, "%%EndEventDef\n");
  178. fprintf(file, "%%EventDef PajeSetState 20\n");
  179. fprintf(file, "%% Time date\n");
  180. fprintf(file, "%% Container string\n");
  181. fprintf(file, "%% Type string\n");
  182. fprintf(file, "%% Value string\n");
  183. fprintf(file, "%% Size string\n");
  184. fprintf(file, "%% Params string\n");
  185. fprintf(file, "%% Footprint string\n");
  186. fprintf(file, "%% Tag string\n");
  187. fprintf(file, "%% JobId string\n");
  188. fprintf(file, "%% SubmitOrder string\n");
  189. fprintf(file, "%% GFlop string\n");
  190. fprintf(file, "%% X string\n");
  191. fprintf(file, "%% Y string\n");
  192. /* fprintf(file, "%% Z string\n"); */
  193. fprintf(file, "%% Iteration string\n");
  194. fprintf(file, "%% Subiteration string\n");
  195. fprintf(file, "%%EndEventDef\n");
  196. fprintf(file, "%%EventDef PajeSetState 21\n");
  197. fprintf(file, "%% Time date\n");
  198. fprintf(file, "%% Container string\n");
  199. fprintf(file, "%% Type string\n");
  200. fprintf(file, "%% Value string\n");
  201. fprintf(file, "%% Size string\n");
  202. fprintf(file, "%% Params string\n");
  203. fprintf(file, "%% Footprint string\n");
  204. fprintf(file, "%% Tag string\n");
  205. fprintf(file, "%% JobId string\n");
  206. fprintf(file, "%% SubmitOrder string\n");
  207. fprintf(file, "%%EndEventDef\n");
  208. if (options->memory_states)
  209. {
  210. fprintf(file, "%%EventDef PajeNewEvent 22\n");
  211. fprintf(file, "%% Time date\n");
  212. fprintf(file, "%% Type string\n");
  213. fprintf(file, "%% Container string\n");
  214. fprintf(file, "%% Value string\n");
  215. fprintf(file, "%% Handle string\n");
  216. fprintf(file, "%% Info string\n");
  217. fprintf(file, "%% Size string\n");
  218. fprintf(file, "%% Tid string\n");
  219. fprintf(file, "%%EndEventDef\n");
  220. }
  221. #endif
  222. #ifdef STARPU_HAVE_POTI
  223. poti_DefineContainerType("MPIP", "0", "MPI Program");
  224. poti_DefineContainerType("P", "MPIP", "Program");
  225. poti_DefineContainerType("Mn", "P", "Memory Node");
  226. poti_DefineContainerType("T", "Mn", "Thread");
  227. poti_DefineContainerType("UT", "P", "User Thread");
  228. poti_DefineContainerType("Mm", "Mn", "Memory Manager");
  229. poti_DefineContainerType("W", "T", "Worker");
  230. poti_DefineContainerType("MPICt", "P", "MPI Communication Thread");
  231. poti_DefineContainerType("Sc", "P", "Scheduler");
  232. poti_DefineEventType("prog_event", "P", "program event type");
  233. poti_DefineEventType("register", "P", "data registration");
  234. poti_DefineEventType("unregister", "P", "data unregistration");
  235. /* Types for the memory node */
  236. poti_DefineEventType("SI", "Mm", "data state invalid");
  237. poti_DefineEventType("SS", "Mm", "data state shared");
  238. poti_DefineEventType("SO", "Mm", "data state owner");
  239. poti_DefineEventType("WU", "Mm", "data wont use");
  240. poti_DefineEventType("Al", "Mm", "Allocating Start");
  241. poti_DefineEventType("AlE", "Mm", "Allocating End");
  242. poti_DefineEventType("Alr", "Mm", "Allocating Async Start");
  243. poti_DefineEventType("AlrE", "Mm", "Allocating Async End");
  244. poti_DefineEventType("Fe", "Mm", "Free Start");
  245. poti_DefineEventType("FeE", "Mm", "Free End");
  246. poti_DefineEventType("Wb", "Mm", "WritingBack Start");
  247. poti_DefineEventType("WbE", "Mm", "WritingBack End");
  248. poti_DefineEventType("DCo", "Mm", "DriverCopy Start");
  249. poti_DefineEventType("DCoE", "Mm", "DriverCopy End");
  250. poti_DefineEventType("DCoA", "Mm", "DriverCopyAsync Start");
  251. poti_DefineEventType("DCoAE", "Mm", "DriverCopyAsync End");
  252. poti_DefineVariableType("use", "Mm", "Used (MB)", "0 0 0");
  253. poti_DefineVariableType("bwi_mm", "Mm", "Bandwidth In (MB/s)", "0 0 0");
  254. poti_DefineVariableType("bwo_mm", "Mm", "Bandwidth Out (MB/s)", "0 0 0");
  255. poti_DefineStateType("MS", "Mm", "Memory Node State");
  256. poti_DefineEntityValue("A", "MS", "Allocating", ".4 .1 .0");
  257. poti_DefineEntityValue("Ar", "MS", "AllocatingReuse", ".1 .1 .8");
  258. poti_DefineEntityValue("F", "MS", "Freeing", ".6 .3 .0");
  259. poti_DefineEntityValue("W", "MS", "WritingBack", ".0 .0 .5");
  260. poti_DefineEntityValue("Wa", "MS", "WritingBackAsync", ".0 .0 .4");
  261. poti_DefineEntityValue("R", "MS", "Reclaiming", ".0 .1 .6");
  262. poti_DefineEntityValue("Co", "MS", "DriverCopy", ".3 .5 .1");
  263. poti_DefineEntityValue("CoA", "MS", "DriverCopyAsync", ".1 .3 .1");
  264. poti_DefineEntityValue("No", "MS", "Nothing", ".0 .0 .0");
  265. /* Types for the Worker of the Memory Node */
  266. poti_DefineEventType("user_event", "P", "user event type");
  267. poti_DefineEventType("thread_event", "T", "thread event type");
  268. poti_DefineVariableType("gf", "W", "GFlops", "0 0 0");
  269. poti_DefineStateType("S", "T", "Thread State");
  270. poti_DefineEntityValue("I", "S", "Idle", ".9 .1 0");
  271. poti_DefineEntityValue("In", "S", "Initializing", "0.0 .7 1.0");
  272. poti_DefineEntityValue("D", "S", "Deinitializing", "0.0 .1 .7");
  273. poti_DefineEntityValue("Fi", "S", "FetchingInput", "1.0 .1 1.0");
  274. poti_DefineEntityValue("Po", "S", "PushingOutput", "0.1 1.0 1.0");
  275. poti_DefineEntityValue("C", "S", "Callback", ".0 .3 .8");
  276. poti_DefineEntityValue("B", "S", "Overhead", ".5 .18 .0");
  277. poti_DefineEntityValue("E", "S", "Executing", ".0 .6 .5");
  278. poti_DefineEntityValue("Sc", "S", "Scheduling", ".7 .36 .0");
  279. poti_DefineEntityValue("Sl", "S", "Sleeping", ".9 .1 .0");
  280. poti_DefineEntityValue("P", "S", "Progressing", ".1 .3 .1");
  281. poti_DefineEntityValue("U", "S", "Unpartitioning", ".0 .0 1.0");
  282. poti_DefineEntityValue("H", "S", "Hypervisor", ".5 .18 .0");
  283. poti_DefineEntityValue("Bu", "S", "Building task", ".5 .18 .0");
  284. poti_DefineEntityValue("Su", "S", "Submitting task", ".3 .09 .0");
  285. poti_DefineEntityValue("Th", "S", "Throttling task submission", ".8 .6 .6");
  286. poti_DefineEntityValue("MD", "S", "Decoding task for MPI", ".5 .18 .2");
  287. poti_DefineEntityValue("MPr", "S", "Preparing task for MPI", ".4 .14 .2");
  288. poti_DefineEntityValue("MPo", "S", "Post-processing task for MPI", ".3 .09 .2");
  289. poti_DefineStateType("WS", "W", "Worker State");
  290. poti_DefineEntityValue("I", "WS", "Idle", ".9 .1 .0");
  291. poti_DefineEntityValue("In", "WS", "Initializing", "0.0 .7 1.0");
  292. poti_DefineEntityValue("D", "WS", "Deinitializing", "0.0 .1 .7");
  293. poti_DefineEntityValue("Fi", "WS", "FetchingInput", "1.0 .1 1.0");
  294. poti_DefineEntityValue("Po", "WS", "PushingOutput", "0.1 1.0 1.0");
  295. poti_DefineEntityValue("C", "WS", "Callback", ".0 .3 .8");
  296. poti_DefineEntityValue("B", "WS", "Overhead", ".5 .18 .0");
  297. poti_DefineEntityValue("E", "WS", "Executing", ".0 .6 .5");
  298. poti_DefineEntityValue("Sc", "WS", "Scheduling", ".7 .36 .0");
  299. poti_DefineEntityValue("Sl", "WS", "Sleeping", ".9 .1 .0");
  300. poti_DefineEntityValue("P", "WS", "Progressing", ".1 .3 .1");
  301. poti_DefineEntityValue("U", "WS", "Unpartitioning", ".0 .0 1.0");
  302. poti_DefineEntityValue("H", "WS", "Hypervisor", ".5 .18 .0");
  303. poti_DefineEntityValue("Bu", "WS", "Building task", ".5 .18 .0");
  304. poti_DefineEntityValue("Su", "WS", "Submitting task", ".3 .09 .0");
  305. poti_DefineEntityValue("Th", "WS", "Throttling task submission", ".8 .6 .6");
  306. /* Types for the MPI Communication Thread of the Memory Node */
  307. poti_DefineEventType("MPIev", "MPICt", "MPI event type");
  308. poti_DefineVariableType("bwi_mpi", "MPICt", "Bandwidth In (MB/s)", "0 0 0");
  309. poti_DefineVariableType("bwo_mpi", "MPICt", "Bandwidth Out (MB/s)", "0 0 0");
  310. poti_DefineStateType("CtS", "MPICt", "Communication Thread State");
  311. poti_DefineEntityValue("P", "CtS", "Processing", "0 0 0");
  312. poti_DefineEntityValue("Pl", "CtS", "Polling", "1.0 .5 0");
  313. poti_DefineEntityValue("Dr", "CtS", "DriverRun", ".1 .1 1.0");
  314. poti_DefineEntityValue("Sl", "CtS", "Sleeping", ".9 .1 .0");
  315. poti_DefineEntityValue("UT", "CtS", "UserTesting", ".2 .1 .6");
  316. poti_DefineEntityValue("UW", "CtS", "UserWaiting", ".4 .1 .3");
  317. poti_DefineEntityValue("SdS", "CtS", "SendSubmitted", "1.0 .1 1.0");
  318. poti_DefineEntityValue("RvS", "CtS", "ReceiveSubmitted", "0.1 1.0 1.0");
  319. poti_DefineEntityValue("SdC", "CtS", "SendCompleted", "1.0 .5 1.0");
  320. poti_DefineEntityValue("RvC", "CtS", "ReceiveCompleted", "0.5 1.0 1.0");
  321. poti_DefineEntityValue("TD", "CtS", "Testing Detached", ".0 .0 .6");
  322. poti_DefineEntityValue("MT", "CtS", "MPI Test", ".0 .0 .8");
  323. poti_DefineEntityValue("Bu", "CtS", "Building task", ".5 .18 .0");
  324. poti_DefineEntityValue("Su", "CtS", "Submitting task", ".3 .09 .0");
  325. poti_DefineEntityValue("Th", "CtS", "Throttling task submission", ".8 .6 .6");
  326. poti_DefineEntityValue("C", "CtS", "Callback", ".0 .3 .8");
  327. /* Type for other threads */
  328. poti_DefineEventType("user_user_event", "UT", "user event type");
  329. poti_DefineEventType("user_thread_event", "UT", "thread event type");
  330. poti_DefineStateType("US", "UT", "User Thread State");
  331. poti_DefineEntityValue("Bu", "US", "Building task", ".5 .18 .0");
  332. poti_DefineEntityValue("Su", "US", "Submitting task", ".3 .09 .0");
  333. poti_DefineEntityValue("C", "US", "Callback", ".0 .3 .8");
  334. poti_DefineEntityValue("Th", "US", "Throttling task submission", ".8 .6 .6");
  335. poti_DefineEntityValue("MD", "US", "Decoding task for MPI", ".5 .18 .2");
  336. poti_DefineEntityValue("MPr", "US", "Preparing task for MPI", ".4 .14 .2");
  337. poti_DefineEntityValue("MPo", "US", "Post-processing task for MPI", ".3 .09 .2");
  338. poti_DefineEntityValue("W", "US", "Waiting task", ".9 .1 .0");
  339. poti_DefineEntityValue("WA", "US", "Waiting all tasks", ".9 .1 .0");
  340. poti_DefineEntityValue("No", "US", "Nothing", ".0 .0 .0");
  341. for (i=1; i<STARPU_NMAX_SCHED_CTXS; i++)
  342. {
  343. char inctx[10];
  344. snprintf(inctx, sizeof(inctx), "InCtx%u", i);
  345. char *ctx = inctx+2;
  346. poti_DefineStateType(ctx, "W", inctx);
  347. poti_DefineEntityValue("I", ctx, "Idle", ".9 .1 .0");
  348. poti_DefineEntityValue("In", ctx, "Initializing", "0.0 .7 1.0");
  349. poti_DefineEntityValue("D", ctx, "Deinitializing", "0.0 .1 .7");
  350. poti_DefineEntityValue("Fi", ctx, "FetchingInput", "1.0 .1 1.0");
  351. poti_DefineEntityValue("Po", ctx, "PushingOutput", "0.1 1.0 1.0");
  352. poti_DefineEntityValue("C", ctx, "Callback", ".0 .3 .8");
  353. poti_DefineEntityValue("B", ctx, "Overhead", ".5 .18 .0");
  354. poti_DefineEntityValue("E", ctx, "Executing", ".0 .6 .5");
  355. poti_DefineEntityValue("Sc", ctx, "Scheduling", ".7 .36 .0");
  356. poti_DefineEntityValue("Sl", ctx, "Sleeping", ".9 .1 .0");
  357. poti_DefineEntityValue("P", ctx, "Progressing", ".1 .3 .1");
  358. poti_DefineEntityValue("U", ctx, "Unpartitioning", ".0 .0 1.0");
  359. poti_DefineEntityValue("H", ctx, "Hypervisor", ".5 .18 .0");
  360. }
  361. /* Types for the Scheduler */
  362. poti_DefineVariableType("nsubmitted", "Sc", "Number of Submitted Uncompleted Tasks", "0 0 0");
  363. poti_DefineVariableType("nready", "Sc", "Number of Ready Tasks", "0 0 0");
  364. poti_DefineVariableType("gft", "Sc", "Total GFlops", "0 0 0");
  365. /* Link types */
  366. poti_DefineLinkType("MPIL", "MPIP", "MPICt", "MPICt", "MPI communication");
  367. poti_DefineLinkType("F", "P", "Mm", "Mm", "Intra-node data Fetch");
  368. poti_DefineLinkType("PF", "P", "Mm", "Mm", "Intra-node data PreFetch");
  369. poti_DefineLinkType("IF", "P", "Mm", "Mm", "Intra-node data IdleFetch");
  370. poti_DefineLinkType("WSL", "P", "W", "W", "Work steal");
  371. /* Creating the MPI Program */
  372. poti_CreateContainer(0, "MPIroot", "MPIP", "0", "root");
  373. #else
  374. fprintf(file, " \n\
  375. 1 MPIP 0 \"MPI Program\" \n\
  376. 1 P MPIP \"Program\" \n\
  377. 1 Mn P \"Memory Node\" \n\
  378. 1 T Mn \"Thread\" \n\
  379. 1 UT P \"User Thread\" \n\
  380. 1 Mm Mn \"Memory Manager\" \n\
  381. 1 W T \"Worker\" \n\
  382. 1 MPICt P \"MPI Communication Thread\" \n\
  383. 1 Sc P \"Scheduler State\" \n\
  384. 2 prog_event P \"program event type\" \n\
  385. 2 register P \"data registration\" \n\
  386. 2 unregister P \"data unregistration\" \n\
  387. 2 user_event P \"user event type\" \n\
  388. 2 thread_event T \"thread event type\" \n\
  389. 2 user_user_event UT \"user event type\" \n\
  390. 2 user_thread_event UT \"thread event type\" \n\
  391. 2 MPIev MPICt \"MPI event type\" \n\
  392. 3 S T \"Thread State\" \n\
  393. 3 CtS MPICt \"Communication Thread State\" \n");
  394. for (i=1; i<STARPU_NMAX_SCHED_CTXS; i++)
  395. fprintf(file, "3 Ctx%u W \"InCtx%u\" \n", i, i);
  396. fprintf(file, "\
  397. 2 SI Mm \"data state invalid\" \n\
  398. 2 SS Mm \"data state shared\" \n\
  399. 2 SO Mm \"data state owner\" \n\
  400. 2 WU Mm \"data wont use\" \n\
  401. 2 Al Mm \"Allocating Start\" \n\
  402. 2 AlE Mm \"Allocating End\" \n\
  403. 2 Alr Mm \"Allocating Async Start\" \n\
  404. 2 AlrE Mm \"Allocating Async End\" \n\
  405. 2 Fe Mm \"Free Start\" \n\
  406. 2 FeE Mm \"Free End\" \n\
  407. 2 Wb Mm \"WritingBack Start\" \n\
  408. 2 WbE Mm \"WritingBack End\" \n\
  409. 2 DCo Mm \"DriverCopy Start\" \n\
  410. 2 DCoE Mm \"DriverCopy End\" \n\
  411. 2 DCoA Mm \"DriverCopyAsync Start\" \n\
  412. 2 DCoAE Mm \"DriverCopyAsync End\" \n\
  413. 3 MS Mm \"Memory Node State\" \n\
  414. 4 nsubmitted Sc \"Number of Submitted Uncompleted Tasks\" \n\
  415. 4 nready Sc \"Number of Ready Tasks\" \n\
  416. 4 gft Sc \"Total GFlops\" \n\
  417. 4 use Mm \"Used (MB)\" \n\
  418. 4 bwi_mm Mm \"Bandwidth In (MB/s)\" \n\
  419. 4 bwo_mm Mm \"Bandwidth Out (MB/s)\" \n\
  420. 4 bwi_mpi MPICt \"Bandwidth In (MB/s)\" \n\
  421. 4 bwo_mpi MPICt \"Bandwidth Out (MB/s)\" \n\
  422. 4 gf W \"GFlops\" \n\
  423. 6 I S Idle \".9 .1 .0\" \n\
  424. 6 In S Initializing \"0.0 .7 1.0\" \n\
  425. 6 D S Deinitializing \"0.0 .1 .7\" \n\
  426. 6 Fi S FetchingInput \"1.0 .1 1.0\" \n\
  427. 6 Po S PushingOutput \"0.1 1.0 1.0\" \n\
  428. 6 C S Callback \".0 .3 .8\" \n\
  429. 6 B S Overhead \".5 .18 .0\" \n\
  430. 6 E S Executing \".0 .6 .5\" \n\
  431. 6 Sc S Scheduling \".7 .36 .0\" \n\
  432. 6 Sl S Sleeping \".9 .1 .0\" \n\
  433. 6 P S Progressing \".1 .3 .1\" \n\
  434. 6 U S Unpartitioning \".0 .0 1.0\" \n\
  435. 6 H S Hypervisor \".5 .18 .0\" \n\
  436. 6 Bu S \"Building task\" \".5 .18 .0\" \n\
  437. 6 Su S \"Submitting task\" \".3 .09 .0\" \n\
  438. 6 Th S \"Throttling task submission\" \".8 .6 .6\" \n\
  439. 6 MD S \"Decoding task for MPI\" \".5 .18 .2\" \n\
  440. 6 MPr S \"Preparing task for MPI\" \".4 .14 .2\" \n\
  441. 6 MPo S \"Post-processing task for MPI\" \".3 .09 .2\" \n\
  442. 3 WS W \"Worker State\" \n\
  443. 6 I WS Idle \".9 .1 .0\" \n\
  444. 6 In WS Initializing \"0.0 .7 1.0\" \n\
  445. 6 D WS Deinitializing \"0.0 .1 .7\" \n\
  446. 6 Fi WS FetchingInput \"1.0 .1 1.0\" \n\
  447. 6 Po WS PushingOutput \"0.1 1.0 1.0\" \n\
  448. 6 C WS Callback \".0 .3 .8\" \n\
  449. 6 B WS Overhead \".5 .18 .0\" \n\
  450. 6 E WS Executing \".0 .6 .5\" \n\
  451. 6 Sc WS Scheduling \".7 .36 .0\" \n\
  452. 6 Sl WS Sleeping \".9 .1 .0\" \n\
  453. 6 P WS Progressing \".1 .3 .1\" \n\
  454. 6 U WS Unpartitioning \".0 .0 1.0\" \n\
  455. 6 H WS Hypervisor \".5 .18 .0\" \n\
  456. 6 Bu WS \"Building task\" \".5 .18 .0\" \n\
  457. 6 Su WS \"Submitting task\" \".3 .09 .0\" \n\
  458. 6 Th WS \"Throttling task submission\" \".8 .6 .6\" \n\
  459. 3 US UT \"User Thread State\" \n\
  460. 6 Bu US \"Building task\" \".5 .18 .0\" \n\
  461. 6 Su US \"Submitting task\" \".3 .09 .0\" \n\
  462. 6 C US \"Callback\" \".0 .3 .8\" \n\
  463. 6 Th US \"Throttling task submission\" \".8 .6 .6\" \n\
  464. 6 MD US \"Decoding task for MPI\" \".5 .18 .2\" \n\
  465. 6 MPr US \"Preparing task for MPI\" \".4 .14 .2\" \n\
  466. 6 MPo US \"Post-processing task for MPI\" \".3 .09 .2\" \n\
  467. 6 W US \"Waiting task\" \".9 .1 .0\" \n\
  468. 6 WA US \"Waiting all tasks\" \".9 .1 .0\" \n\
  469. 6 No US Nothing \".0 .0 .0\" \n\
  470. ");
  471. fprintf(file, "\
  472. 6 P CtS Processing \"0 0 0\" \n\
  473. 6 Pl CtS Polling \"1.0 .5 0\" \n\
  474. 6 Dr CtS DriverRun \".1 .1 1.0\" \n\
  475. 6 Sl CtS Sleeping \".9 .1 .0\" \n\
  476. 6 UT CtS UserTesting \".2 .1 .6\" \n\
  477. 6 UW CtS UserWaiting \".4 .1 .3\" \n\
  478. 6 SdS CtS SendSubmitted \"1.0 .1 1.0\" \n\
  479. 6 RvS CtS ReceiveSubmitted \"0.1 1.0 1.0\" \n\
  480. 6 SdC CtS SendCompleted \"1.0 .5 1.0\" \n\
  481. 6 RvC CtS ReceiveCompleted \"0.5 1.0 1.0\" \n\
  482. 6 TD CtS \"Testing Detached\" \".0 .0 .6\" \n\
  483. 6 MT CtS \"MPI Test\" \".0 .0 .8\" \n\
  484. 6 Bu CtS \"Building task\" \".5 .18 .0\" \n\
  485. 6 Su CtS \"Submitting task\" \".3 .09 .0\" \n\
  486. 6 Th CtS \"Throttling task submission\" \".8 .6 .6\" \n\
  487. 6 C CtS \"Callback\" \".0 .3 .8\" \n\
  488. ");
  489. for (i=1; i<STARPU_NMAX_SCHED_CTXS; i++)
  490. fprintf(file, "\
  491. 6 I Ctx%u Idle \".9 .1 .0\" \n\
  492. 6 In Ctx%u Initializing \"0.0 .7 1.0\" \n\
  493. 6 D Ctx%u Deinitializing \"0.0 .1 .7\" \n\
  494. 6 Fi Ctx%u FetchingInput \"1.0 .1 1.0\" \n\
  495. 6 Po Ctx%u PushingOutput \"0.1 1.0 1.0\" \n\
  496. 6 C Ctx%u Callback \".0 .3 .8\" \n\
  497. 6 B Ctx%u Overhead \".5 .18 .0\" \n\
  498. 6 E Ctx%u Executing \".0 .6 .5\" \n\
  499. 6 Sc Ctx%u Scheduling \".7 .36 .0\" \n\
  500. 6 Sl Ctx%u Sleeping \".9 .1 .0\" \n\
  501. 6 P Ctx%u Progressing \".1 .3 .1\" \n\
  502. 6 U Ctx%u Unpartitioning \".0 .0 1.0\" \n\
  503. 6 H Ctx%u Hypervisor \".5 .18 .0\" \n",
  504. i, i, i, i, i, i, i, i, i, i, i, i, i);
  505. fprintf(file, "\
  506. 6 A MS Allocating \".4 .1 .0\" \n\
  507. 6 Ar MS AllocatingReuse \".1 .1 .8\" \n\
  508. 6 F MS Freeing \".6 .3 .0\" \n\
  509. 6 W MS WritingBack \".0 .0 .5\" \n\
  510. 6 Wa MS WritingBackAsync \".0 .0 .4\" \n\
  511. 6 R MS Reclaiming \".0 .1 .6\" \n\
  512. 6 Co MS DriverCopy \".3 .5 .1\" \n\
  513. 6 CoA MS DriverCopyAsync \".1 .3 .1\" \n\
  514. 6 No MS Nothing \".0 .0 .0\" \n\
  515. 5 MPIL MPIP MPICt MPICt \"MPI communication\"\n\
  516. 5 F P Mm Mm \"Intra-node data Fetch\"\n\
  517. 5 PF P Mm Mm \"Intra-node data PreFetch\"\n\
  518. 5 IF P Mm Mm \"Intra-node data IdleFetch\"\n\
  519. 5 WSL P W W \"Work steal\"\n");
  520. fprintf(file, "7 0.0 MPIroot MPIP 0 root\n");
  521. #endif
  522. }
  523. #endif