|
15 | 15 | * Copyright (c) 2015 Research Organization for Information Science
|
16 | 16 | * and Technology (RIST). All rights reserved.
|
17 | 17 | * Copyright (c) 2016 FUJITSU LIMITED. All rights reserved.
|
| 18 | + * Copyright (c) 2016 IBM Corporation. All rights reserved. |
18 | 19 | * $COPYRIGHT$
|
19 | 20 | *
|
20 | 21 | * Additional copyrights may follow
|
@@ -336,7 +337,16 @@ static inline int ompi_osc_pt2pt_put_w_req (const void *origin_addr, int origin_
|
336 | 337 |
|
337 | 338 | if (is_long_msg) {
|
338 | 339 | /* wait for eager sends to be active before starting a long put */
|
339 |
| - ompi_osc_pt2pt_sync_wait_expected (pt2pt_sync); |
| 340 | + if (pt2pt_sync->type == OMPI_OSC_PT2PT_SYNC_TYPE_LOCK) { |
| 341 | + OPAL_THREAD_LOCK(&pt2pt_sync->lock); |
| 342 | + ompi_osc_pt2pt_peer_t *peer = ompi_osc_pt2pt_peer_lookup (module, target); |
| 343 | + while (!(peer->flags & OMPI_OSC_PT2PT_PEER_FLAG_EAGER)) { |
| 344 | + opal_condition_wait(&pt2pt_sync->cond, &pt2pt_sync->lock); |
| 345 | + } |
| 346 | + OPAL_THREAD_UNLOCK(&pt2pt_sync->lock); |
| 347 | + } else { |
| 348 | + ompi_osc_pt2pt_sync_wait_expected (pt2pt_sync); |
| 349 | + } |
340 | 350 | }
|
341 | 351 |
|
342 | 352 | OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
|
@@ -495,7 +505,16 @@ ompi_osc_pt2pt_accumulate_w_req (const void *origin_addr, int origin_count,
|
495 | 505 |
|
496 | 506 | if (is_long_msg) {
|
497 | 507 | /* wait for synchronization before posting a long message */
|
498 |
| - ompi_osc_pt2pt_sync_wait_expected (pt2pt_sync); |
| 508 | + if (pt2pt_sync->type == OMPI_OSC_PT2PT_SYNC_TYPE_LOCK) { |
| 509 | + OPAL_THREAD_LOCK(&pt2pt_sync->lock); |
| 510 | + ompi_osc_pt2pt_peer_t *peer = ompi_osc_pt2pt_peer_lookup (module, target); |
| 511 | + while (!(peer->flags & OMPI_OSC_PT2PT_PEER_FLAG_EAGER)) { |
| 512 | + opal_condition_wait(&pt2pt_sync->cond, &pt2pt_sync->lock); |
| 513 | + } |
| 514 | + OPAL_THREAD_UNLOCK(&pt2pt_sync->lock); |
| 515 | + } else { |
| 516 | + ompi_osc_pt2pt_sync_wait_expected (pt2pt_sync); |
| 517 | + } |
499 | 518 | }
|
500 | 519 |
|
501 | 520 | header = (ompi_osc_pt2pt_header_acc_t*) ptr;
|
|
0 commit comments