@@ -34,6 +34,50 @@ static void opal_common_ucx_mem_release_cb(void *buf, size_t length,
34
34
ucm_vm_munmap (buf , length );
35
35
}
36
36
37
+ OPAL_DECLSPEC void opal_common_ucx_mca_var_register (const mca_base_component_t * component )
38
+ {
39
+ static int registered = 0 ;
40
+ static int hook_index ;
41
+ static int verbose_index ;
42
+ static int progress_index ;
43
+ if (!registered ) {
44
+ verbose_index = mca_base_var_register ("opal" , "opal_common" , "ucx" , "verbose" ,
45
+ "Verbose level of the UCX components" ,
46
+ MCA_BASE_VAR_TYPE_INT , NULL , 0 ,
47
+ MCA_BASE_VAR_FLAG_SETTABLE , OPAL_INFO_LVL_3 ,
48
+ MCA_BASE_VAR_SCOPE_LOCAL ,
49
+ & opal_common_ucx .verbose );
50
+ progress_index = mca_base_var_register ("opal" , "opal_common" , "ucx" , "progress_iterations" ,
51
+ "Set number of calls of internal UCX progress "
52
+ "calls per opal_progress call" ,
53
+ MCA_BASE_VAR_TYPE_INT , NULL , 0 ,
54
+ MCA_BASE_VAR_FLAG_SETTABLE , OPAL_INFO_LVL_3 ,
55
+ MCA_BASE_VAR_SCOPE_LOCAL ,
56
+ & opal_common_ucx .progress_iterations );
57
+ hook_index = mca_base_var_register ("opal" , "opal_common" , "ucx" , "opal_mem_hooks" ,
58
+ "Use OPAL memory hooks, instead of UCX internal "
59
+ "memory hooks" , MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 ,
60
+ OPAL_INFO_LVL_3 ,
61
+ MCA_BASE_VAR_SCOPE_LOCAL ,
62
+ & opal_common_ucx .opal_mem_hooks );
63
+ registered = 1 ;
64
+ }
65
+ if (component ) {
66
+ mca_base_var_register_synonym (verbose_index , component -> mca_project_name ,
67
+ component -> mca_type_name ,
68
+ component -> mca_component_name ,
69
+ "verbose" , 0 );
70
+ mca_base_var_register_synonym (progress_index , component -> mca_project_name ,
71
+ component -> mca_type_name ,
72
+ component -> mca_component_name ,
73
+ "progress_iterations" , 0 );
74
+ mca_base_var_register_synonym (hook_index , component -> mca_project_name ,
75
+ component -> mca_type_name ,
76
+ component -> mca_component_name ,
77
+ "opal_mem_hooks" , 0 );
78
+ }
79
+ }
80
+
37
81
OPAL_DECLSPEC void opal_common_ucx_mca_register (void )
38
82
{
39
83
opal_common_ucx .registered ++ ;
@@ -42,23 +86,6 @@ OPAL_DECLSPEC void opal_common_ucx_mca_register(void)
42
86
return ;
43
87
}
44
88
45
- mca_base_var_register ("opal" , "opal_common" , "ucx" , "verbose" ,
46
- "Verbose level of the UCX components" ,
47
- MCA_BASE_VAR_TYPE_INT , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE ,
48
- OPAL_INFO_LVL_9 , MCA_BASE_VAR_SCOPE_LOCAL ,
49
- & opal_common_ucx .verbose );
50
- mca_base_var_register ("opal" , "opal_common" , "ucx" , "progress_iterations" ,
51
- "Set number of calls of internal UCX progress calls per opal_progress call" ,
52
- MCA_BASE_VAR_TYPE_INT , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE ,
53
- OPAL_INFO_LVL_9 , MCA_BASE_VAR_SCOPE_LOCAL ,
54
- & opal_common_ucx .progress_iterations );
55
- mca_base_var_register ("opal" , "opal_common" , "ucx" , "opal_mem_hooks" ,
56
- "Use OPAL memory hooks, instead of UCX internal memory hooks" ,
57
- MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 ,
58
- OPAL_INFO_LVL_3 ,
59
- MCA_BASE_VAR_SCOPE_LOCAL ,
60
- & opal_common_ucx .opal_mem_hooks );
61
-
62
89
opal_common_ucx .output = opal_output_open (NULL );
63
90
opal_output_set_verbosity (opal_common_ucx .output , opal_common_ucx .verbose );
64
91
0 commit comments