File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,20 @@ umf_result_t umfInit(void) {
7777#if !defined(UMF_NO_HWLOC )
7878 // some benchmarks uses multiple forks, and topology initialization is very slow
7979 // so if we initialize topology before the first fork, we can get significant performance gain.
80- umfGetTopologyReduced ();
80+
81+ const char * env = getenv ("UMF_CONF" );
82+ // todo: decide if we enable or disable umfGetTopologyReduced with env variable
83+ // todo: find better name for this string "umf.hwloc.init"
84+ // todo: with merge to master replace this with CTL
85+ #if 1
86+ if (env && strcmp (env , "umf.hwloc.init=y" ) == 0 ) {
87+ umfGetTopologyReduced ();
88+ }
89+ #else
90+ if (!env || strcmp (env , "umf.hwloc.init=n" ) != 0 ) {
91+ umfGetTopologyReduced ();
92+ }
93+ #endif
8194#endif
8295 return UMF_RESULT_SUCCESS ;
8396}
You can’t perform that action at this time.
0 commit comments