Skip to content

Commit 78adeb8

Browse files
committed
ch4/ofi: set MPIR_CVAR_CH4_OFI_PIPELINE_MAX_CHUNKS
Allow users to set MPIR_CVAR_CH4_OFI_PIPELINE_MAX_CHUNKS. While the pipeline algorithm will force allocate new chunk blocks when running out-of cells, it will free the extra chunks as the cells are returned. To avoid frequent reallocating pool blocks, especially the gpu registration overhead, let user be able to set MPIR_CVAR_CH4_OFI_PIPELINE_MAX_CHUNKS according to their application need.
1 parent 981474a commit 78adeb8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,16 @@ categories :
475475
description : >-
476476
Specifies the number of chunk buffers for pipeline data transfer.
477477
478+
- name : MPIR_CVAR_CH4_OFI_PIPELINE_MAX_CHUNKS
479+
category : CH4_OFI
480+
type : int
481+
default : 1024
482+
class : none
483+
verbosity : MPI_T_VERBOSITY_USER_BASIC
484+
scope : MPI_T_SCOPE_LOCAL
485+
description : >-
486+
Specifies the max number of chunk buffers to be reserved for pipeline data transfer.
487+
478488
- name : MPIR_CVAR_CH4_OFI_GPU_SEND_ENGINE_TYPE
479489
category : CH4_OFI
480490
type : enum
@@ -1509,7 +1519,7 @@ int MPIDI_OFI_init_per_vci(int vci)
15091519
/* Create chunk buffer pool (for pipeline etc.) */
15101520
mpi_errno = MPIDU_genq_private_pool_create(MPIR_CVAR_CH4_OFI_PIPELINE_CHUNK_SZ,
15111521
MPIR_CVAR_CH4_OFI_PIPELINE_NUM_CHUNKS,
1512-
MPIR_CVAR_CH4_OFI_PIPELINE_NUM_CHUNKS,
1522+
MPIR_CVAR_CH4_OFI_PIPELINE_MAX_CHUNKS,
15131523
host_alloc_registered,
15141524
host_free_registered,
15151525
&MPIDI_OFI_global.per_vci[vci].pipeline_pool);

0 commit comments

Comments
 (0)