Skip to content
Snippets Groups Projects
Commit c9422fa4 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Adding environment variables to control execution

- No longer trigger child pipeline so that gitlab variables can be used
to set the number of evnets, detector, etc...
parent 1eb3f32a
No related branches found
No related tags found
1 merge request!6Adding environment variables to control execution
......@@ -2,7 +2,7 @@ image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:latest
default:
artifacts:
expire_in: 10 mins
expire_in: 60 mins
paths:
- config/
- results/
......@@ -45,7 +45,6 @@ generate_config:
script:
- mkdir -p config && ./bin/gen_ci_config -p test_ -i dummy > config/dummy_config.yml
- mkdir -p config && ./bin/gen_ci_config -p clustering_ -i clustering > config/clustering_config.yml
- mkdir -p config && ./bin/gen_ci_config -p ecal_ -i ecal > config/ecal_config.yml
dummy-pipeline:
stage: run
......@@ -65,14 +64,17 @@ clustering-pipeline:
job: generate_config
strategy: depend
ecal-pipeline:
stage: run
needs: ["generate_config"]
trigger:
include:
- artifact: config/ecal_config.yml
job: generate_config
strategy: depend
include:
- local: 'ecal/ecal_config.yml'
#ecal-pipeline:
# stage: run
# needs: ["get_data"]
# trigger:
# include:
# - artifact: config/ecal_config.yml
# job: generate_config
# strategy: depend
#crystal_electron_simulation:
# stage: run
......
ecal_1_emcal_electrons:
image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:latest
tags:
- silicon
timeout: 12 hours 30 minutes
artifacts:
expire_in: 20 weeks
paths:
- results/
- sim_output/
stage: run
script:
- bash ecal/emcal_electrons.sh
#!/bin/bash
if [[ ! -n "${JUGGLER_DETECTOR}" ]] ; then
export JUGGLER_DETECTOR="topside"
fi
if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
export JUGGLER_N_EVENTS=1000
fi
export JUGGLER_FILE_NAME_TAG="emcal_uniform_electrons"
export JUGGLER_N_EVENTS=1000
export JUGGLER_DETECTOR="topside"
export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc"
export JUGGLER_SIM_FILE="sim_${JUGGLER_FILE_NAME_TAG}.root"
export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root"
echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets
root -b -q "datasets/emcal_electrons.cxx(1e4, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
root -b -q "datasets/emcal_electrons.cxx(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
git clone https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git
mkdir ${JUGGLER_DETECTOR}/build
......@@ -20,6 +31,7 @@ pushd ${JUGGLER_DETECTOR}
ls -l
# run geant4 simulations
npsim --runType batch \
-v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${JUGGLER_DETECTOR}.xml \
--inputFiles ../${JUGGLER_FILE_NAME_TAG}.hepmc \
......@@ -27,10 +39,16 @@ npsim --runType batch \
# Need to figure out how to pass file name to juggler from the commandline
xenv -x /usr/local/Juggler.xenv gaudirun.py ../ecal/options/example_crystal.py
ls -l
popd
ls -l
pwd
mkdir -p results
root -b -q "./scripts/makeplot.C(\"${JUGGLER_DETECTOR}/${JUGGLER_SIM_FILE}\")"
root -b -q "./scripts/makeplot.C(\"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
mkdir -p sim_output
cp "${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}" sim_output/.
cp "${JUGGLER_DETECTOR}/${JUGGLER_SIM_FILE}" sim_output/.
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