@@ -239,6 +239,11 @@ static ucs_config_field_t ucp_context_config_table[] = {
239239 "multiple rails. Must be greater than 0." ,
240240 ucs_offsetof (ucp_context_config_t , min_rndv_chunk_size ), UCS_CONFIG_TYPE_MEMUNITS },
241241
242+ {"MIN_RMA_CHUNK_SIZE" , "16k" ,
243+ "Minimum chunk size to split the message sent with RMA protocol on\n"
244+ "multiple rails. Must be greater than 0." ,
245+ ucs_offsetof (ucp_context_config_t , min_rma_chunk_size ), UCS_CONFIG_TYPE_MEMUNITS },
246+
242247 {"RMA_ZCOPY_MAX_SEG_SIZE" , "auto" ,
243248 "Max size of a segment for rma/rndv zcopy." ,
244249 ucs_offsetof (ucp_context_config_t , rma_zcopy_max_seg_size ), UCS_CONFIG_TYPE_MEMUNITS },
@@ -2127,6 +2132,12 @@ static ucs_status_t ucp_fill_config(ucp_context_h context,
21272132 return UCS_ERR_INVALID_PARAM ;
21282133 }
21292134
2135+ if (context -> config .ext .min_rma_chunk_size == 0 ) {
2136+ ucs_error ("minimum chunk size for RMA protocol must be greater"
2137+ " than 0" );
2138+ return UCS_ERR_INVALID_PARAM ;
2139+ }
2140+
21302141 /* Save environment prefix to later notify user for unused variables */
21312142 context -> config .env_prefix = ucs_strdup (config -> env_prefix , "ucp config" );
21322143 if (context -> config .env_prefix == NULL ) {
0 commit comments