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

Physics benchmarks repository

Initial Commit
parents
No related branches found
No related tags found
No related merge requests found
Physics Benchmarks for the EIC
==============================
[![pipeline status](https://eicweb.phy.anl.gov/jihee.kim/benchmarks/badges/master/pipeline.svg)](https://eicweb.phy.anl.gov/jihee.kim/benchmarks/-/commits/master)
## Adding new benchmarks
### Pass/Fail tests
- Create a script that returns exit status 0 for success.
- Any non-zero value will be considered failure.
- Script
#!/bin/bash
set -o nounset
set -o errexit
CI_TAG=sodium
BENCHMARK_SCRIPT_DIR=.
CI_JOB_PREFIX=cal_test_
function print_the_help {
echo "USAGE: $0 [-t <runner_tag>] "
echo " OPTIONS: "
echo " -i,--input Input scripts directory "
echo " -t,--tag Gitlab Runner tag"
echo " -p,--prefix job name prefix"
exit
}
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift # past argument
print_the_help
;;
-i|--input)
BENCHMARK_SCRIPT_DIR="$2"
shift # past argument
shift # past value
;;
-t|--tag)
CI_TAG="$2"
shift # past argument
shift # past value
;;
-p|--prefix)
CI_JOB_PREFIX="$2"
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
print_the_help
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
shopt -s nullglob
ifile=0
cat <<EOF
stages:
#- simulate
- benchmarks
EOF
for script_name in ${BENCHMARK_SCRIPT_DIR}/*.sh
do
filename=$(basename ${script_name})
filename_noext="${filename%%.*}"
ifile=$((ifile+1))
cat <<EOF
${CI_JOB_PREFIX}${ifile}_${filename_noext}:
stage: benchmarks
script:
- bash ${script_name}
artifact:
paths:
- results/
allow_failure: true
EOF
done
for script_name in ${BENCHMARK_SCRIPT_DIR}/*.cxx
do
filename=$(basename ${script_name})
filename_noext="${filename%%.*}"
ifile=$((ifile+1))
cat <<EOF
${CI_JOB_PREFIX}${ifile}_${filename_noext}:
stage: benchmarks
script:
- root -b -q ${script_name}
artifact:
paths:
- results/
allow_failure: true
EOF
done
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