Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_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
detector_benchmarks
Commits
e30c6f30
Commit
e30c6f30
authored
5 months ago
by
Dmitry Kalinkin
Browse files
Options
Downloads
Patches
Plain Diff
backwards_ecal: graceful handling of missing epic library
parent
c76bb63a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#106326
passed
4 months ago
Stage: status-pending
Stage: config
Stage: data_init
Stage: simulate
Stage: calibrate
Stage: benchmarks
Stage: collect
Stage: deploy
Stage: status-report
Changes
1
Pipelines
10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/backwards_ecal/Snakefile
+11
-1
11 additions, 1 deletion
benchmarks/backwards_ecal/Snakefile
with
11 additions
and
1 deletion
benchmarks/backwards_ecal/Snakefile
+
11
−
1
View file @
e30c6f30
...
@@ -22,11 +22,21 @@ def get_spack_package_hash(package_name):
...
@@ -22,11 +22,21 @@ def get_spack_package_hash(package_name):
print(e)
print(e)
return ""
return ""
@functools.cache
def find_epic_libraries():
# if library is not found (not avaliable) we return an empty list to let DAG still evaluate
libs = []
lib = ctypes.util.find_library("epic")
if lib is not None:
libs.append(os.environ["DETECTOR_PATH"] + "/../../lib/" + lib)
return libs
rule backwards_ecal_sim:
rule backwards_ecal_sim:
input:
input:
steering_file=ancient("EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer"),
steering_file=ancient("EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer"),
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
geometry_lib=
os.environ["DETECTOR_PATH"] + "/../../lib/" + ctypes.util.find_library("epic"
),
geometry_lib=
find_epic_libraries(
),
output:
output:
"sim_output/backwards_ecal/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
"sim_output/backwards_ecal/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
log:
log:
...
...
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