@@ -74,7 +74,9 @@ mca_pml_cm_irecv_init(void *addr,
74
74
struct ompi_request_t * * request )
75
75
{
76
76
mca_pml_cm_hvy_recv_request_t * recvreq ;
77
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
77
78
ompi_proc_t * ompi_proc ;
79
+ #endif
78
80
79
81
MCA_PML_CM_HVY_RECV_REQUEST_ALLOC (recvreq );
80
82
if ( OPAL_UNLIKELY (NULL == recvreq ) ) return OMPI_ERR_OUT_OF_RESOURCE ;
@@ -98,8 +100,10 @@ mca_pml_cm_irecv(void *addr,
98
100
{
99
101
int ret ;
100
102
mca_pml_cm_thin_recv_request_t * recvreq ;
101
- ompi_proc_t * ompi_proc ;
102
-
103
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
104
+ ompi_proc_t * ompi_proc = NULL ;
105
+ #endif
106
+
103
107
MCA_PML_CM_THIN_RECV_REQUEST_ALLOC (recvreq );
104
108
if ( OPAL_UNLIKELY (NULL == recvreq ) ) return OMPI_ERR_OUT_OF_RESOURCE ;
105
109
@@ -136,7 +140,9 @@ mca_pml_cm_recv(void *addr,
136
140
ompi_status_public_t * status )
137
141
{
138
142
int ret ;
143
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
139
144
ompi_proc_t * ompi_proc ;
145
+ #endif
140
146
opal_convertor_t convertor ;
141
147
mca_pml_cm_request_t req ;
142
148
mca_mtl_request_t * req_mtl =
@@ -154,19 +160,30 @@ mca_pml_cm_recv(void *addr,
154
160
req .req_ompi .req_status .MPI_ERROR = OMPI_SUCCESS ;
155
161
req .req_ompi .req_status ._cancelled = 0 ;
156
162
163
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
157
164
if ( MPI_ANY_SOURCE == src ) {
158
165
ompi_proc = ompi_proc_local_proc ;
159
166
} else {
160
167
ompi_proc = ompi_comm_peer_lookup ( comm , src );
161
168
}
162
169
163
170
opal_convertor_copy_and_prepare_for_recv (
164
- ompi_proc -> super .proc_convertor ,
165
- & (datatype -> super ),
166
- count ,
167
- addr ,
168
- 0 ,
169
- & convertor );
171
+ ompi_proc -> super .proc_convertor ,
172
+ & (datatype -> super ),
173
+ count ,
174
+ addr ,
175
+ 0 ,
176
+ & convertor );
177
+ #else
178
+ opal_convertor_copy_and_prepare_for_recv (
179
+ ompi_mpi_local_convertor ,
180
+ & (datatype -> super ),
181
+ count ,
182
+ addr ,
183
+ 0 ,
184
+ & convertor );
185
+ #endif
186
+
170
187
ret = OMPI_MTL_CALL (irecv (ompi_mtl ,
171
188
comm ,
172
189
src ,
@@ -198,7 +215,9 @@ mca_pml_cm_isend_init(void* buf,
198
215
ompi_request_t * * request )
199
216
{
200
217
mca_pml_cm_hvy_send_request_t * sendreq ;
218
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
201
219
ompi_proc_t * ompi_proc ;
220
+ #endif
202
221
203
222
MCA_PML_CM_HVY_SEND_REQUEST_ALLOC (sendreq , comm , dst , ompi_proc );
204
223
if (OPAL_UNLIKELY (NULL == sendreq )) return OMPI_ERR_OUT_OF_RESOURCE ;
@@ -225,7 +244,9 @@ mca_pml_cm_isend(void* buf,
225
244
226
245
if (sendmode == MCA_PML_BASE_SEND_BUFFERED ) {
227
246
mca_pml_cm_hvy_send_request_t * sendreq ;
228
- ompi_proc_t * ompi_proc ;
247
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
248
+ ompi_proc_t * ompi_proc = NULL ;
249
+ #endif
229
250
230
251
MCA_PML_CM_HVY_SEND_REQUEST_ALLOC (sendreq , comm , dst , ompi_proc );
231
252
if (OPAL_UNLIKELY (NULL == sendreq )) return OMPI_ERR_OUT_OF_RESOURCE ;
@@ -248,7 +269,9 @@ mca_pml_cm_isend(void* buf,
248
269
249
270
} else {
250
271
mca_pml_cm_thin_send_request_t * sendreq ;
251
- ompi_proc_t * ompi_proc ;
272
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
273
+ ompi_proc_t * ompi_proc = NULL ;
274
+ #endif
252
275
MCA_PML_CM_THIN_SEND_REQUEST_ALLOC (sendreq , comm , dst , ompi_proc );
253
276
if (OPAL_UNLIKELY (NULL == sendreq )) return OMPI_ERR_OUT_OF_RESOURCE ;
254
277
@@ -288,10 +311,11 @@ mca_pml_cm_send(void *buf,
288
311
ompi_communicator_t * comm )
289
312
{
290
313
int ret = OMPI_ERROR ;
314
+ ompi_proc_t * ompi_proc ;
291
315
292
316
if (sendmode == MCA_PML_BASE_SEND_BUFFERED ) {
293
317
mca_pml_cm_hvy_send_request_t * sendreq ;
294
- ompi_proc_t * ompi_proc ;
318
+
295
319
MCA_PML_CM_HVY_SEND_REQUEST_ALLOC (sendreq , comm , dst , ompi_proc );
296
320
if (OPAL_UNLIKELY (NULL == sendreq )) return OMPI_ERR_OUT_OF_RESOURCE ;
297
321
@@ -315,14 +339,13 @@ mca_pml_cm_send(void *buf,
315
339
ompi_request_free ( (ompi_request_t * * )& sendreq );
316
340
} else {
317
341
opal_convertor_t convertor ;
318
- ompi_proc_t * ompi_proc = ompi_comm_peer_lookup (comm , dst );
319
342
320
343
#if !(OPAL_ENABLE_HETEROGENEOUS_SUPPORT )
321
344
if (opal_datatype_is_contiguous_memory_layout (& datatype -> super , count )) {
322
345
323
- convertor .remoteArch = ompi_proc -> super . proc_convertor -> remoteArch ;
324
- convertor .flags = ompi_proc -> super . proc_convertor -> flags ;
325
- convertor .master = ompi_proc -> super . proc_convertor -> master ;
346
+ convertor .remoteArch = ompi_mpi_local_convertor -> remoteArch ;
347
+ convertor .flags = ompi_mpi_local_convertor -> flags ;
348
+ convertor .master = ompi_mpi_local_convertor -> master ;
326
349
327
350
convertor .local_size = count * datatype -> super .size ;
328
351
convertor .pBaseBuf = (unsigned char * )buf ;
@@ -331,6 +354,7 @@ mca_pml_cm_send(void *buf,
331
354
} else
332
355
#endif
333
356
{
357
+ ompi_proc = ompi_comm_peer_lookup (comm , dst );
334
358
opal_convertor_copy_and_prepare_for_send (
335
359
ompi_proc -> super .proc_convertor ,
336
360
& datatype -> super , count , buf , 0 ,
@@ -422,17 +446,18 @@ mca_pml_cm_imrecv(void *buf,
422
446
{
423
447
int ret ;
424
448
mca_pml_cm_thin_recv_request_t * recvreq ;
449
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
425
450
ompi_proc_t * ompi_proc ;
451
+ #endif
426
452
ompi_communicator_t * comm = (* message )-> comm ;
427
- int peer = (* message )-> peer ;
428
453
429
454
MCA_PML_CM_THIN_RECV_REQUEST_ALLOC (recvreq );
430
455
if ( OPAL_UNLIKELY (NULL == recvreq ) ) return OMPI_ERR_OUT_OF_RESOURCE ;
431
456
432
457
MCA_PML_CM_THIN_RECV_REQUEST_INIT (recvreq ,
433
458
ompi_proc ,
434
459
comm ,
435
- peer ,
460
+ ( * message ) -> peer ,
436
461
datatype ,
437
462
buf ,
438
463
count );
@@ -453,17 +478,18 @@ mca_pml_cm_mrecv(void *buf,
453
478
{
454
479
int ret ;
455
480
mca_pml_cm_thin_recv_request_t * recvreq ;
481
+ #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
456
482
ompi_proc_t * ompi_proc ;
483
+ #endif
457
484
ompi_communicator_t * comm = (* message )-> comm ;
458
- int peer = (* message )-> peer ;
459
485
460
486
MCA_PML_CM_THIN_RECV_REQUEST_ALLOC (recvreq );
461
487
if ( OPAL_UNLIKELY (NULL == recvreq ) ) return OMPI_ERR_OUT_OF_RESOURCE ;
462
488
463
489
MCA_PML_CM_THIN_RECV_REQUEST_INIT (recvreq ,
464
490
ompi_proc ,
465
491
comm ,
466
- peer ,
492
+ ( * message ) -> peer ,
467
493
datatype ,
468
494
buf ,
469
495
count );
0 commit comments