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-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 __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_cond_t posted_cond;
61 
62  MPI_Request size_req;
63 
64  struct _starpu_mpi_envelope* envelope;
65 
66  unsigned is_internal_req:1;
67  unsigned to_destroy:1;
68  struct _starpu_mpi_req *internal_req;
69  struct _starpu_mpi_early_data_handle *early_data_handle;
70  UT_hash_handle hh;
71 };
72 
73 #endif // STARPU_USE_MPI_MPI
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif // __STARPU_MPI_MPI_BACKEND_H__
Definition: starpu_mpi_early_data.h:37
Definition: starpu_mpi_mpi_backend.h:44
struct _starpu_mpi_req * other_request
Definition: starpu_mpi_mpi_backend.h:60
Definition: starpu_mpi_mpi_backend.h:52
Definition: starpu_mpi_private.h:217
Definition: uthash.h:1015