@@ -170,69 +170,88 @@ static int ompi_osc_rdma_pvar_read (const struct mca_base_pvar_t *pvar, void *va
170170
171171static int ompi_osc_rdma_component_register (void )
172172{
173+ char * description_str ;
173174 mca_osc_rdma_component .no_locks = false;
175+ asprintf (& description_str , "Enable optimizations available only if MPI_LOCK is "
176+ "not used. Info key of same name overrides this value (default: %s)" ,
177+ mca_osc_rdma_component .no_locks ? "true" : "false" );
174178 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version ,
175- "no_locks" , "Enable optimizations available only if MPI_LOCK is "
176- "not used. Info key of same name overrides this value (default: false)" ,
179+ "no_locks" , description_str ,
177180 MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 , OPAL_INFO_LVL_5 ,
178181 MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .no_locks );
182+ free (description_str );
179183
180184 mca_osc_rdma_component .acc_single_intrinsic = false;
185+ asprintf (& description_str , "Enable optimizations for MPI_Fetch_and_op, MPI_Accumulate, etc for codes "
186+ "that will not use anything more than a single predefined datatype (default: %s)" ,
187+ mca_osc_rdma_component .acc_single_intrinsic ? "true" : "false" );
181188 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "acc_single_intrinsic" ,
182- "Enable optimizations for MPI_Fetch_and_op, MPI_Accumulate, etc for codes "
183- "that will not use anything more than a single predefined datatype (default: false)" ,
189+ description_str ,
184190 MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 , OPAL_INFO_LVL_5 ,
185191 MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .acc_single_intrinsic );
192+ free (description_str );
186193
187194 mca_osc_rdma_component .acc_use_amo = true;
195+ asprintf (& description_str , "Enable the use of network atomic memory operations when using single "
196+ "intrinsic optimizations. If not set network compare-and-swap will be "
197+ "used instread (default: %s)" , mca_osc_rdma_component .acc_use_amo ? "true" : "false" );
188198 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "acc_use_amo" ,
189- "Enable the use of network atomic memory operations when using single "
190- "intrinsic optimizations. If not set network compare-and-swap will be "
191- "used instread (default: true)" , MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 , OPAL_INFO_LVL_5 ,
199+ description_str , MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 , OPAL_INFO_LVL_5 ,
192200 MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .acc_use_amo );
201+ free (description_str );
193202
194203 mca_osc_rdma_component .buffer_size = 32768 ;
204+ asprintf (& description_str , "Size of temporary buffers (default: %d)" , mca_osc_rdma_component .buffer_size );
195205 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "buffer_size" ,
196- "Size of temporary buffers (default: 32k)" , MCA_BASE_VAR_TYPE_UNSIGNED_INT ,
206+ description_str , MCA_BASE_VAR_TYPE_UNSIGNED_INT ,
197207 NULL , 0 , 0 , OPAL_INFO_LVL_3 , MCA_BASE_VAR_SCOPE_LOCAL ,
198208 & mca_osc_rdma_component .buffer_size );
209+ free (description_str );
199210
200211 mca_osc_rdma_component .max_attach = 32 ;
212+ asprintf (& description_str , "Maximum number of buffers that can be attached to a dynamic window. "
213+ "Keep in mind that each attached buffer will use a potentially limited "
214+ "resource (default: %d)" , mca_osc_rdma_component .max_attach );
201215 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "max_attach" ,
202- "Maximum number of buffers that can be attached to a dynamic window. "
203- "Keep in mind that each attached buffer will use a potentially limited "
204- "resource (default: 32)" , MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 ,
216+ description_str , MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 ,
205217 OPAL_INFO_LVL_3 , MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .max_attach );
218+ free (description_str );
206219
207220 mca_osc_rdma_component .aggregation_limit = 1024 ;
221+ asprintf (& description_str , "Maximum size of an aggregated put/get. Messages are aggregated for consecutive"
222+ "put and get operations. In some cases this may lead to higher latency but "
223+ "should also lead to higher bandwidth utilization. Set to 0 to disable (default: %d)" ,
224+ mca_osc_rdma_component .aggregation_limit );
208225 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "aggregation_limit" ,
209- "Maximum size of an aggregated put/get. Messages are aggregated for consecutive"
210- "put and get operations. In some cases this may lead to higher latency but "
211- "should also lead to higher bandwidth utilization. Set to 0 to disable (default:"
212- " 1k)" , MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
226+ description_str , MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
213227 MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .aggregation_limit );
228+ free (description_str );
214229
215230 mca_osc_rdma_component .priority = 90 ;
231+ asprintf (& description_str , "Priority of the osc/rdma component (default: %d)" ,
232+ mca_osc_rdma_component .priority );
216233 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "priority" ,
217- "Priority of the osc/rdma component (default: 90)" ,
218- MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
234+ description_str , MCA_BASE_VAR_TYPE_UNSIGNED_INT , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
219235 MCA_BASE_VAR_SCOPE_GROUP , & mca_osc_rdma_component .priority );
236+ free (description_str );
220237
221238 ompi_osc_rdma_btl_names = "openib,ugni" ;
239+ asprintf (& description_str , "Comma-delimited list of BTL component names to allow without verifying "
240+ "connectivity. Do not add a BTL to to this list unless it can reach all "
241+ "processes in any communicator used with an MPI window (default: %s)" ,
242+ ompi_osc_rdma_btl_names );
222243 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "btls" ,
223- "Comma-delimited list of BTL component names to allow without verifying "
224- "connectivity. Do not add a BTL to to this list unless it can reach all "
225- "processes in any communicator used with an MPI window (default: openib,ugni)" ,
226- MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
244+ description_str , MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
227245 MCA_BASE_VAR_SCOPE_GROUP , & ompi_osc_rdma_btl_names );
246+ free (description_str );
228247
229248 ompi_osc_rdma_mtl_names = "psm2" ;
249+ asprintf (& description_str , "Comma-delimited list of MTL component names to lower the priority of rdma "
250+ "osc component favoring pt2pt osc (default: %s)" , ompi_osc_rdma_mtl_names );
230251 (void ) mca_base_component_var_register (& mca_osc_rdma_component .super .osc_version , "mtls" ,
231- "Comma-delimited list of MTL component names to lower the priority of rdma "
232- "osc component favoring pt2pt osc (default: psm2)" ,
233- MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
252+ description_str , MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
234253 MCA_BASE_VAR_SCOPE_GROUP , & ompi_osc_rdma_mtl_names );
235-
254+ free ( description_str );
236255
237256 /* register performance variables */
238257
@@ -721,16 +740,20 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
721740static int ompi_osc_rdma_query_mtls (void )
722741{
723742 char * * mtls_to_use ;
743+ bool mtl_match = false;
724744
725745 mtls_to_use = opal_argv_split (ompi_osc_rdma_mtl_names , ',' );
726746 if (mtls_to_use && ompi_mtl_base_selected_component ) {
727- for (int i = 0 ; mtls_to_use [i ] ; ++ i ) {
728- if (0 == strcmp (mtls_to_use [i ], ompi_mtl_base_selected_component -> mtl_version .mca_component_name )) {
729- return OMPI_SUCCESS ;
730- }
731- }
747+ for (int i = 0 ; mtls_to_use [i ] ; ++ i ) {
748+ if (0 == strcmp (mtls_to_use [i ], ompi_mtl_base_selected_component -> mtl_version .mca_component_name )) {
749+ mtl_match = true;
750+ break ;
751+ }
752+ }
732753 }
733- return -1 ;
754+
755+ opal_argv_free (mtls_to_use );
756+ return mtl_match ? OMPI_SUCCESS : OMPI_ERR_NOT_FOUND ;
734757}
735758
736759static int ompi_osc_rdma_query_btls (ompi_communicator_t * comm , struct mca_btl_base_module_t * * btl )
0 commit comments