The Gaudi Framework  master (37c0b60a)
prepareBenchmark Namespace Reference

Functions

def 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". More...
 

Variables

 n_threads = n_threads,
 
 config
 
 n_parallel_events = n_events,
 
 n_parallel_algorithms = n_algos,
 

Function Documentation

◆ prepareConfig()

def 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.

15 def prepareConfig(
16  template_filename, n_threads=10, n_parallel_events=10, n_parallel_algorithms=10
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

Definition at line 43 of file prepareBenchmark.py.

◆ n_parallel_algorithms

prepareBenchmark.n_parallel_algorithms = n_algos,

Definition at line 47 of file prepareBenchmark.py.

◆ n_parallel_events

prepareBenchmark.n_parallel_events = n_events,

Definition at line 46 of file prepareBenchmark.py.

◆ n_threads

prepareBenchmark.n_threads = n_threads,

Definition at line 40 of file prepareBenchmark.py.

prepareBenchmark.prepareConfig
def 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 i...
Definition: prepareBenchmark.py:15