fxt-tool.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #include "fxt-tool.h"
  17. /*
  18. * Default user options
  19. */
  20. static unsigned per_task_colour = 0;
  21. static unsigned generate_distrib = 0;
  22. static unsigned no_counter = 0;
  23. static unsigned no_bus = 0;
  24. /* TODO don't make that global ? */
  25. struct fxt_ev_64 ev;
  26. static uint64_t start_time = 0;
  27. static uint64_t end_time = 0;
  28. static int nworkers = 0;
  29. static char *filename = NULL;
  30. LIST_TYPE(symbol_name,
  31. char *name;
  32. );
  33. static symbol_name_list_t symbol_list;
  34. LIST_TYPE(communication,
  35. unsigned comid;
  36. float comm_start;
  37. float bandwith;
  38. unsigned node;
  39. );
  40. static communication_list_t communication_list;
  41. /*
  42. * Paje trace file tools
  43. */
  44. static char *out_paje_path = "paje.trace";
  45. static FILE *out_paje_file;
  46. static char *distrib_time_path = "distrib.data";
  47. static FILE *distrib_time;
  48. static void paje_output_file_init(void)
  49. {
  50. /* create a new file */
  51. out_paje_file = fopen(out_paje_path, "w+");
  52. write_paje_header(out_paje_file);
  53. fprintf(out_paje_file, " \n \
  54. 1 P 0 \"Program\" \n \
  55. 1 Mn P \"Memory Node\" \n \
  56. 1 T Mn \"Worker\" \n \
  57. 1 Sc P \"Scheduler State\" \n \
  58. 2 event T \"event type\" \n \
  59. 3 S T \"Thread State\" \n \
  60. 3 MS Mn \"Memory Node State\" \n \
  61. 4 ntask Sc \"Number of tasks\" \n \
  62. 4 bw Mn \"Bandwith\" \n \
  63. 6 I S Initializing \"0.0 .7 1.0\" \n \
  64. 6 D S Deinitializing \"0.0 .1 .7\" \n \
  65. 6 Fi S FetchingInput \"1.0 .1 1.0\" \n \
  66. 6 Po S PushingOutput \"0.1 1.0 1.0\" \n \
  67. 6 E S Executing \".0 .6 .4\" \n \
  68. 6 C S Callback \".0 .3 .8\" \n \
  69. 6 B S Blocked \".9 .1 .0\" \n \
  70. 6 P S Progressing \".4 .1 .6\" \n \
  71. 6 A MS Allocating \".4 .1 .0\" \n \
  72. 6 Ar MS AllocatingReuse \".1 .1 .8\" \n \
  73. 6 R MS Reclaiming \".0 .1 .4\" \n \
  74. 6 Co MS DriverCopy \".3 .5 .1\" \n \
  75. 6 No MS Nothing \".0 .0 .0\" \n \
  76. 5 L P Mn Mn L\n");
  77. }
  78. /*
  79. * Generic tools
  80. */
  81. static float get_event_time_stamp(void)
  82. {
  83. return (float)((ev.time-start_time)/1000000.0);
  84. }
  85. static int register_worker_id(unsigned long tid)
  86. {
  87. int workerid = nworkers++;
  88. /* create a new key in the htable */
  89. char *tidstr = malloc(16*sizeof(char));
  90. sprintf(tidstr, "%ld", tid);
  91. ENTRY item;
  92. item.key = tidstr;
  93. item.data = (void *)(uintptr_t)workerid;
  94. ENTRY *res;
  95. res = hsearch(item, FIND);
  96. /* only register a thread once */
  97. STARPU_ASSERT(res == NULL);
  98. res = hsearch(item, ENTER);
  99. STARPU_ASSERT(res);
  100. return workerid;
  101. }
  102. static int find_worker_id(unsigned long tid)
  103. {
  104. char tidstr[16];
  105. sprintf(tidstr, "%ld", tid);
  106. ENTRY item;
  107. item.key = tidstr;
  108. item.data = NULL;
  109. ENTRY *res;
  110. res = hsearch(item, FIND);
  111. if (!res)
  112. return -1;
  113. int id = (uintptr_t)(res->data);
  114. return id;
  115. }
  116. /*
  117. * Initialization
  118. */
  119. static void handle_new_mem_node(void)
  120. {
  121. fprintf(out_paje_file, "7 %f %ld Mn p MEMNODE%ld\n", get_event_time_stamp(), ev.param[0], ev.param[0]);
  122. if (!no_bus)
  123. fprintf(out_paje_file, "13 %f bw MEMNODE%d 0.0\n", 0.0f, ev.param[0]);
  124. }
  125. static void handle_worker_init_start(void)
  126. {
  127. /*
  128. arg0 : type of worker (cuda, core ..)
  129. arg1 : memory node
  130. arg2 : thread id
  131. */
  132. fprintf(out_paje_file, "7 %f %ld T MEMNODE%ld %ld\n",
  133. get_event_time_stamp(), ev.param[2], ev.param[1], ev.param[2]);
  134. int workerid = register_worker_id(ev.param[2]);
  135. switch (ev.param[0]) {
  136. case FUT_APPS_KEY:
  137. set_next_other_worker_color(workerid);
  138. break;
  139. case FUT_CORE_KEY:
  140. set_next_cpu_worker_color(workerid);
  141. break;
  142. case FUT_CUDA_KEY:
  143. set_next_cuda_worker_color(workerid);
  144. break;
  145. default:
  146. STARPU_ABORT();
  147. }
  148. /* start initialization */
  149. fprintf(out_paje_file, "10 %f S %ld I\n",
  150. get_event_time_stamp(), ev.param[2]);
  151. }
  152. static void handle_worker_init_end(void)
  153. {
  154. fprintf(out_paje_file, "10 %f S %ld B\n",
  155. get_event_time_stamp(), ev.param[0]);
  156. }
  157. static void handle_worker_deinit_start(void)
  158. {
  159. fprintf(out_paje_file, "10 %f S %ld D\n",
  160. get_event_time_stamp(), ev.param[0]);
  161. }
  162. static void handle_worker_deinit_end(void)
  163. {
  164. fprintf(out_paje_file, "8 %f %ld T\n",
  165. get_event_time_stamp(), ev.param[1]);
  166. }
  167. static void create_paje_state_if_not_found(char *name)
  168. {
  169. symbol_name_itor_t itor;
  170. for (itor = symbol_name_list_begin(symbol_list);
  171. itor != symbol_name_list_end(symbol_list);
  172. itor = symbol_name_list_next(itor))
  173. {
  174. if (!strcmp(name, itor->name))
  175. {
  176. /* we found an entry */
  177. return;
  178. }
  179. }
  180. /* it's the first time ... */
  181. symbol_name_t entry = symbol_name_new();
  182. entry->name = malloc(strlen(name));
  183. strcpy(entry->name, name);
  184. symbol_name_list_push_front(symbol_list, entry);
  185. /* choose some colour ... that's disguting yes */
  186. unsigned hash_symbol_red = get_colour_symbol_red(name);
  187. unsigned hash_symbol_green = get_colour_symbol_green(name);
  188. unsigned hash_symbol_blue = get_colour_symbol_blue(name);
  189. fprintf(stderr, "name %s hash red %d green %d blue %d \n", name, hash_symbol_red, hash_symbol_green, hash_symbol_blue);
  190. uint32_t hash_sum = hash_symbol_red + hash_symbol_green + hash_symbol_blue;
  191. float red = (1.0f * hash_symbol_red) / hash_sum;
  192. float green = (1.0f * hash_symbol_green) / hash_sum;
  193. float blue = (1.0f * hash_symbol_blue) / hash_sum;
  194. /* create the Paje state */
  195. fprintf(out_paje_file, "6 %s S %s \"%f %f %f\" \n", name, red, green, blue, name);
  196. }
  197. static double last_codelet_start[MAXWORKERS];
  198. static uint64_t last_codelet_hash[MAXWORKERS];
  199. static char last_codelet_symbol[128][MAXWORKERS];
  200. static void handle_start_codelet_body(void)
  201. {
  202. int worker;
  203. worker = find_worker_id(ev.param[1]);
  204. if (worker < 0) return;
  205. unsigned long has_name = ev.param[2];
  206. char *name = has_name?(char *)&ev.param[3]:"unknown";
  207. snprintf(last_codelet_symbol[worker], 128, "%s", name);
  208. /* TODO */
  209. last_codelet_hash[worker] = 0;
  210. float start_codelet_time = get_event_time_stamp();
  211. last_codelet_start[worker] = start_codelet_time;
  212. if (per_task_colour)
  213. {
  214. create_paje_state_if_not_found(name);
  215. fprintf(out_paje_file, "101 %f S %ld E %s\n", start_codelet_time, ev.param[1], name);
  216. }
  217. else {
  218. fprintf(out_paje_file, "10 %f S %ld E\n", start_codelet_time, ev.param[1]);
  219. }
  220. end_time = STARPU_MAX(end_time, ev.time);
  221. }
  222. static void handle_end_codelet_body(void)
  223. {
  224. int worker;
  225. worker = find_worker_id(ev.param[1]);
  226. if (worker < 0) return;
  227. float end_codelet_time = get_event_time_stamp();
  228. fprintf(out_paje_file, "10 %f S %ld B\n", end_codelet_time, ev.param[1] );
  229. float codelet_length = (end_codelet_time - last_codelet_start[worker]);
  230. if (generate_distrib)
  231. fprintf(distrib_time, "%s\t%d\t%lx\t%f\n", last_codelet_symbol[worker],
  232. worker, last_codelet_hash[worker], codelet_length);
  233. end_time = STARPU_MAX(end_time, ev.time);
  234. }
  235. static void handle_user_event(void)
  236. {
  237. int worker;
  238. worker = find_worker_id(ev.param[1]);
  239. if (worker < 0) return;
  240. unsigned code;
  241. code = ev.param[2];
  242. fprintf(out_paje_file, "9 %f event %ld %d\n", get_event_time_stamp(), ev.param[1], code);
  243. }
  244. static void handle_start_callback(void)
  245. {
  246. int worker;
  247. worker = find_worker_id(ev.param[1]);
  248. if (worker < 0) return;
  249. fprintf(out_paje_file, "10 %f S %ld C\n", get_event_time_stamp(), ev.param[1] );
  250. }
  251. static void handle_end_callback(void)
  252. {
  253. int worker;
  254. worker = find_worker_id(ev.param[1]);
  255. if (worker < 0) return;
  256. fprintf(out_paje_file, "10 %f S %ld B\n", get_event_time_stamp(), ev.param[1] );
  257. }
  258. static void handle_worker_status(const char *newstatus)
  259. {
  260. int worker;
  261. worker = find_worker_id(ev.param[1]);
  262. if (worker < 0) return;
  263. fprintf(out_paje_file, "10 %f S %ld %s\n",
  264. get_event_time_stamp(), ev.param[1], newstatus);
  265. end_time = STARPU_MAX(end_time, ev.time);
  266. }
  267. static void handle_data_copy(void)
  268. {
  269. }
  270. static void handle_start_driver_copy(void)
  271. {
  272. unsigned src = ev.param[0];
  273. unsigned dst = ev.param[1];
  274. unsigned size = ev.param[2];
  275. unsigned comid = ev.param[3];
  276. if (!no_bus)
  277. {
  278. fprintf(out_paje_file, "10 %f MS MEMNODE%d Co\n", get_event_time_stamp(), dst);
  279. fprintf(out_paje_file, "18 %f L p %d MEMNODE%d com_%d\n", get_event_time_stamp(), size, src, comid);
  280. /* create a structure to store the start of the communication, this will be matched later */
  281. communication_t com = communication_new();
  282. com->comid = comid;
  283. com->comm_start = get_event_time_stamp();
  284. /* that's a hack: either src or dst is non null */
  285. com->node = (src + dst);
  286. communication_list_push_back(communication_list, com);
  287. }
  288. }
  289. static void handle_end_driver_copy(void)
  290. {
  291. unsigned dst = ev.param[1];
  292. unsigned size = ev.param[2];
  293. unsigned comid = ev.param[3];
  294. if (!no_bus)
  295. {
  296. fprintf(out_paje_file, "10 %f MS MEMNODE%d No\n", get_event_time_stamp(), dst);
  297. fprintf(out_paje_file, "19 %f L p %d MEMNODE%d com_%d\n", get_event_time_stamp(), size, dst, comid);
  298. /* look for a data transfer to match */
  299. communication_itor_t itor;
  300. for (itor = communication_list_begin(communication_list);
  301. itor != communication_list_end(communication_list);
  302. itor = communication_list_next(itor))
  303. {
  304. if (itor->comid == comid)
  305. {
  306. float comm_end = get_event_time_stamp();
  307. float bandwith = (float)((0.001*size)/(comm_end - itor->comm_start));
  308. itor->bandwith = bandwith;
  309. communication_t com = communication_new();
  310. com->comid = comid;
  311. com->comm_start = get_event_time_stamp();
  312. com->bandwith = -bandwith;
  313. com->node = itor->node;
  314. communication_list_push_back(communication_list, com);
  315. break;
  316. }
  317. }
  318. }
  319. }
  320. static void display_bandwith_evolution(void)
  321. {
  322. float current_bandwith = 0.0;
  323. float current_bandwith_per_node[32] = {0.0};
  324. communication_itor_t itor;
  325. for (itor = communication_list_begin(communication_list);
  326. itor != communication_list_end(communication_list);
  327. itor = communication_list_next(itor))
  328. {
  329. current_bandwith += itor->bandwith;
  330. fprintf(out_paje_file, "13 %f bw MEMNODE0 %f\n",
  331. itor->comm_start, current_bandwith);
  332. current_bandwith_per_node[itor->node] += itor->bandwith;
  333. fprintf(out_paje_file, "13 %f bw MEMNODE%d %f\n",
  334. itor->comm_start, itor->node, current_bandwith_per_node[itor->node]);
  335. }
  336. }
  337. static void handle_start_memnode_event(const char *eventstr)
  338. {
  339. unsigned memnode = ev.param[0];
  340. fprintf(out_paje_file, "10 %f MS MEMNODE%d %s\n", get_event_time_stamp(), memnode, eventstr);
  341. }
  342. static void handle_end_memnode_event(void)
  343. {
  344. unsigned memnode = ev.param[0];
  345. fprintf(out_paje_file, "10 %f MS MEMNODE%d No\n", get_event_time_stamp(), memnode);
  346. }
  347. /*
  348. * Number of task submitted to the scheduler
  349. */
  350. static int curq_size = 0;
  351. static void handle_job_push(void)
  352. {
  353. curq_size++;
  354. fprintf(out_paje_file, "13 %f ntask sched %f\n", get_event_time_stamp(), (float)curq_size);
  355. }
  356. static void handle_job_pop(void)
  357. {
  358. curq_size--;
  359. fprintf(out_paje_file, "13 %f ntask sched %f\n", get_event_time_stamp(), (float)curq_size);
  360. }
  361. static void handle_codelet_tag_deps(void)
  362. {
  363. uint64_t child;
  364. uint64_t father;
  365. child = ev.param[0];
  366. father = ev.param[1];
  367. add_deps(child, father);
  368. }
  369. static void handle_task_done(void)
  370. {
  371. uint64_t tag_id;
  372. tag_id = ev.param[0];
  373. unsigned long has_name = ev.param[2];
  374. char *name = has_name?(char *)&ev.param[3]:"unknown";
  375. int worker;
  376. worker = find_worker_id(ev.param[1]);
  377. char *colour;
  378. char buffer[32];
  379. if (per_task_colour) {
  380. snprintf(buffer, 32, "%.4f,%.4f,%.4f",
  381. get_colour_symbol_red(name)/1024.0,
  382. get_colour_symbol_green(name)/1024.0,
  383. get_colour_symbol_blue(name)/1024.0);
  384. colour = &buffer[0];
  385. }
  386. else {
  387. colour= (worker < 0)?"0.0,0.0,0.0":get_worker_color(worker);
  388. }
  389. dot_set_tag_done(tag_id, colour);
  390. }
  391. static void parse_args(int argc, char **argv)
  392. {
  393. int i;
  394. for (i = 1; i < argc; i++) {
  395. if (strcmp(argv[i], "-c") == 0) {
  396. per_task_colour = 1;
  397. }
  398. if (strcmp(argv[i], "-o") == 0) {
  399. out_paje_path = argv[++i];
  400. }
  401. if (strcmp(argv[i], "-i") == 0) {
  402. filename = argv[++i];
  403. }
  404. if (strcmp(argv[i], "-no-counter") == 0) {
  405. no_counter = 1;
  406. }
  407. if (strcmp(argv[i], "-no-bus") == 0) {
  408. no_bus = 1;
  409. }
  410. if (strcmp(argv[i], "-d") == 0) {
  411. generate_distrib = 1;
  412. }
  413. if (strcmp(argv[i], "-h") == 0) {
  414. fprintf(stderr, "Usage : %s [-c] [-no-counter] [-no-bus] [-i input_filename] [-o output_filename]\n", argv[0]);
  415. fprintf(stderr, "\t-c: use a different colour for every type of task.\n");
  416. exit(-1);
  417. }
  418. }
  419. }
  420. /*
  421. * This program should be used to parse the log generated by FxT
  422. */
  423. int main(int argc, char **argv)
  424. {
  425. int ret;
  426. int fd_in, fd_out;
  427. int use_stdout = 1;
  428. init_dag_dot();
  429. parse_args(argc, argv);
  430. fd_in = open(filename, O_RDONLY);
  431. if (fd_in < 0) {
  432. perror("open failed :");
  433. exit(-1);
  434. }
  435. static fxt_t fut;
  436. fut = fxt_fdopen(fd_in);
  437. if (!fut) {
  438. perror("fxt_fdopen :");
  439. exit(-1);
  440. }
  441. fxt_blockev_t block;
  442. block = fxt_blockev_enter(fut);
  443. /* create a htable to identify each worker(tid) */
  444. hcreate(MAXWORKERS);
  445. symbol_list = symbol_name_list_new();
  446. communication_list = communication_list_new();
  447. if (generate_distrib)
  448. distrib_time = fopen(distrib_time_path, "w+");
  449. paje_output_file_init();
  450. unsigned first_event = 1;
  451. while(1) {
  452. ret = fxt_next_ev(block, FXT_EV_TYPE_64, (struct fxt_ev *)&ev);
  453. if (ret != FXT_EV_OK) {
  454. fprintf(stderr, "no more block ...\n");
  455. break;
  456. }
  457. __attribute__ ((unused)) int nbparam = ev.nb_params;
  458. if (first_event)
  459. {
  460. first_event = 0;
  461. start_time = ev.time;
  462. /* create the "program" container */
  463. fprintf(out_paje_file, "7 %f p P 0 program \n", 0.0f);
  464. /* create a variable with the number of tasks */
  465. if (!no_counter)
  466. {
  467. fprintf(out_paje_file, "7 0.0 sched Sc p scheduler \n");
  468. fprintf(out_paje_file, "13 0.0 ntask sched 0.0\n");
  469. }
  470. }
  471. switch (ev.code) {
  472. case FUT_WORKER_INIT_START:
  473. handle_worker_init_start();
  474. break;
  475. case FUT_WORKER_INIT_END:
  476. handle_worker_init_end();
  477. break;
  478. case FUT_NEW_MEM_NODE:
  479. handle_new_mem_node();
  480. break;
  481. /* detect when the workers were idling or not */
  482. case FUT_START_CODELET_BODY:
  483. handle_start_codelet_body();
  484. break;
  485. case FUT_END_CODELET_BODY:
  486. handle_end_codelet_body();
  487. break;
  488. case FUT_START_CALLBACK:
  489. handle_start_callback();
  490. break;
  491. case FUT_END_CALLBACK:
  492. handle_end_callback();
  493. break;
  494. /* monitor stack size */
  495. case FUT_JOB_PUSH:
  496. if (!no_counter)
  497. handle_job_push();
  498. break;
  499. case FUT_JOB_POP:
  500. if (!no_counter)
  501. handle_job_pop();
  502. break;
  503. /* check the memory transfer overhead */
  504. case FUT_START_FETCH_INPUT:
  505. handle_worker_status("Fi");
  506. break;
  507. case FUT_START_PUSH_OUTPUT:
  508. handle_worker_status("Po");
  509. break;
  510. case FUT_START_PROGRESS:
  511. handle_worker_status("P");
  512. break;
  513. case FUT_END_FETCH_INPUT:
  514. case FUT_END_PROGRESS:
  515. case FUT_END_PUSH_OUTPUT:
  516. handle_worker_status("B");
  517. break;
  518. case FUT_CODELET_TAG:
  519. /* XXX */
  520. break;
  521. case FUT_CODELET_TAG_DEPS:
  522. handle_codelet_tag_deps();
  523. break;
  524. case FUT_TASK_DONE:
  525. handle_task_done();
  526. break;
  527. case FUT_DATA_COPY:
  528. if (!no_bus)
  529. handle_data_copy();
  530. break;
  531. case FUT_START_DRIVER_COPY:
  532. if (!no_bus)
  533. handle_start_driver_copy();
  534. break;
  535. case FUT_END_DRIVER_COPY:
  536. if (!no_bus)
  537. handle_end_driver_copy();
  538. break;
  539. case FUT_WORK_STEALING:
  540. /* XXX */
  541. break;
  542. case FUT_WORKER_DEINIT_START:
  543. handle_worker_deinit_start();
  544. break;
  545. case FUT_WORKER_DEINIT_END:
  546. handle_worker_deinit_end();
  547. break;
  548. case FUT_START_ALLOC:
  549. if (!no_bus)
  550. handle_start_memnode_event("A");
  551. break;
  552. case FUT_START_ALLOC_REUSE:
  553. if (!no_bus)
  554. handle_start_memnode_event("Ar");
  555. break;
  556. case FUT_START_MEMRECLAIM:
  557. handle_start_memnode_event("R");
  558. break;
  559. case FUT_END_ALLOC:
  560. case FUT_END_ALLOC_REUSE:
  561. case FUT_END_MEMRECLAIM:
  562. if (!no_bus)
  563. handle_end_memnode_event();
  564. break;
  565. case FUT_USER_EVENT:
  566. handle_user_event();
  567. break;
  568. default:
  569. fprintf(stderr, "unknown event.. %x at time %llx\n", (unsigned)ev.code, (long long unsigned)ev.time);
  570. break;
  571. }
  572. }
  573. display_bandwith_evolution();
  574. /* close the different files */
  575. fclose(out_paje_file);
  576. if (generate_distrib)
  577. fclose(distrib_time);
  578. terminate_dat_dot();
  579. return 0;
  580. }