Skip to content

Commit

Permalink
Merge pull request #6518 from STEllAR-GROUP/log_settings
Browse files Browse the repository at this point in the history
Make sure that --hpx:ini log settings take effect
  • Loading branch information
hkaiser authored Jul 13, 2024
2 parents 17bbc63 + d0c549b commit 7e3e582
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -503,15 +503,21 @@ namespace hpx::local::detail {
hpx::program_options::variables_map& vm,
std::vector<std::string>& ini_config)
{
#if !defined(HPX_HAVE_DISTRIBUTED_RUNTIME)
bool const debug_clp = vm.count("hpx:debug-clp");

// fill logging default
enable_logging_settings(vm, ini_config);

// handle command line arguments after logging defaults
if (vm.count("hpx:ini"))
{
std::vector<std::string> cfg =
vm["hpx:ini"].as<std::vector<std::string>>();
std::copy(cfg.begin(), cfg.end(), std::back_inserter(ini_config));
cfgmap.add(cfg);
}
#endif

use_process_mask_ =
(cfgmap.get_value<int>("hpx.use_process_mask", 0) > 0) ||
Expand Down Expand Up @@ -627,12 +633,12 @@ namespace hpx::local::detail {
// handle high-priority threads
handle_high_priority_threads(vm, ini_config);

enable_logging_settings(vm, ini_config);

#if !defined(HPX_HAVE_DISTRIBUTED_RUNTIME)
if (debug_clp)
{
print_config(ini_config);
}
#endif

return true;
}
Expand Down
9 changes: 9 additions & 0 deletions libs/full/command_line_handling/src/command_line_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,15 @@ namespace hpx::util {

enable_logging_settings(vm, ini_config);

// handle command line arguments after logging defaults
if (vm.count("hpx:ini"))
{
std::vector<std::string> cfg =
vm["hpx:ini"].as<std::vector<std::string>>();
std::copy(cfg.begin(), cfg.end(), std::back_inserter(ini_config));
cfgmap.add(cfg);
}

if (rtcfg_.mode_ != hpx::runtime_mode::local)
{
// Set number of localities in configuration (do it everywhere, even
Expand Down

0 comments on commit 7e3e582

Please sign in to comment.