Skip to content

Commit

Permalink
Playing with benchmarks script
Browse files Browse the repository at this point in the history
  • Loading branch information
ABenC377 committed Oct 24, 2024
1 parent 34177e8 commit 5192777
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 56 deletions.
51 changes: 10 additions & 41 deletions .github/actions/simeng_benchmarks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,34 @@ name: simeng-benchmarks
description: runs simeng benchmarks

inputs:
BENCHMARK_BRANCH:
description: name of the branch on the benchmark repo you want to checkout
RUN_DIR:
description: directory from which the benchmark binary should be run
required: true
OS:
description: docker image name
BIN_PATH:
description: path to the binary for the benchmark
required: true
PAT:
description: personal access token required to checkout private benchmark repo
PASS_STRING:
description: string that is searched for in the benchmark's output to confirm whether or not it has passed
required: true

runs:
using: 'composite'
steps:

##################################
# clones repo with different versions of the checkout action, as container
# has different node versions and some compilers run on older OSes that
# have differing node versions
##################################

- if: ${{ contains(fromJson('["ubuntu:18.04"]'), matrix.OS) }}
name: checkout v3
uses: actions/checkout@v3
with:
repository: UoB-HPC/simeng-benchmarks
token: ${{ inputs.PAT }}
ref: makefile-build-system
path: simeng-benchmarks

- if: ${{ !contains(fromJson('["ubuntu:18.04"]'), matrix.OS) }}
name: checking out benchmark repository
uses: actions/checkout@v4
with:
repository: UoB-HPC/simeng-benchmarks
ref: makefile-build-system
token: ${{ inputs.PAT }}
path: simeng-benchmarks

- name: CloverLeaf serial gcc8.3.0 armv8.4
- name: Run Benchmark
shell: bash
run: |
echo "BASH running"
cd $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf
cd ${{ inputs.RUN_DIR }}
echo "cd done"
ls
simeng $GITHUB_WORKSPACE/configs/a64fx.yaml $SIMENG_BENCHMARKS_SRC_DIR/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4 >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp
if grep -q "This test is considered PASSED" $GITHUB_WORKSPACE/simeng.tmp; then
simeng $GITHUB_WORKSPACE/configs/a64fx.yaml ${{ inputs.BIN_PATH }} >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp
if grep -q ${{ inputs.PASS_STRING }} $GITHUB_WORKSPACE/simeng.tmp; then
echo "Passed"
else
echo "Failed"
exit 1
fi
# - name: run benchmark
# shell: bash
# run: |
# cd ./simeng-benchmarks/Tools/simulation/validation
# SIMENG_BENCHMARKS_SRC_DIR=$GITHUB_WORKSPACE/simeng-benchmarks python3 validate_simulation.py all_a64fx.json $GITHUB_WORKSPACE/configs/a64fx.yaml

# {
# "name": "CloverLeaf serial gcc8.3.0 armv8.4",
# "run_from": "$SIMENG_BENCHMARKS_SRC_DIR/Data_Files/CloverLeaf",
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/LINUX_BUILD_TEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: UoB-HPC/simeng-benchmarks
token: ${{ inputs.PAT }}
token: ${{ env.PAT }}
ref: makefile-build-system
path: simeng-benchmarks

Expand All @@ -172,24 +172,16 @@ jobs:
with:
repository: UoB-HPC/simeng-benchmarks
ref: makefile-build-system
token: ${{ inputs.PAT }}
token: ${{ env.PAT }}
path: simeng-benchmarks

- if: ${{ inputs.SIMENG-MODE == 'Release' }}
name: CloverLeaf serial gcc8.3.0 armv8.4
shell: bash
run: |
echo "BASH running"
cd $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf
echo "cd done"
ls
simeng $GITHUB_WORKSPACE/configs/a64fx.yaml $GITHUB_WORKSPACE/simeng-benchmarks/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4 >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp
if grep -q "This test is considered PASSED" $GITHUB_WORKSPACE/simeng.tmp; then
echo "Passed"
else
echo "Failed"
exit 1
fi
uses: ./.github/actions/simeng_benchmarks
with:
RUN_DIR: $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf
BIN_PATH: $GITHUB_WORKSPACE/simeng-benchmarks/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4
PASS_STRING: "This test is considered PASSED"


# - if: ${{ inputs.SIMENG-MODE == 'Release' }}
Expand Down

0 comments on commit 5192777

Please sign in to comment.