StarPU Internal Handbook
starpu_mpi_mpi_backend.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2009-2020 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 __STARPU_MPI_MPI_BACKEND_H__
18 #define __STARPU_MPI_MPI_BACKEND_H__
19 
20 #include <common/config.h>
21 #include <common/uthash.h>
22 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 #ifdef STARPU_USE_MPI_MPI
31 
32 extern int _starpu_mpi_tag;
33 #define _STARPU_MPI_TAG_ENVELOPE _starpu_mpi_tag
34 #define _STARPU_MPI_TAG_DATA _starpu_mpi_tag+1
35 #define _STARPU_MPI_TAG_SYNC_DATA _starpu_mpi_tag+2
36 
37 enum _starpu_envelope_mode
38 {
39  _STARPU_MPI_ENVELOPE_DATA=0,
40  _STARPU_MPI_ENVELOPE_SYNC_READY=1
41 };
42 
44 {
45  enum _starpu_envelope_mode mode;
46  starpu_ssize_t size;
47  starpu_mpi_tag_t data_tag;
48  unsigned sync;
49 };
50 
52 {
53  MPI_Request data_request;
54 
55  starpu_pthread_mutex_t req_mutex;
56  starpu_pthread_cond_t req_cond;
57  starpu_pthread_mutex_t posted_mutex;
58  starpu_pthread_cond_t posted_cond;
62 
63  MPI_Request size_req;
64 
65  struct _starpu_mpi_envelope* envelope;
66 
67  unsigned is_internal_req:1;
68  unsigned to_destroy:1;
69  struct _starpu_mpi_req *internal_req;
70  struct _starpu_mpi_early_data_handle *early_data_handle;
71  UT_hash_handle hh;
72 };
73 
74 #endif // STARPU_USE_MPI_MPI
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif // __STARPU_MPI_MPI_BACKEND_H__
_starpu_mpi_req
Definition: starpu_mpi_private.h:217
UT_hash_handle
Definition: uthash.h:1015
_starpu_mpi_req_backend::other_request
struct _starpu_mpi_req * other_request
Definition: starpu_mpi_mpi_backend.h:61
_starpu_mpi_req_backend
Definition: starpu_mpi_mpi_backend.h:52
_starpu_mpi_early_data_handle
Definition: starpu_mpi_early_data.h:37
_starpu_mpi_envelope
Definition: starpu_mpi_mpi_backend.h:44
uthash.h