The Gaudi Framework  v36r1 (3e2fb5a8)
prepareBenchmark Namespace Reference

Functions

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

Variables

int n_threads = 10
 
def config
 

Function Documentation

◆ prepareConfig()

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

Definition at line 17 of file prepareBenchmark.py.

17 def prepareConfig(template_filename,
18  n_threads=10,
19  n_parallel_events=10,
20  n_parallel_algorithms=10):
21  template = open(template_filename)
22  new_filename = "%s_%i_%i_%i.py" % (template_filename.rstrip(".py"),
23  n_threads, n_parallel_events,
24  n_parallel_algorithms)
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

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

Definition at line 44 of file prepareBenchmark.py.

◆ n_threads

int prepareBenchmark.n_threads = 10

Definition at line 41 of file prepareBenchmark.py.

prepareBenchmark.prepareConfig
def prepareConfig(template_filename, n_threads=10, n_parallel_events=10, n_parallel_algorithms=10)
Definition: prepareBenchmark.py:17