@@ -43,6 +43,9 @@ int mca_btl_ofi_afop (struct mca_btl_base_module_t *btl, struct mca_btl_base_end
43
43
mca_btl_ofi_module_t * ofi_btl = (mca_btl_ofi_module_t * ) btl ;
44
44
mca_btl_ofi_endpoint_t * btl_endpoint = (mca_btl_ofi_endpoint_t * ) endpoint ;
45
45
mca_btl_ofi_completion_t * comp = NULL ;
46
+ mca_btl_ofi_context_t * ofi_context ;
47
+
48
+ ofi_context = get_ofi_context (ofi_btl );
46
49
47
50
if (flags & MCA_BTL_ATOMIC_FLAG_32BIT ) {
48
51
fi_datatype = FI_UINT32 ;
@@ -51,6 +54,7 @@ int mca_btl_ofi_afop (struct mca_btl_base_module_t *btl, struct mca_btl_base_end
51
54
fi_op = to_fi_op (op );
52
55
53
56
comp = mca_btl_ofi_completion_alloc (btl , endpoint ,
57
+ ofi_context ,
54
58
local_address ,
55
59
local_handle ,
56
60
cbfunc , cbcontext , cbdata ,
@@ -61,7 +65,7 @@ int mca_btl_ofi_afop (struct mca_btl_base_module_t *btl, struct mca_btl_base_end
61
65
62
66
remote_address = (remote_address - (uint64_t ) remote_handle -> base_addr );
63
67
64
- rc = fi_fetch_atomic (ofi_btl -> ofi_endpoint ,
68
+ rc = fi_fetch_atomic (ofi_context -> tx_ctx ,
65
69
(void * ) & comp -> operand , 1 , NULL , /* operand */
66
70
local_address , local_handle -> desc , /* results */
67
71
btl_endpoint -> peer_addr , /* remote addr */
@@ -77,6 +81,9 @@ int mca_btl_ofi_afop (struct mca_btl_base_module_t *btl, struct mca_btl_base_end
77
81
78
82
MCA_BTL_OFI_NUM_RDMA_INC (ofi_btl );
79
83
84
+ /* force a bit of progress. */
85
+ mca_btl_ofi_component .super .btl_progress ();
86
+
80
87
return OPAL_SUCCESS ;
81
88
}
82
89
@@ -92,6 +99,9 @@ int mca_btl_ofi_aop (struct mca_btl_base_module_t *btl, mca_btl_base_endpoint_t
92
99
mca_btl_ofi_module_t * ofi_btl = (mca_btl_ofi_module_t * ) btl ;
93
100
mca_btl_ofi_endpoint_t * btl_endpoint = (mca_btl_ofi_endpoint_t * ) endpoint ;
94
101
mca_btl_ofi_completion_t * comp = NULL ;
102
+ mca_btl_ofi_context_t * ofi_context ;
103
+
104
+ ofi_context = get_ofi_context (ofi_btl );
95
105
96
106
if (flags & MCA_BTL_ATOMIC_FLAG_32BIT ) {
97
107
fi_datatype = FI_UINT32 ;
@@ -100,6 +110,7 @@ int mca_btl_ofi_aop (struct mca_btl_base_module_t *btl, mca_btl_base_endpoint_t
100
110
fi_op = to_fi_op (op );
101
111
102
112
comp = mca_btl_ofi_completion_alloc (btl , endpoint ,
113
+ ofi_context ,
103
114
NULL ,
104
115
NULL ,
105
116
cbfunc , cbcontext , cbdata ,
@@ -110,7 +121,7 @@ int mca_btl_ofi_aop (struct mca_btl_base_module_t *btl, mca_btl_base_endpoint_t
110
121
111
122
remote_address = (remote_address - (uint64_t ) remote_handle -> base_addr );
112
123
113
- rc = fi_atomic (ofi_btl -> ofi_endpoint ,
124
+ rc = fi_atomic (ofi_context -> tx_ctx ,
114
125
(void * ) & comp -> operand , 1 , NULL , /* operand */
115
126
btl_endpoint -> peer_addr , /* remote addr */
116
127
remote_address , remote_handle -> rkey , /* remote buffer */
@@ -124,6 +135,7 @@ int mca_btl_ofi_aop (struct mca_btl_base_module_t *btl, mca_btl_base_endpoint_t
124
135
}
125
136
126
137
MCA_BTL_OFI_NUM_RDMA_INC (ofi_btl );
138
+ mca_btl_ofi_component .super .btl_progress ();
127
139
128
140
return OPAL_SUCCESS ;
129
141
}
@@ -139,12 +151,16 @@ int mca_btl_ofi_acswap (struct mca_btl_base_module_t *btl, struct mca_btl_base_e
139
151
mca_btl_ofi_module_t * ofi_btl = (mca_btl_ofi_module_t * ) btl ;
140
152
mca_btl_ofi_endpoint_t * btl_endpoint = (mca_btl_ofi_endpoint_t * ) endpoint ;
141
153
mca_btl_ofi_completion_t * comp = NULL ;
154
+ mca_btl_ofi_context_t * ofi_context ;
155
+
156
+ ofi_context = get_ofi_context (ofi_btl );
142
157
143
158
if (flags & MCA_BTL_ATOMIC_FLAG_32BIT ) {
144
159
fi_datatype = FI_UINT32 ;
145
160
}
146
161
147
162
comp = mca_btl_ofi_completion_alloc (btl , endpoint ,
163
+ ofi_context ,
148
164
local_address ,
149
165
local_handle ,
150
166
cbfunc , cbcontext , cbdata ,
@@ -157,7 +173,7 @@ int mca_btl_ofi_acswap (struct mca_btl_base_module_t *btl, struct mca_btl_base_e
157
173
remote_address = (remote_address - (uint64_t ) remote_handle -> base_addr );
158
174
159
175
/* perform atomic */
160
- rc = fi_compare_atomic (ofi_btl -> ofi_endpoint ,
176
+ rc = fi_compare_atomic (ofi_context -> tx_ctx ,
161
177
(void * ) & comp -> operand , 1 , NULL ,
162
178
(void * ) & comp -> compare , NULL ,
163
179
local_address , local_handle -> desc ,
@@ -176,5 +192,8 @@ int mca_btl_ofi_acswap (struct mca_btl_base_module_t *btl, struct mca_btl_base_e
176
192
177
193
MCA_BTL_OFI_NUM_RDMA_INC (ofi_btl );
178
194
195
+ /* force a bit of progress. */
196
+ mca_btl_ofi_component .super .btl_progress ();
197
+
179
198
return OPAL_SUCCESS ;
180
199
}
0 commit comments