1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef MTL_PSM2_TYPES_H_HAS_BEEN_INCLUDED
25 #define MTL_PSM2_TYPES_H_HAS_BEEN_INCLUDED
26
27 #include "ompi_config.h"
28 #include "mtl_psm2.h"
29
30 #include "ompi/communicator/communicator.h"
31
32 #include "ompi/mca/mtl/mtl.h"
33 #include "ompi/mca/mtl/base/base.h"
34 #include "mtl_psm2_endpoint.h"
35
36 #include "psm2.h"
37
38
39 BEGIN_C_DECLS
40
41
42
43
44 struct mca_mtl_psm2_module_t {
45 mca_mtl_base_module_t super;
46
47 int32_t connect_timeout;
48
49 psm2_ep_t ep;
50 psm2_mq_t mq;
51 psm2_epid_t epid;
52 psm2_epaddr_t epaddr;
53 char *psm2_devices;
54 char *psm2_memory;
55 unsigned long psm2_mq_sendreqs_max;
56 unsigned long psm2_mq_recvreqs_max;
57 unsigned long psm2_mq_rndv_hfi_threshold;
58 unsigned long psm2_mq_rndv_shm_threshold;
59 unsigned long psm2_max_contexts_per_job;
60 unsigned long psm2_tracemask;
61 bool psm2_recvthread;
62 bool psm2_shared_contexts;
63 unsigned long psm2_opa_sl;
64 };
65
66 typedef struct mca_mtl_psm2_module_t mca_mtl_psm2_module_t;
67
68 extern mca_mtl_psm2_module_t ompi_mtl_psm2;
69
70 struct mca_mtl_psm2_component_t {
71 mca_mtl_base_component_2_0_0_t super;
72 };
73 typedef struct mca_mtl_psm2_component_t mca_mtl_psm2_component_t;
74
75 OMPI_DECLSPEC extern mca_mtl_psm2_component_t mca_mtl_psm2_component;
76
77 #define PSM2_MAKE_MQTAG(ctxt,rank,utag,tag) \
78 do { \
79 (tag).tag0 = utag; \
80 (tag).tag1 = rank; \
81 (tag).tag2 = ctxt; \
82 } while (0)
83
84 #define PSM2_MAKE_TAGSEL(user_rank, user_tag, user_ctxt, tag, _tagsel) \
85 do { \
86 (tag).tag0 = user_tag; \
87 (tag).tag1 = user_rank; \
88 (tag).tag2 = user_ctxt; \
89 (_tagsel).tag0 = 0xffffffffULL; \
90 (_tagsel).tag1 = 0xffffffffULL; \
91 (_tagsel).tag2 = 0xffffffffULL; \
92 if((user_tag) == MPI_ANY_TAG) \
93 { \
94 (_tagsel).tag0 = 0x80000000ULL; \
95 (tag).tag0 = 0x00000000ULL; \
96 } \
97 if((user_rank) == MPI_ANY_SOURCE) \
98 { \
99 (_tagsel).tag1 = 0x00000000ULL; \
100 } \
101 } while (0)
102
103 END_C_DECLS
104
105 #endif