Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
reconstruction_benchmarks
Commits
173bf614
Commit
173bf614
authored
2 years ago
by
Christopher Dilks
Browse files
Options
Downloads
Patches
Plain Diff
feat: define analysis benchmark command
parent
90017161
Branches
Branches containing commit
No related tags found
2 merge requests
!309
Irt algo
,
!293
feat: dRICH benchmarks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/rich/run_benchmark.rb
+41
-11
41 additions, 11 deletions
benchmarks/rich/run_benchmark.rb
with
41 additions
and
11 deletions
benchmarks/rich/run_benchmark.rb
+
41
−
11
View file @
173bf614
...
...
@@ -84,10 +84,19 @@ OptionParser.new do |o|
exit
2
end
end
.
parse!
(
ARGV
.
length
>
0
?
ARGV
:
[
'--help'
])
# print options
puts
'settings: {'
.
upcase
opt
.
each_pair
{
|
k
,
v
|
puts
"
#{
k
.
to_s
.
rjust
(
20
)
}
=>
#{
v
}
"
}
puts
'}'
# check for required options
if
opt
.
evgen
==
''
and
opt
.
ana_only
==
false
$stderr
.
puts
"ERROR: required options have not been set"
$stderr
.
puts
"run '
#{
$0
}
--help' for guidance"
exit
1
end
# get compact file
if
ENV
[
'DETECTOR_PATH'
].
nil?
or
ENV
[
'DETECTOR_CONFIG'
].
nil?
$stderr
.
puts
"ERROR: unknown DETECTOR_PATH or DETECTOR_CONFIG"
...
...
@@ -106,16 +115,16 @@ end
# fixed angle particle gun
evgen_fixed_angle
=
Proc
.
new
do
|
theta
,
energy
,
particle
|
[
'
npsim
'
,
'
--runType
'
,
'
batch
'
,
'
--compactFile
'
,
compact_file
,
'
--outputFile
'
,
opt
.
sim_file
,
'
--part.userParticleHandler=
""'
,
'
--enableGun
'
,
'
--numberOfEvents
'
,
opt
.
num_events
,
'
--gun.particle
'
,
particle
,
'
--gun.energy
'
,
"
#{
energy
}
*GeV"
,
'
--gun.direction
'
,
"
(
#{
theta2xyz
(
theta
).
join
'
,
'
}
)"
,
"
npsim
"
,
"
--runType
batch
"
,
"
--compactFile
#{
compact_file
}
"
,
"
--outputFile
#{
opt
.
sim_file
}
"
,
"
--part.userParticleHandler=
''"
,
"
--enableGun
"
,
"
--numberOfEvents
#{
opt
.
num_events
}
"
,
"
--gun.particle
#{
particle
}
"
,
"
--gun.energy
#{
energy
}
*GeV"
,
"
--gun.direction
(
#{
theta2xyz
(
theta
).
join
"
,
"
}
)"
,
]
end
...
...
@@ -154,14 +163,32 @@ recon_cmd = [
opt
.
sim_file
,
]
# define analysis benchmark command
# ---------------------------------------------------
analysis_cmd
=
[
opt
.
benchmark_exe
,
"-i
#{
opt
.
rec_file
}
"
,
"-o
#{
opt
.
ana_file
}
"
,
]
analysis_cmd
.
append
"-a
#{
opt
.
algos
.
join
' '
}
"
if
opt
.
algos
.
size
>
0
analysis_cmd
.
append
'-'
+
'v'
*
opt
.
verbosity
if
opt
.
verbosity
>
0
# execute commands
# ---------------------------------------------------
exe
=
Proc
.
new
do
|
cmd_args
,
name
|
cmd
=
cmd_args
.
join
' '
puts
"
#{
name
}
command:"
.
upcase
puts
cmd
cmd_args
.
each_with_index
do
|
arg
,
i
|
line
=
i
==
0
?
''
:
' '
line
+=
arg
line
+=
' \\'
unless
i
+
1
==
cmd_args
.
size
puts
line
end
unless
opt
.
dry_run
puts
'-'
*
50
puts
"
#{
name
}
execution:"
.
upcase
system
cmd
or
raise
"
#{
name
}
failed!"
end
puts
'-'
*
50
...
...
@@ -172,3 +199,6 @@ unless opt.ana_only
exe
.
call
evgen_cmd
,
'event generator'
if
opt
.
run_sim
exe
.
call
recon_cmd
,
'reconstruction'
if
opt
.
run_rec
end
if
opt
.
ana_only
or
opt
.
run_ana
exe
.
call
analysis_cmd
,
'benchmark analysis'
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment