@@ -321,9 +321,10 @@ int opal_common_ofi_providers_subset_of_list(struct fi_info *provider_list, char
321
321
322
322
int opal_common_ofi_mca_register (const mca_base_component_t * component )
323
323
{
324
- static int include_index = -1 ;
325
- static int exclude_index = -1 ;
326
- static int verbose_index = -1 ;
324
+ int include_index ;
325
+ int exclude_index ;
326
+ int verbose_index ;
327
+ int param ;
327
328
int ret ;
328
329
329
330
if (fi_version () < FI_VERSION (1 , 0 )) {
@@ -332,7 +333,8 @@ int opal_common_ofi_mca_register(const mca_base_component_t *component)
332
333
333
334
OPAL_THREAD_LOCK (& opal_common_ofi_mutex );
334
335
335
- if (0 > include_index ) {
336
+ param = mca_base_var_find ("opal" , "opal_common" , "ofi" , "provider_include" );
337
+ if (0 > param ) {
336
338
/*
337
339
* this monkey business is needed because of the way the MCA VARs stuff tries to handle
338
340
* pointers to strings when when destructing the MCA var database. If you don't do
@@ -355,9 +357,12 @@ int opal_common_ofi_mca_register(const mca_base_component_t *component)
355
357
ret = include_index ;
356
358
goto err ;
357
359
}
360
+ } else {
361
+ include_index = param ;
358
362
}
359
363
360
- if (0 > exclude_index ) {
364
+ param = mca_base_var_find ("opal" , "opal_common" , "ofi" , "provider_exclude" );
365
+ if (0 > param ) {
361
366
if (NULL == opal_common_ofi .prov_exclude ) {
362
367
opal_common_ofi .prov_exclude = (char * * ) malloc (sizeof (char * ));
363
368
assert (NULL != opal_common_ofi .prov_exclude );
@@ -374,9 +379,12 @@ int opal_common_ofi_mca_register(const mca_base_component_t *component)
374
379
ret = exclude_index ;
375
380
goto err ;
376
381
}
382
+ } else {
383
+ exclude_index = param ;
377
384
}
378
385
379
- if (0 > verbose_index ) {
386
+ param = mca_base_var_find ("opal" , "opal_common" , "ofi" , "verbose" );
387
+ if (0 > param ) {
380
388
verbose_index = mca_base_var_register ("opal" , "opal_common" , "ofi" , "verbose" ,
381
389
"Verbose level of the OFI components" ,
382
390
MCA_BASE_VAR_TYPE_INT , NULL , 0 ,
@@ -387,6 +395,8 @@ int opal_common_ofi_mca_register(const mca_base_component_t *component)
387
395
ret = verbose_index ;
388
396
goto err ;
389
397
}
398
+ } else {
399
+ verbose_index = param ;
390
400
}
391
401
392
402
if (component ) {
0 commit comments