Skip to content
Snippets Groups Projects
Unverified Commit 9f37fa2f authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

Snakefile: add warmup job to avoid parallel gdml downloads (#14)

This is needed to facilitate running benchmarks where downloads may
happen.

https://github.com/eic/epic/pull/588
fails in
https://eicweb.phy.anl.gov/EIC/benchmarks/detector_benchmarks/-/jobs/2627824

This is similar to https://github.com/eic/physics_benchmarks/pull/5
parent 6a9eab54
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,21 @@ include: "benchmarks/backgrounds/Snakefile"
include: "benchmarks/barrel_ecal/Snakefile"
include: "benchmarks/ecal_gaps/Snakefile"
rule warmup_run:
output:
"warmup/{DETECTOR_CONFIG}.edm4hep.root",
message: "Ensuring that calibrations/fieldmaps are available for {wildcards.DETECTOR_CONFIG}"
shell: """
ddsim \
--runType batch \
--numberOfEvents 1 \
--compactFile "$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml" \
--outputFile "{output}" \
--enableGun
"""
rule matplotlibrc:
output:
".matplotlibrc",
......
......@@ -34,7 +34,8 @@ rule backgrounds_get_DIS:
rule backgrounds_sim:
input:
"input/backgrounds/{NAME}.hepmc",
hepmc="input/backgrounds/{NAME}.hepmc",
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
output:
"sim_output/{DETECTOR_CONFIG}/backgrounds/{NAME}.edm4hep.root",
log:
......@@ -50,7 +51,7 @@ ddsim \
-v WARNING \
--numberOfEvents {params.N_EVENTS} \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--inputFiles {input} \
--inputFiles {input.hepmc} \
--outputFile {output}
"""
......
......@@ -4,6 +4,7 @@ import os
rule ecal_gaps_sim:
input:
steering_file=provider.remote(remote_path("EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer")),
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
output:
"sim_output/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
log:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment