fxt_tool.h 2.0 KB

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