diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..b2864780e52d45b568c78eadda60eaeea2756b83 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ + + + +powercap-measurement: + variables: + CUSTOM_CI_BUILDS_DIR: $[[inputs.build_dir]] + id_tokens: + SITE_ID_TOKEN: + aud: "https://gitlab.jsc.fz-juelich.de" + tags: + - jedi + - jacamar + - login + - shell + script: + - module load JUBE + - export JUBE_INCLUDE_PATH=$PWD/jube + - | + jutil env activate \ + --project cjsc \ + --budget zam \ + --reservation test-alvarez-jpbot-001-22 + - jube-autorun -r "-e --outpath ../outpath" benchmark.yml + - jube result --style csv ../outpath > benchmark.csv + + +powercap-plotting: + image: registry.jsc.fz-juelich.de/exacb/docker/report:latest + tags: + - docker + needs: + - job: powercap-measurement + artifacts: true + artifacts: + paths: + - benchmark.pdf + script: + - python -m venv venv + - source venv/bin/activate + - pip install matplotlib + - python post/plotting.py --input benchmark.csv --output benchmark.pdf + diff --git a/benchmark.yml b/benchmark.yml index 37b85e319236b4b6ee3fa3c4e3a2c90e707ebf78..c6a8f4c233c6b0b8fbc2157a41d725bd11ddf89f 100644 --- a/benchmark.yml +++ b/benchmark.yml @@ -12,7 +12,7 @@ parameterset: - name: benchParam parameter: - name: inputpowercap - _: "100, 200, 300" + _: "100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300" - name: systemParam init_with: "platform.xml:systemParameter" parameter: @@ -31,7 +31,7 @@ parameterset: parameter: - name: args_starter _: "--cpu-bind=none" - + step: - name: build use: @@ -69,7 +69,7 @@ patternset: - name: performance _: ${jube_pat_int} - + analyser: - name: bench_info analyse: diff --git a/post/plotting.py b/post/plotting.py new file mode 100644 index 0000000000000000000000000000000000000000..cb976b2dacc4af29222e9b5b5df6ddd511eac852 --- /dev/null +++ b/post/plotting.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + + +import matplotlib.pyplot +import csv +import argparse + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--input", help="input file") + parser.add_argument("--output", help="output file") + args = parser.parse_args() + filename = args.input + + x = [] + y = [] + + with open(filename) as f: + plots = csv.reader(f, delimiter=",") + for row in plots: + x.append(int(row[0])) + y.append(int(row[1])) + + fig, ax = matplotlib.pyplot.subplots() + ax.plot(x, y) + ax.set(xlabel="power", ylabel="performance", title="Graph") + matplotlib.pyplot.savefig(args.output) + + +