StarPU Internal Handbook
driver_mpi_common.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2016-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4  *
5  * StarPU 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  * StarPU 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 
17 #ifndef __DRIVER_MPI_COMMON_H__
18 #define __DRIVER_MPI_COMMON_H__
19 
24 
25 #ifdef STARPU_USE_MPI_MASTER_SLAVE
26 
27 #define SYNC_TAG 44
28 #define ASYNC_TAG 45
29 
30 int _starpu_mpi_common_mp_init();
31 void _starpu_mpi_common_mp_deinit();
32 
33 int _starpu_mpi_common_is_src_node();
34 int _starpu_mpi_common_get_src_node();
35 
36 int _starpu_mpi_common_is_mp_initialized();
37 int _starpu_mpi_common_recv_is_ready(const struct _starpu_mp_node *mp_node);
38 
39 void _starpu_mpi_common_mp_initialize_src_sink(struct _starpu_mp_node *node);
40 
41 void _starpu_mpi_common_send(const struct _starpu_mp_node *node, void *msg, int len, void * event);
42 void _starpu_mpi_common_recv(const struct _starpu_mp_node *node, void *msg, int len, void * event);
43 
44 void _starpu_mpi_common_mp_send(const struct _starpu_mp_node *node, void *msg, int len);
45 void _starpu_mpi_common_mp_recv(const struct _starpu_mp_node *node, void *msg, int len);
46 
47 void _starpu_mpi_common_recv_from_device(const struct _starpu_mp_node *node, int src_devid, void *msg, int len, void * event);
48 void _starpu_mpi_common_send_to_device(const struct _starpu_mp_node *node, int dst_devid, void *msg, int len, void * event);
49 
50 unsigned _starpu_mpi_common_test_event(struct _starpu_async_channel * event);
51 void _starpu_mpi_common_wait_request_completion(struct _starpu_async_channel * event);
52 
53 void _starpu_mpi_common_barrier(void);
54 
55 void _starpu_mpi_common_measure_bandwidth_latency(double bandwidth_dtod[STARPU_MAXMPIDEVS][STARPU_MAXMPIDEVS], double latency_dtod[STARPU_MAXMPIDEVS][STARPU_MAXMPIDEVS]);
56 
57 #endif /* STARPU_USE_MPI_MASTER_SLAVE */
58 
59 #endif /* __DRIVER_MPI_COMMON_H__ */
Definition: copy_driver.h:127