Skip to content
Snippets Groups Projects
Commit 8de8aba1 authored by David Southwick's avatar David Southwick
Browse files

inital steps to write to /results by default, write to simpletrack_summary.json

parent 9f256c3c
No related branches found
No related tags found
2 merge requests!75Qa,!74BMK-576
......@@ -40,7 +40,7 @@ stages:
environment:
name: test/$CI_COMMIT_REF_NAME
script:
- cd /simpletrack/examples/lhc && ./lhc-simpletrack.sh -b "all"
- cd /simpletrack/examples/lhc && ./lhc-simpletrack.sh -b "all" -w $CI_PROJECT_DIR/jobs
only:
variables:
- $CI_COMMIT_REF_NAME == "qa"
......
......@@ -11,7 +11,8 @@ RUN distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
RUN yum install -y python3 python3-devel python3-pip git gcc gcc-c++ ocl-icd-devel && pip3 install pybind11 mako pyopencl \
&& mkdir /.cache && chmod -R 777 /.cache \
&& git clone https://github.com/rdemaria/simpletrack \
&& cd simpletrack && pip3 install -e .
&& cd simpletrack && pip3 install -e . \
&& mkdir /results
COPY lhc/simpletrack/lhc-simpletrack.sh /simpletrack/examples/lhc/lhc-simpletrack.sh
......
......@@ -46,6 +46,7 @@ parse_args() {
--turns|-t) shift 1 ; TURNS=$1 ;;
--device|-d) shift 1 ; DEVICE=$1 ;;
--benchmark|-b) shift 1 ; BENCHMARK=$1 ;;
--resultsdir|-w) shift 1; WORK_DIR=$1 ;;
--show|-s) python3 benchmark_opencl.py -s ; exit 0 ;;
*) log error "Invalid argument: $*. Please use: $0 --help for the list of available options"
esac
......@@ -73,7 +74,7 @@ get_json() {
###################################
####### Main ######################
if [ ! "$CI_PROJECT_DIR" == "" ]; then WORK_DIR=$CI_PROJECT_DIR/jobs; else WORK_DIR="/tmp/jobs"; fi
if [[ -z "$WORK_DIR" ]]; then WORK_DIR="/results"; fi
if [ ! -d $WORK_DIR ]; then mkdir -p $WORK_DIR; fi
if [ -f $WORK_DIR/out.log ]; then rm $WORK_DIR/out.log; fi
......@@ -93,11 +94,11 @@ case $BENCHMARK in
log info "Running benchmark for ${#list[@]} device(s)";
for dev in "${list[@]}"
do
OUT=$(run_benchmark $dev); get_json $dev $OUT | tee -a $WORK_DIR/summary.json;
OUT=$(run_benchmark $dev); get_json $dev $OUT | tee -a $WORK_DIR/simpletrack_summary.json;
done ;;
device) log info "Running benchmark for $DEVICE device";
OUT=$(run_benchmark $DEVICE); get_json $DEVICE $OUT | tee -a $WORK_DIR/summary.json ;;
OUT=$(run_benchmark $DEVICE); get_json $DEVICE $OUT | tee -a $WORK_DIR/simpletrack_summary.json ;;
*) python3 benchmark_opencl.py -p $PARTICLES -t $TURNS -d $DEVICE 2>&1 | tee -a $WORK_DIR/out.log;
esac
......
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