The Gaudi Framework  master (bdbe7744)
Loading...
Searching...
No Matches
prepareBenchmark Namespace Reference

Functions

 prepareConfig (template_filename, n_threads=10, n_parallel_events=10, n_parallel_algorithms=10)
 (c) Copyright 1998-2026 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

Variables

int n_threads = 10
 config

Function Documentation

◆ prepareConfig()

prepareConfig ( template_filename,
n_threads = 10,
n_parallel_events = 10,
n_parallel_algorithms = 10 )

(c) Copyright 1998-2026 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #

Definition at line 15 of file prepareBenchmark.py.

17):
18 template = open(template_filename)
19 new_filename = f"{template_filename.rstrip('.py')}_{n_threads}_{n_parallel_events}_{n_parallel_algorithms}.py"
20 new_config = open(new_filename, "w")
21 for line in template.readlines():
22 if line.startswith("n_threads"):
23 line = f"n_threads = {n_threads}\n"
24 elif line.startswith("n_parallel_events"):
25 line = f"n_parallel_events = {n_parallel_events}\n"
26 elif line.startswith("n_parallel_algorithms"):
27 line = f"n_parallel_algorithms = {n_parallel_algorithms}\n"
28 new_config.write(line)
29 new_config.close()
30 return new_filename
31
32

Variable Documentation

◆ config

prepareBenchmark.config
Initial value:
= prepareConfig(
"../options/BrunelScenario.py",
n_threads=n_threads,
n_parallel_events=n_events,
n_parallel_algorithms=n_algos,
)

Definition at line 38 of file prepareBenchmark.py.

◆ n_threads

int prepareBenchmark.n_threads = 10

Definition at line 35 of file prepareBenchmark.py.