From d6b55af35538fdf746af402e44c3f4db970e284a Mon Sep 17 00:00:00 2001 From: "E. G. Patrick Bos" Date: Mon, 15 Jul 2024 20:41:21 +0200 Subject: [PATCH] [RF] change default LikelihoodJob task splitting mode Set the default LikelihoodJob tasks to be component-wise splits rather than event-wise splits --- roofit/roofitcore/src/TestStatistics/LikelihoodJob.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roofit/roofitcore/src/TestStatistics/LikelihoodJob.cxx b/roofit/roofitcore/src/TestStatistics/LikelihoodJob.cxx index fd17a288e81c7b..c6adfd9c55ea81 100644 --- a/roofit/roofitcore/src/TestStatistics/LikelihoodJob.cxx +++ b/roofit/roofitcore/src/TestStatistics/LikelihoodJob.cxx @@ -112,12 +112,11 @@ void LikelihoodJob::update_state() } } -/// \warning In automatic mode, this function can start MultiProcess (forks, starts workers, etc)! std::size_t LikelihoodJob::getNEventTasks() { std::size_t val = n_event_tasks_; if (val == MultiProcess::Config::LikelihoodJob::automaticNEventTasks) { - val = get_manager()->process_manager().N_workers(); + val = 1; } if (val > likelihood_->getNEvents()) { val = likelihood_->getNEvents(); @@ -125,11 +124,12 @@ std::size_t LikelihoodJob::getNEventTasks() return val; } +/// \warning In automatic mode, this function can start MultiProcess (forks, starts workers, etc)! std::size_t LikelihoodJob::getNComponentTasks() { std::size_t val = n_component_tasks_; if (val == MultiProcess::Config::LikelihoodJob::automaticNComponentTasks) { - val = 1; + val = get_manager()->process_manager().N_workers(); // get_manager() is the call that can start MultiProcess, mentioned above } if (val > likelihood_->getNComponents()) { val = likelihood_->getNComponents();