Skip to content

Commit 981474a

Browse files
committed
ch4/ofi: use force in allocating pipeline cells
The pipeline algorithms may deadlock when run out of cells. Cells could be locked in send or recv when the cells in the remote process is also locked in different send/recv and preventing completion. Use MPIDU_genq_private_pool_force_alloc_cell to allocate new pool blocks if necessary. The rndv read/write protocol don't have the same issue since the operations are one-sided and the chunk buffers used in read or write should eventually complete.
1 parent 223d776 commit 981474a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mpid/ch4/netmod/ofi/ofi_pipeline.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ static int pipeline_send_poll(MPIX_Async_thing thing)
197197
}
198198

199199
/* alloc a chunk */
200-
MPIDU_genq_private_pool_alloc_cell(MPIDI_OFI_global.per_vci[p->vci_local].pipeline_pool,
201-
&chunk_buf);
200+
MPIDU_genq_private_pool_force_alloc_cell(MPIDI_OFI_global.
201+
per_vci[p->vci_local].pipeline_pool, &chunk_buf);
202202
if (!chunk_buf) {
203203
goto fn_exit;
204204
}
@@ -371,8 +371,8 @@ static int pipeline_recv_poll(MPIX_Async_thing thing)
371371
}
372372

373373
/* alloc a chunk */
374-
MPIDU_genq_private_pool_alloc_cell(MPIDI_OFI_global.per_vci[p->vci_local].pipeline_pool,
375-
&chunk_buf);
374+
MPIDU_genq_private_pool_force_alloc_cell(MPIDI_OFI_global.
375+
per_vci[p->vci_local].pipeline_pool, &chunk_buf);
376376
if (!chunk_buf) {
377377
goto fn_exit;
378378
}

0 commit comments

Comments
 (0)