1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef MTL_PSM_TYPES_H_HAS_BEEN_INCLUDED
23 #define MTL_PSM_TYPES_H_HAS_BEEN_INCLUDED
24
25 #include "ompi_config.h"
26 #include "mtl_psm.h"
27
28 #include "ompi/mca/mtl/mtl.h"
29 #include "ompi/mca/mtl/base/base.h"
30 #include "mtl_psm_endpoint.h"
31
32 #include "psm.h"
33
34
35 BEGIN_C_DECLS
36
37
38
39
40 struct mca_mtl_psm_module_t {
41 mca_mtl_base_module_t super;
42
43 int32_t connect_timeout;
44
45 int32_t debug_level;
46 int32_t ib_unit;
47 int32_t ib_port;
48 int32_t ib_service_level;
49 uint64_t ib_pkey;
50
51 #if PSM_VERNO >= 0x010d
52 unsigned long long ib_service_id;
53
54
55 int path_res_type;
56 #endif
57
58 psm_ep_t ep;
59 psm_mq_t mq;
60 psm_epid_t epid;
61 psm_epaddr_t epaddr;
62 };
63
64 typedef struct mca_mtl_psm_module_t mca_mtl_psm_module_t;
65
66 extern mca_mtl_psm_module_t ompi_mtl_psm;
67
68 struct mca_mtl_psm_component_t {
69 mca_mtl_base_component_2_0_0_t super;
70 };
71 typedef struct mca_mtl_psm_component_t mca_mtl_psm_component_t;
72
73 OMPI_DECLSPEC extern mca_mtl_psm_component_t mca_mtl_psm_component;
74
75 #define PSM_MAKE_MQTAG(ctxt,rank,utag) \
76 ( (((ctxt)&0xffffULL)<<48)| (((rank)&0xffffULL)<<32)| \
77 (((utag)&0xffffffffULL)) )
78
79 #define PSM_GET_MQRANK(tag_u64) ((int)(((tag_u64)>>32)&0xffff))
80 #define PSM_GET_MQUTAG(tag_u64) ((int)((tag_u64)&0xffffffffULL))
81
82 #define PSM_MAKE_TAGSEL(user_rank, user_tag, user_ctxt, tag, tagsel) \
83 do { \
84 (tagsel) = 0xffffffffffffffffULL; \
85 (tag) = PSM_MAKE_MQTAG((user_ctxt),(user_rank),(user_tag)); \
86 if ((user_tag) == MPI_ANY_TAG) { \
87 (tagsel) &= ~0x7fffffffULL; \
88 (tag) &= ~0xffffffffULL; \
89 } \
90 if ((user_rank) == MPI_ANY_SOURCE) \
91 (tagsel) &= ~0xffff00000000ULL; \
92 } while (0)
93
94 END_C_DECLS
95
96 #endif
97