driver_mpi_common.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2015 Mathieu Lirzin <mthl@openmailbox.org>
  4. * Copyright (C) 2016 Inria
  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 __DRIVER_MPI_COMMON_H__
  18. #define __DRIVER_MPI_COMMON_H__
  19. #include <drivers/mp_common/mp_common.h>
  20. #include <drivers/mpi/driver_mpi_source.h>
  21. #ifdef STARPU_USE_MPI_MASTER_SLAVE
  22. #define SYNC_TAG 44
  23. #define ASYNC_TAG 45
  24. int _starpu_mpi_common_mp_init();
  25. void _starpu_mpi_common_mp_deinit();
  26. int _starpu_mpi_common_is_src_node();
  27. int _starpu_mpi_common_get_src_node();
  28. int _starpu_mpi_common_is_mp_initialized();
  29. int _starpu_mpi_common_recv_is_ready(const struct _starpu_mp_node *mp_node);
  30. void _starpu_mpi_common_mp_initialize_src_sink(struct _starpu_mp_node *node);
  31. void _starpu_mpi_common_send(const struct _starpu_mp_node *node, void *msg, int len, void * event);
  32. void _starpu_mpi_common_recv(const struct _starpu_mp_node *node, void *msg, int len, void * event);
  33. void _starpu_mpi_common_mp_send(const struct _starpu_mp_node *node, void *msg, int len);
  34. void _starpu_mpi_common_mp_recv(const struct _starpu_mp_node *node, void *msg, int len);
  35. void _starpu_mpi_common_recv_from_device(const struct _starpu_mp_node *node, int src_devid, void *msg, int len, void * event);
  36. void _starpu_mpi_common_send_to_device(const struct _starpu_mp_node *node, int dst_devid, void *msg, int len, void * event);
  37. int _starpu_mpi_common_test_event(struct _starpu_async_channel * event);
  38. void _starpu_mpi_common_wait_event(struct _starpu_async_channel * event);
  39. void _starpu_mpi_common_barrier(void);
  40. void _starpu_mpi_common_measure_bandwidth_latency(double bandwidth_dtod[STARPU_MAXMPIDEVS][STARPU_MAXMPIDEVS], double latency_dtod[STARPU_MAXMPIDEVS][STARPU_MAXMPIDEVS]);
  41. #endif /* STARPU_USE_MPI_MASTER_SLAVE */
  42. #endif /* __DRIVER_MPI_COMMON_H__ */