The Gaudi Framework  master (82fdf313)
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-2023 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()

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

(c) Copyright 1998-2023 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 = "%s_%i_%i_%i.py" % (
20 template_filename.rstrip(".py"),
21 n_threads,
22 n_parallel_events,
23 n_parallel_algorithms,
24 )
25 new_config = open(new_filename, "w")
26 for line in template.readlines():
27 if line.startswith("n_threads"):
28 line = "n_threads = %i\n" % n_threads
29 elif line.startswith("n_parallel_events"):
30 line = "n_parallel_events = %i\n" % n_parallel_events
31 elif line.startswith("n_parallel_algorithms"):
32 line = "n_parallel_algorithms = %i\n" % n_parallel_algorithms
33 new_config.write(line)
34 new_config.close()
35 return new_filename
36
37

Variable Documentation

◆ config

prepareBenchmark.config
Initial value:
1= prepareConfig(
2 "../options/BrunelScenario.py",
3 n_threads=n_threads,
4 n_parallel_events=n_events,
5 n_parallel_algorithms=n_algos,
6 )

Definition at line 43 of file prepareBenchmark.py.

◆ n_threads

int prepareBenchmark.n_threads = 10

Definition at line 40 of file prepareBenchmark.py.