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

Resolve "Use the common bench scripts"

parent 13fbf73d
Branches
Tags
1 merge request!73Resolve "Use the common bench scripts"
Pipeline #9295 passed
......@@ -10,40 +10,39 @@ workflow:
default:
before_script:
- mkdir -p images && mkdir -p doc/
- git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git
&& ln -s accelerator/eic
- git clone https://eicweb.phy.anl.gov/EIC/detectors/ip6.git eic_ip6
&& mkdir ip6_build
&& cd ip6_build
&& cmake ../eic_ip6/. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr/local
&& make -j20
&& make install
&& cd ..
&& ln -s eic_ip6/ip6 || exit 1
- mkdir build
&& cd build
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17
&& make -j20
&& make install
&& cd .. || exit 1
- source .local/bin/env.sh
artifacts:
expire_in: 1 week
paths:
- images/
- doc/
- .local/detector
- .local/lib
- .local/bin
- .local/include
- .local/share
- results
- config
- images
- doc
- juggler.env
reports:
dotenv: juggler.env
stages:
- config
- initialize
- build
- docs
- test
- collect
- finalize
- deploy
env:
stage: config
common:setup:
stage: config
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
before_script:
- git clone https://eicweb.phy.anl.gov/EIC/benchmarks/common_bench.git setup
script:
- export JUGGLER_DETECTOR="reference_detector"
- |
......@@ -56,15 +55,23 @@ env:
echo "JUGGLER_DETECTOR_VERSION=$CI_COMMIT_REF_NAME" >> juggler.env
echo "JUGGLER_DETECTOR=$JUGGLER_DETECTOR" >> juggler.env
fi
artifacts:
reports:
dotenv: juggler.env
- source setup/bin/env.sh && ./setup/bin/install_common.sh
common:detector:
stage: initialize
needs: ["common:setup"]
script:
- source .local/bin/env.sh && build_detector.sh
- mkdir_local_data_link sim_output
- mkdir -p results
- mkdir -p config
- mkdir -p doc
- print_env.sh
compile:
stage: build
needs:
- ["env"]
- ["common:detector"]
script:
- mkdir -p build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 && make install && cd ..
- echo "Build successful."
......@@ -72,11 +79,7 @@ compile:
.views:
stage: docs
needs:
- ["compile"]
artifacts:
paths:
- images/
- doc/
- ["common:detector"]
include:
- local: 'views/view1.yml'
......@@ -98,11 +101,12 @@ report:
- view_03
- view_06
- view_07
- view_11
- view_12
- view_13
- view_14
- view_15
- dump_constants
artifacts:
paths:
- images/
- doc/
script:
- pip3 install jinja2 && ls -lrth
- ./bin/make_images > doc/dawn_views.md
......@@ -110,28 +114,37 @@ report:
dump_constants:
stage: test
needs:
- ["compile"]
- ["common:detector"]
script:
- npdet_info dump reference_detector.xml | tee doc/constants.out
- npdet_info dump ${DETECTOR_PATH}/reference_detector.xml | tee doc/constants.out
overlap_check:
stage: test
needs:
- ["compile"]
- ["common:detector"]
script:
- checkOverlaps -c reference_detector.xml | tee doc/overlap_check.out
- checkOverlaps -c ${DETECTOR_PATH}/reference_detector.xml | tee doc/overlap_check.out
- echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..."
- if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "0" ]] ; then echo "Overlaps exist!" && false ; fi
detector:config_testing:
stage: test
needs:
- ["compile"]
- ["common:detector"]
script:
- checkOverlaps -c reference_detector.xml | tee doc/overlap_check.out | wc -l
- checkOverlaps -c ${DETECTOR_PATH}/reference_detector.xml | tee doc/overlap_check.out | wc -l
- cat doc/overlap_check.out
allow_failure: true
#benchmarks:reconstruction:
# stage: deploy
# variables:
# JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
# JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
# trigger:
# project: EIC/benchmarks/reconstruction_benchmarks
# strategy: depend
# needs: ["env","overlap_check","report"]
#benchmarks:reconstruction:
# stage: deploy
# variables:
......
......@@ -30,20 +30,21 @@ Here is how to begin:
3. Create a WIP (or draft) merge request and look at the CI output for debugging. Then go to back to 2 if changes are needed.
4. Remove the WIP/Draft part of the merge request if you would like to see your changes merged into the master.
### Compiling
See:
- [Talk at computing round table](https://indico.jlab.org/event/420/#17-automated-workflow-for-end)
### Compiling (avoid it)
First, see if the use case above is best for you. It most likely is and can save a lot of time for newcomers.
To run the simulation locally, we suggest using the singularity image.
More details can be found at the links below:
- https://dd4hep.web.cern.ch/dd4hep/page/beginners-guide/
- https://eic.phy.anl.gov/tutorials/eic_tutorial/
- https://eicweb.phy.anl.gov/containers/eic_container/
Related useful links
--------------------
......
......@@ -35,7 +35,7 @@ SKIP_EVENTS=0
DETECTOR_ONLY=0
FILE_TAG="view"
DAWN_RUN_DIR="scripts/view1"
DETECTOR_FILE="reference_detector.xml"
DETECTOR_FILE="${DETECTOR_PATH}/reference_detector.xml"
POSITIONAL=()
while [[ $# -gt 0 ]]
......@@ -97,7 +97,9 @@ rm -f *.prim
if [ "${DETECTOR_ONLY}" -eq "1" ] ; then
./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
./scripts/run_detector_simulation.py \
--compact ${DETECTOR_PATH}/reference_detector.xml \
-i scripts/input_data/few_events.hepmc \
-o derp.root -n 1 \
--ui csh --vis -b -m macro/dawn_picture.mac &
......@@ -113,7 +115,9 @@ kill %1
else
echo " Running simulation for tracks"
./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
./scripts/run_detector_simulation.py \
--compact ${DETECTOR_PATH}/reference_detector.xml \
-i scripts/input_data/few_events.hepmc \
-o derp.root -s ${SKIP_EVENTS} -n 1 \
--ui csh --vis -b -m macro/dawn_picture2.mac &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment