fxt_tool.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010 Université de Bordeaux 1
  4. * Copyright (C) 2010 Centre National de la Recherche Scientifique
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __FXT_TOOL_H__
  18. #define __FXT_TOOL_H__
  19. #include <search.h>
  20. #include <sys/types.h>
  21. #include <sys/stat.h>
  22. #include <fcntl.h>
  23. #include <stdio.h>
  24. #include <stdint.h>
  25. #include <stdlib.h>
  26. #include <common/fxt.h>
  27. #include <common/list.h>
  28. #include <starpu_mpi_fxt.h>
  29. #include <starpu.h>
  30. #include "histo_paje.h"
  31. #define FACTOR 100
  32. extern void init_dag_dot(void);
  33. extern void terminate_dat_dot(void);
  34. extern void add_deps(uint64_t child, uint64_t father);
  35. extern void dot_set_tag_done(uint64_t tag, const char *color);
  36. extern void dot_set_task_done(unsigned long job_id, const char *label, const char *color);
  37. extern void dot_add_sync_point(void);
  38. void set_next_other_worker_color(int workerid);
  39. void set_next_cpu_worker_color(int workerid);
  40. void set_next_cuda_worker_color(int workerid);
  41. const char *get_worker_color(int workerid);
  42. unsigned get_colour_symbol_red(char *name);
  43. unsigned get_colour_symbol_green(char *name);
  44. unsigned get_colour_symbol_blue(char *name);
  45. void reinit_colors(void);
  46. /*
  47. * MPI
  48. */
  49. int find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
  50. uint64_t find_start_time(char *filename_in);
  51. struct mpi_transfer {
  52. unsigned matched;
  53. int other_rank; /* src for a recv, dest for a send */
  54. int mpi_tag;
  55. size_t size;
  56. float date;
  57. };
  58. void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float date);
  59. void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date);
  60. #endif // __FXT_TOOL_H__