The Gaudi Framework  v36r9p1 (5c15b2bb)
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 18 of file prepareBenchmark.py.

18 def prepareConfig(
19  template_filename, n_threads=10, n_parallel_events=10, n_parallel_algorithms=10
20 ):
21  template = open(template_filename)
22  new_filename = "%s_%i_%i_%i.py" % (
23  template_filename.rstrip(".py"),
24  n_threads,
25  n_parallel_events,
26  n_parallel_algorithms,
27  )
28  new_config = open(new_filename, "w")
29  for line in template.readlines():
30  if line.startswith("n_threads"):
31  line = "n_threads = %i\n" % n_threads
32  elif line.startswith("n_parallel_events"):
33  line = "n_parallel_events = %i\n" % n_parallel_events
34  elif line.startswith("n_parallel_algorithms"):
35  line = "n_parallel_algorithms = %i\n" % n_parallel_algorithms
36  new_config.write(line)
37  new_config.close()
38  return new_filename
39 
40 

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,
6  )

Definition at line 47 of file prepareBenchmark.py.

◆ n_threads

int prepareBenchmark.n_threads = 10

Definition at line 44 of file prepareBenchmark.py.

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