fxt_tool.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * StarPU
  3. * Copyright (C) Université Bordeaux 1, CNRS 2008-2010 (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. #ifndef __FXT_TOOL_H__
  17. #define __FXT_TOOL_H__
  18. #include <search.h>
  19. #include <sys/types.h>
  20. #include <sys/stat.h>
  21. #include <fcntl.h>
  22. #include <stdio.h>
  23. #include <stdint.h>
  24. #include <stdlib.h>
  25. #include <common/fxt.h>
  26. #include <common/list.h>
  27. #include <starpu_mpi_fxt.h>
  28. #include <starpu.h>
  29. #include "histo_paje.h"
  30. #define FACTOR 100
  31. extern void init_dag_dot(void);
  32. extern void terminate_dat_dot(void);
  33. extern void add_deps(uint64_t child, uint64_t father);
  34. extern void dot_set_tag_done(uint64_t tag, const char *color);
  35. extern void dot_set_task_done(unsigned long job_id, const char *label, const char *color);
  36. extern void dot_add_sync_point(void);
  37. void set_next_other_worker_color(int workerid);
  38. void set_next_cpu_worker_color(int workerid);
  39. void set_next_cuda_worker_color(int workerid);
  40. const char *get_worker_color(int workerid);
  41. unsigned get_colour_symbol_red(char *name);
  42. unsigned get_colour_symbol_green(char *name);
  43. unsigned get_colour_symbol_blue(char *name);
  44. void reinit_colors(void);
  45. /*
  46. * MPI
  47. */
  48. int find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
  49. uint64_t find_start_time(char *filename_in);
  50. struct mpi_transfer {
  51. unsigned matched;
  52. int other_rank; /* src for a recv, dest for a send */
  53. int mpi_tag;
  54. size_t size;
  55. float date;
  56. };
  57. void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float date);
  58. void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date);
  59. #endif // __FXT_TOOL_H__