Loading etc/unittests/test_core/test_06-11_multithreading_oneworkers copy.conf 0 → 100644 +18 −0 Original line number Diff line number Diff line # SPDX-FileCopyrightText: 2018-2023 CERN and the Allpix Squared authors # SPDX-License-Identifier: MIT #DESC tests the framework response in case too few workers are enabled. [Allpix] detectors_file = "detector.conf" number_of_events = 1 random_seed = 0 purge_output_directory = true deny_overwrite = true log_level = INFO multithreading = true workers = 1 #PASS (INFO) Using multithreading with only one worker, this might be slower than multithreading=false #LABEL coverage #FAIL ERROR #FAIL FATAL etc/unittests/test_core/test_06-4_multithreading_zeroworkers.conf +1 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,5 @@ log_level = WARNING multithreading = true workers = 0 #PASS (FATAL) Error in the configuration:\nValue 0 of key 'workers' in global section is not valid: number of workers should be larger than one #PASS (FATAL) Error in the configuration:\nValue 0 of key 'workers' in global section is not valid: number of workers should be larger than zero #LABEL coverage src/core/module/ModuleManager.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -567,8 +567,10 @@ void ModuleManager::initialize() { available_hardware_concurrency -= 1u; } number_of_threads_ = global_config.get<unsigned int>("workers", std::max(available_hardware_concurrency, 1u)); if(number_of_threads_ < 2) { throw InvalidValueError(global_config, "workers", "number of workers should be larger than one"); if(number_of_threads_ < 1) { throw InvalidValueError(global_config, "workers", "number of workers should be larger than zero"); } else if(number_of_threads_ == 1) { LOG(WARNING) << "Using multithreading with only one worker, this might be slower than multithreading=false"; } if(number_of_threads_ > std::thread::hardware_concurrency()) { Loading Loading
etc/unittests/test_core/test_06-11_multithreading_oneworkers copy.conf 0 → 100644 +18 −0 Original line number Diff line number Diff line # SPDX-FileCopyrightText: 2018-2023 CERN and the Allpix Squared authors # SPDX-License-Identifier: MIT #DESC tests the framework response in case too few workers are enabled. [Allpix] detectors_file = "detector.conf" number_of_events = 1 random_seed = 0 purge_output_directory = true deny_overwrite = true log_level = INFO multithreading = true workers = 1 #PASS (INFO) Using multithreading with only one worker, this might be slower than multithreading=false #LABEL coverage #FAIL ERROR #FAIL FATAL
etc/unittests/test_core/test_06-4_multithreading_zeroworkers.conf +1 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,5 @@ log_level = WARNING multithreading = true workers = 0 #PASS (FATAL) Error in the configuration:\nValue 0 of key 'workers' in global section is not valid: number of workers should be larger than one #PASS (FATAL) Error in the configuration:\nValue 0 of key 'workers' in global section is not valid: number of workers should be larger than zero #LABEL coverage
src/core/module/ModuleManager.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -567,8 +567,10 @@ void ModuleManager::initialize() { available_hardware_concurrency -= 1u; } number_of_threads_ = global_config.get<unsigned int>("workers", std::max(available_hardware_concurrency, 1u)); if(number_of_threads_ < 2) { throw InvalidValueError(global_config, "workers", "number of workers should be larger than one"); if(number_of_threads_ < 1) { throw InvalidValueError(global_config, "workers", "number of workers should be larger than zero"); } else if(number_of_threads_ == 1) { LOG(WARNING) << "Using multithreading with only one worker, this might be slower than multithreading=false"; } if(number_of_threads_ > std::thread::hardware_concurrency()) { Loading