fxt_tool.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #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 "histo_paje.h"
  29. #define MAXWORKERS 32
  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, char *color);
  35. void set_next_other_worker_color(int workerid);
  36. void set_next_cpu_worker_color(int workerid);
  37. void set_next_cuda_worker_color(int workerid);
  38. const char *get_worker_color(int workerid);
  39. unsigned get_colour_symbol_red(char *name);
  40. unsigned get_colour_symbol_green(char *name);
  41. unsigned get_colour_symbol_blue(char *name);
  42. void reinit_colors(void);
  43. /*
  44. * MPI
  45. */
  46. int find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
  47. uint64_t find_start_time(char *filename_in);
  48. struct mpi_transfer {
  49. unsigned matched;
  50. int other_rank; /* src for a recv, dest for a send */
  51. int mpi_tag;
  52. size_t size;
  53. float date;
  54. };
  55. void add_mpi_send_transfer(int src, int dst, int mpi_tag, size_t size, float date);
  56. void add_mpi_recv_transfer(int src, int dst, int mpi_tag, float date);
  57. #endif // __FXT_TOOL_H__