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

Fixed up the dvcs

- added some dummy junit reports.
parent ad6ea1af
No related branches found
No related tags found
1 merge request!11Put back dvcs
......@@ -42,3 +42,6 @@ summary:
needs: ["dis:results", "dvcs:results", "dvmp:results"]
script:
- echo "All benchmarks passed"
artifacts:
reports:
junit: ["results/dvcs/report2.xml"]
......@@ -36,7 +36,7 @@ echo "JUGGLER_DETECTOR: ${JUGGLER_DETECTOR}"
## Number of events that will be processed by the reconstruction
if [ ! -n "${JUGGLER_N_EVENTS}" ] ; then
export JUGGLER_N_EVENTS=100
export JUGGLER_N_EVENTS=10
fi
echo "JUGGLER_N_EVENTS: ${JUGGLER_N_EVENTS}"
......
......@@ -3,7 +3,7 @@ dvcs:process:
timeout: 1 hour
needs: ["detector"]
script:
- echo "dvcd benchmark"
- bash dvcs/dvcs.sh
artifacts:
paths:
- results
......@@ -13,3 +13,9 @@ dvcs:results:
needs: ["dvcs:process"]
script:
- echo "All DVCS benchmarks successful"
artifacts:
paths:
- results
reports:
junit: ["results/dvcs/report.xml"]
#!/bin/bash
if [[ ! -n "${JUGGLER_DETECTOR}" ]] ; then
export JUGGLER_DETECTOR="topside"
fi
if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then
export JUGGLER_N_EVENTS=100
fi
# only used when running locally (not in CI)
if [[ ! -n "${JUGGLER_INSTALL_PREFIX}" ]] ; then
export JUGGLER_INSTALL_PREFIX="/usr/local"
fi
# these variables might not need exported.
export JUGGLER_FILE_NAME_TAG="dvcs"
......@@ -23,18 +10,15 @@ echo "JUGGLER_N_EVENTS = ${JUGGLER_N_EVENTS}"
echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
echo "JUGGLER_FILE_NAME_TAG = ${JUGGLER_FILE_NAME_TAG}"
### Build the detector constructors.
git clone https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git
git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git
pushd ${JUGGLER_DETECTOR}
ln -s ../accelerator/eic
popd
mkdir ${JUGGLER_DETECTOR}/build
pushd ${JUGGLER_DETECTOR}/build
cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j30 install
popd
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
##
## You can ready config/env.sh for more in-depth explanations of the variables
## and how they can be controlled.
source config/env.sh
pushd ${JUGGLER_DETECTOR}
curl -o test_proton_dvcs_eic.hepmc "https://eicweb.phy.anl.gov/api/v4/projects/345/jobs/artifacts/master/raw/data/test_proton_dvcs_eic.hepmc?job=compile"
if [[ "$?" -ne "0" ]] ; then
......@@ -42,33 +26,28 @@ if [[ "$?" -ne "0" ]] ; then
exit 1
fi
## run geant4 simulations
npsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \
-v WARNING \
-v ERROR \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${JUGGLER_DETECTOR}.xml \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles test_proton_dvcs_eic.hepmc \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script"
echo "ERROR running npsim"
exit 1
fi
# Need to figure out how to pass file name to juggler from the commandline
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv \
gaudirun.py ../options/tracker_reconstruction.py
gaudirun.py options/tracker_reconstruction.py
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler"
exit 1
fi
ls -l
popd
pwd
mkdir -p results/dvcs
echo "STAND-IN FOR ANALYSIS SCRIPT"
#root -b -q "dis/scripts/rec_dis_electrons.cxx(\"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
#if [[ "$?" -ne "0" ]] ; then
......@@ -76,7 +55,16 @@ echo "STAND-IN FOR ANALYSIS SCRIPT"
# exit 1
#fi
# copy data if it is not too big
if [[ "${JUGGLER_N_EVENTS}" -lt "500" ]] ; then
cp ${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE} results/dvcs/.
cp ${JUGGLER_REC_FILE} results/dvcs/.
fi
# Collect the results
cp dvcs/report.xml results/dvcs/.
cp dvcs/report2.xml results/dvcs/.
<testsuites>
<testsuite name="DVCS" tests="3" failures="1">
<testcase classname="foo1" name="ASuccessfulTest" time="10.0"/>
<testcase classname="foo2" name="AnotherSuccessfulTest" time="20.0"/>
<testcase classname="foo3" name="AFailingTest" time="30.0">
<failure type="NotEnoughFoo"> details about failure </failure>
</testcase>
</testsuite>
</testsuites>
<testsuite tests="3">
<testcase time="1.00" classname="bar1" name="ASuccessfulTest2"/>
<testcase time="2.00" classname="bar2" name="AnotherSuccessfulTest2">
<!--
<system-out>[[ATTACHMENT|/absolute/path/to/some/file]]</system-out>
-->
</testcase>
<testcase time="3.00" classname="bar3" name="AFailingTest2">
<failure type="NotEnoughFoo"> MORE details about failure </failure>
</testcase>
</testsuite>
......@@ -12,7 +12,10 @@ if "JUGGLER_DETECTOR" in os.environ :
input_sim_file = str(os.environ["JUGGLER_SIM_FILE"])
output_rec_file = str(os.environ["JUGGLER_REC_FILE"])
n_events = str(os.environ["JUGGLER_N_EVENTS"])
detector_path = str(os.environ["JUGGLER_DETECTOR_PATH"])
detector_path = detector_name
if "DETECTOR_PATH" in os.environ :
detector_path = str(os.environ["DETECTOR_PATH"])
geo_service = GeoSvc("GeoSvc",
detectors=["{}/{}.xml".format(detector_path, detector_name)])
......@@ -205,3 +208,4 @@ ApplicationMgr(
OutputLevel=DEBUG
)
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