Project

General

Profile

Profiling Results

  • Using callgrind we profiled several runs of the N02 experiment.
  • This in turn allowed us to generate a callgraph for each of these runs.
    • As an example, the following image shows a pruned version of a callgraph, starting from ComputeStep:

Experimentation

Increasing track length

  • We used three increasing values for the track length and checked how much time was spent inside ComputeStep (without including any crossing plane).
  • The accuracy parameters used were the following:
    • stepMax: 1 mm
    • deltaOneStep: 1.0e-2 mm
    • deltaIntersection: 1.0e-5 mm
    • epsilonMin: 1.0e-5
    • epsilonMax: 1.0e-5
    • deltaChord: 0.25 mm
Length ComputeStep %
1 m 8%
10 m 32%
100 m 46%

Sweeping epsilon with and without crossing planes

  • In what follows we summarize the results of sweeping values for epsilon in the range [1e-9, 1e-4] (in particular, we set epsilonMin = epsilonMax to define the epsilon value).
  • It is interesting to note that AccurateAdvance does appear in the callgraph for some choices of stepMax (in fact, what we claimed in the meeting was not entirely correct, as the experiments were run setting stepMax = 1 mm).
    • In particular,
      • When stepMax = 2.5 mm, AccurateAdvance is called for every epsilon > 1e-7.
      • When stepMax = 25 mm, AccurateAdvance is called for every epsilon > 1e-5.
  • Also, when adding planes, AccurateAdvance is always called from G4ChordFinder::ApproxCurvePointV (the previous item refers to occurrences of AccurateAdvance within AdvanceChordLimited).

Using stepMax = 0.25 mm

Epsilon With planes Without planes Callgraphs
1e-4 ComputeStep %: 55.76
AccurateAdvance %: 7.19
ComputeStep %: 42.98 Without planes
1e-5 ComputeStep %: 55.76
AccurateAdvance %: 7.19
ComputeStep %: 42.98
1e-6 ComputeStep %: 55.76
AccurateAdvance %: 7.19
ComputeStep %: 42.98
1e-7 ComputeStep %: 55.76
AccurateAdvance %: 7.19
ComputeStep %: 42.98
1e-8 ComputeStep %: 55.78
AccurateAdvance %: 7.25
ComputeStep %: 42.98
1e-9 ComputeStep %: 55.85
AccurateAdvance %: 7.38
ComputeStep %: 42.98 Without planes

Using stepMax = 2.5 mm

Epsilon With planes Without planes Callgraphs
1e-4 ComputeStep %: 72.56
AccurateAdvance %: 20.27
ComputeStep %: 21.91 Without planes
1e-5 ComputeStep %: 72.57
AccurateAdvance %: 20.29
ComputeStep %: 21.91
1e-6 ComputeStep %: 72.60
AccurateAdvance %: 20.36
ComputeStep %: 21.91
1e-7 ComputeStep %: 72.70
AccurateAdvance %: 20.66
ComputeStep %: 21.91
1e-8 ComputeStep %: 77.16
AccurateAdvance %: 33.52
ComputeStep %: 40.35
AccurateAdvance %: 23.48
1e-9 ComputeStep %: 80.38
AccurateAdvance %: 42.89
ComputeStep %: 50.90
AccurateAdvance %: 37.02
Without planes

Using stepMax = 25 mm

Epsilon With planes Without planes Callgraphs
1e-4 ComputeStep %: 77.16
AccurateAdvance %: 22.28
ComputeStep %: 10.07 Without planes
1e-5 ComputeStep %: 77.16
AccurateAdvance %: 22.30
ComputeStep %: 10.07
1e-6 ComputeStep %: 80.31
AccurateAdvance %: 32.95
ComputeStep %: 21.57
AccurateAdvance %: 12.72
1e-7 ComputeStep %: 82.60
AccurateAdvance %: 40.75
ComputeStep %: 28.63
AccurateAdvance %: 20.57
1e-8 ComputeStep %: 85.18
AccurateAdvance %: 49.53
ComputeStep %: 38.49
AccurateAdvance %: 31.55
1e-9 ComputeStep %: 87.77
AccurateAdvance %: 58.35
ComputeStep %: 48.19
AccurateAdvance %: 42.34
Without planes
  • For each experiment, the remaining parameters were defined as follows:
    • deltaOneStep: 1.0e-2 mm
    • deltaIntersection: 1.0e-3 mm
    • deltaChord: 0.25 mm
    • trackMaxLen: 10 m
  • Verbosity flags were turned off so as to speed up the simulations.

Using same set of parameters from Experiment 1.1

  • The simulations used to build the table below were configured as follows:
    • deltaOneStep: 1.0e-2 mm
    • deltaIntersection: 1.0e-5 mm
    • deltaChord: 0.25 mm
    • stepMax: 20 mm
    • trackMaxLen: 10 m
    • fNRep (only meaningful for With planes column): 200
Epsilon With planes Without planes Callgraphs
1e-3 ComputeStep %: 81.12
AccurateAdvance %: 29.06
ComputeStep %: 12.16 With planes
Without planes
1e-4 ComputeStep %: 81.12
AccurateAdvance %: 29.07
ComputeStep %: 12.16
1e-5 ComputeStep %: 81.13
AccurateAdvance %: 29.09
ComputeStep %: 12.16
1e-6 ComputeStep %: 83.31
AccurateAdvance %: 37.24
ComputeStep %: 21.44
AccurateAdvance %: 10.51
1e-7 ComputeStep %: 85.02
AccurateAdvance %: 43.68
ComputeStep %: 28.45
AccurateAdvance %: 18.50
1e-8 ComputeStep %: 86.99
AccurateAdvance %: 51.06
ComputeStep %: 39.37
AccurateAdvance %: 30.92
1e-9 ComputeStep %: 89.08
AccurateAdvance %: 58.94
ComputeStep %: 49.07
AccurateAdvance %: 41.96
1e-10 ComputeStep %: 92.05
AccurateAdvance %: 70.09
ComputeStep %: 61.35
AccurateAdvance %: 55.96
1e-11 ComputeStep %: 94.65
AccurateAdvance %: 79.89
ComputeStep %: 72.57
AccurateAdvance %: 68.74
1e-12 ComputeStep %: 96.50
AccurateAdvance %: 86.84
ComputeStep %: 81.88
AccurateAdvance %: 79.35
With planes
Without planes

Callgraph description

  • These graphs are generated using gprof2dot .
  • The README file of the project provides a brief description of the graphs, which we summarize next:
    • A function node includes three numbers: total time, self time (in brackets) and total calls.
      • total time is the percentage of time spent in the function, including calls to its children.
      • self time is the percentage of time spent in the function without considering any call to its children.
      • total calls is the number of times the function was called.
    • An edge between functions indicates a caller-callee relationship and is annotated with two values: total time and calls.
      • total time is the percentage of time the parent spent inside the child.
      • calls is the number of times the parent called the child.

Sequence diagrams

  • In addition, we created some sequence diagrams to illustrate key portions of the transportation chain.
  • These diagrams were used along with the callgraphs to validate what we observed statically and to drive the experimentation.
  • Please note that this is still a work in progress. Also, the diagrams are very simplified in order to capture the essentials of the methods.