starpu_fxt.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011-2012 Inria
  4. * Copyright (C) 2012,2017,2018 CNRS
  5. * Copyright (C) 2009-2012,2014-2017 Université de Bordeaux
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. #ifndef __STARPU__FXT_H__
  19. #define __STARPU__FXT_H__
  20. #include <starpu.h>
  21. #include <starpu_config.h>
  22. #include <common/config.h>
  23. #ifdef STARPU_USE_FXT
  24. #include <search.h>
  25. #include <sys/types.h>
  26. #include <sys/stat.h>
  27. #include <fcntl.h>
  28. #include <stdio.h>
  29. #include <stdint.h>
  30. #include <stdlib.h>
  31. #include <common/fxt.h>
  32. #include <common/list.h>
  33. #include "../mpi/src/starpu_mpi_fxt.h"
  34. #include <starpu.h>
  35. #include "../../../include/starpu_fxt.h"
  36. extern char _starpu_last_codelet_symbol[STARPU_NMAXWORKERS][(FXT_MAX_PARAMS-5)*sizeof(unsigned long)];
  37. void _starpu_fxt_dag_init(char *dag_filename);
  38. void _starpu_fxt_dag_terminate(void);
  39. void _starpu_fxt_dag_add_tag(const char *prefix, uint64_t tag, unsigned long job_id, const char *label);
  40. void _starpu_fxt_dag_add_tag_deps(const char *prefix, uint64_t child, uint64_t father, const char *label);
  41. void _starpu_fxt_dag_set_tag_done(const char *prefix, uint64_t tag, const char *color);
  42. void _starpu_fxt_dag_add_task_deps(const char *prefix, unsigned long dep_prev, unsigned long dep_succ, const char *label);
  43. void _starpu_fxt_dag_set_task_name(const char *prefix, unsigned long job_id, const char *label, const char *color);
  44. void _starpu_fxt_dag_add_send(int src, unsigned long dep_prev, unsigned long tag, unsigned long id);
  45. void _starpu_fxt_dag_add_receive(int dst, unsigned long dep_prev, unsigned long tag, unsigned long id);
  46. void _starpu_fxt_dag_add_sync_point(void);
  47. /*
  48. * MPI
  49. */
  50. int _starpu_fxt_mpi_find_sync_point(char *filename_in, uint64_t *offset, int *key, int *rank);
  51. void _starpu_fxt_mpi_add_send_transfer(int src, int dst, int mpi_tag, size_t size, float date, long jobid);
  52. void _starpu_fxt_mpi_add_recv_transfer(int src, int dst, int mpi_tag, float date, long jobid);
  53. void _starpu_fxt_display_mpi_transfers(struct starpu_fxt_options *options, int *ranks, FILE *out_paje_file);
  54. void _starpu_fxt_write_paje_header(FILE *file);
  55. extern int _starpu_poti_extendedSetState;
  56. extern int _starpu_poti_semiExtendedSetState;
  57. /*
  58. * Animation
  59. */
  60. void _starpu_fxt_component_print_header(FILE *output);
  61. void _starpu_fxt_component_new(uint64_t component, char *name);
  62. void _starpu_fxt_component_connect(uint64_t parent, uint64_t child);
  63. void _starpu_fxt_component_update_ntasks(unsigned nsubmitted, unsigned curq_size);
  64. void _starpu_fxt_component_push(FILE *output, struct starpu_fxt_options *options, double timestamp, int workerid, uint64_t from, uint64_t to, uint64_t task, unsigned prio);
  65. void _starpu_fxt_component_pull(FILE *output, struct starpu_fxt_options *options, double timestamp, int workerid, uint64_t from, uint64_t to, uint64_t task, unsigned prio);
  66. void _starpu_fxt_component_dump(FILE *output);
  67. void _starpu_fxt_component_finish(FILE *output);
  68. #endif // STARPU_USE_FXT
  69. #endif // __STARPU__FXT_H__