Update to KOKKOS_TOOLS_LIBS env var (#69)
This commit is contained in:
1 förälder
27f210ea5d
incheckning
043a8010a9
6 files changed
+14
-15
No files matched your search
@@ -616,7 +616,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
UPD_PREPEND);
|
||||
|
||||
if(_v.count("all") > 0 || _v.count("kokkosp") > 0)
|
||||
update_env(_data, "KOKKOS_PROFILE_LIBRARY", _data.omni_libpath,
|
||||
update_env(_data, "KOKKOS_TOOLS_LIBS", _data.omni_libpath,
|
||||
UPD_PREPEND);
|
||||
});
|
||||
|
||||
@@ -649,7 +649,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
remove_env(_data, "OMP_TOOL_LIBRARIES");
|
||||
|
||||
if(_v.count("all") > 0 || _v.count("kokkosp") > 0)
|
||||
remove_env(_data, "KOKKOS_PROFILE_LIBRARY");
|
||||
remove_env(_data, "KOKKOS_TOOLS_LIBS");
|
||||
});
|
||||
|
||||
_data.processed_environs.emplace("exclude");
|
||||
|
||||
@@ -1137,7 +1137,7 @@ configure_mode_settings(const std::shared_ptr<settings>& _config)
|
||||
|
||||
if(_config->get<bool>("ROCPROFSYS_USE_KOKKOSP"))
|
||||
{
|
||||
auto _current_kokkosp_lib = tim::get_env<std::string>("KOKKOS_PROFILE_LIBRARY");
|
||||
auto _current_kokkosp_lib = tim::get_env<std::string>("KOKKOS_TOOLS_LIBS");
|
||||
if(_current_kokkosp_lib.find("librocprof-sys-dl.so") == std::string::npos &&
|
||||
_current_kokkosp_lib.find("librocprof-sys.so") == std::string::npos)
|
||||
{
|
||||
@@ -1149,9 +1149,9 @@ configure_mode_settings(const std::shared_ptr<settings>& _config)
|
||||
_message =
|
||||
JOIN("", " (forced. Previous value: '", _current_kokkosp_lib, "')");
|
||||
}
|
||||
ROCPROFSYS_BASIC_VERBOSE_F(1, "Setting KOKKOS_PROFILE_LIBRARY=%s%s\n",
|
||||
ROCPROFSYS_BASIC_VERBOSE_F(1, "Setting KOKKOS_TOOLS_LIBS=%s%s\n",
|
||||
"librocprof-sys.so", _message.c_str());
|
||||
tim::set_env("KOKKOS_PROFILE_LIBRARY", "librocprof-sys.so", _force);
|
||||
tim::set_env("KOKKOS_TOOLS_LIBS", "librocprof-sys.so", _force);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,8 +216,7 @@ extern "C"
|
||||
(!rocprofsys::config::settings_are_configured() &&
|
||||
rocprofsys::get_state() < rocprofsys::State::Active))
|
||||
{
|
||||
auto _kokkos_profile_lib =
|
||||
tim::get_env<std::string>("KOKKOS_PROFILE_LIBRARY");
|
||||
auto _kokkos_profile_lib = tim::get_env<std::string>("KOKKOS_TOOLS_LIBS");
|
||||
if(_kokkos_profile_lib.find("librocprof-sys.so") != std::string::npos)
|
||||
{
|
||||
auto _maps = tim::procfs::read_maps(tim::process::get_id());
|
||||
@@ -238,10 +237,10 @@ extern "C"
|
||||
_libs_str << " " << litr << "\n";
|
||||
ROCPROFSYS_ABORT(
|
||||
"%s was invoked with librocprof-sys.so as the "
|
||||
"KOKKOS_PROFILE_LIBRARY.\n"
|
||||
"KOKKOS_TOOLS_LIBS.\n"
|
||||
"However, librocprof-sys-dl.so has already been loaded by "
|
||||
"the process.\nTo avoid duplicate collections culminating "
|
||||
"is an error, please set KOKKOS_PROFILE_LIBRARY=%s.\nLoaded "
|
||||
"is an error, please set KOKKOS_TOOLS_LIBS=%s.\nLoaded "
|
||||
"libraries:\n%s",
|
||||
__FUNCTION__, itr.c_str(), _libs_str.str().c_str());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user