diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c428c1dbf071d034dc1a633512d96ac529d19c3..58358c46a26668bff87232e1510262fc3215b26e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1856,7 +1856,9 @@ conda-py36-linux: - mpirun --allow-run-as-root -np 8 --map-by core --bind-to core --report-bindings ./PE_GranularGas PE_Benchmark.cfg --HCSITS --syncNextNeighbor --InelasticCoulombContactByDecoupling | tee GranularGas_HCSITS_NN_ICCBD.txt - mpirun --allow-run-as-root -np 8 --map-by core --bind-to core --report-bindings ./PE_GranularGas PE_Benchmark.cfg --HCSITS --syncNextNeighbor --InelasticGeneralizedMaximumDissipationContact | tee GranularGas_HCSITS_NN_IGMDC.txt - mpirun --allow-run-as-root -np 8 --map-by core --bind-to core --report-bindings ./PE_GranularGas PE_Benchmark.cfg --HCSITS --syncShadowOwners --InelasticFrictionlessContact | tee GranularGas_HCSITS_SO_IFC.txt - - python3 upload.py + - python3 pe_upload.py + - mpirun --allow-run-as-root -np 8 --map-by core --bind-to core --report-bindings ./MESA_PD_KernelBenchmark MESA_PD_Benchmark.cfg | tee mesa_pd.txt + - python3 mesa_pd_upload.py only: variables: - $ENABLE_BENCHMARKS @@ -1865,7 +1867,7 @@ conda-py36-linux: artifacts: paths: - $CI_PROJECT_DIR/build/apps/benchmarks/GranularGas/*.txt - - $CI_PROJECT_DIR/build/apps/benchmarks/GranularGas/benchmark.sqlite + - $CI_PROJECT_DIR/build/apps/benchmarks/GranularGas/*.sqlite benchmark_intel19: <<: *benchmark_definition diff --git a/apps/benchmarks/GranularGas/MESA_PD_Benchmark.cfg b/apps/benchmarks/GranularGas/MESA_PD_Benchmark.cfg new file mode 100644 index 0000000000000000000000000000000000000000..99f8958ae1fcb15ee7e3c10ed0d4c442610fc435 --- /dev/null +++ b/apps/benchmarks/GranularGas/MESA_PD_Benchmark.cfg @@ -0,0 +1,29 @@ +GranularGas +{ + simulationCorner < 0, 0, 0 >; + simulationDomain < 160, 160, 160 >; + blocks < 1,1,1 >; + isPeriodic < 1, 1, 1 >; + initialRefinementLevel 1; + sorting linear; + + LBAlgorithm Morton; + baseWeight 1; + + recalculateBlockLevelsInRefresh 1; + reevaluateMinTargetLevelsAfterForcedRefinement 1; + allowRefreshChangingDepth 1; + regridMin 2000; + regridMax 100; + + normal <1,1,1>; + radius 0.6; + spacing 1.0; + vMax 0.0; + + dt 0.0001; + simulationSteps 100; + visSpacing 100; + + numOuterIterations 1; +} diff --git a/apps/benchmarks/GranularGas/PE_Benchmark.cfg b/apps/benchmarks/GranularGas/PE_Benchmark.cfg index da276e019cd1b10300e3b6dddc2e108f191a3281..458a3a60e1dd69f745769790fc8905f002c9e4ef 100644 --- a/apps/benchmarks/GranularGas/PE_Benchmark.cfg +++ b/apps/benchmarks/GranularGas/PE_Benchmark.cfg @@ -10,8 +10,8 @@ GranularGas spacing 1.0; vMax 0.0; - dt 0.1; - simulationSteps 1000; + dt 0.1; + simulationSteps 100; numOuterIterations 1; visSpacing 100; diff --git a/apps/benchmarks/GranularGas/mesa_pd_upload.py b/apps/benchmarks/GranularGas/mesa_pd_upload.py new file mode 100755 index 0000000000000000000000000000000000000000..492c58e09875f46c8ac293c9ce33a9058d43d120 --- /dev/null +++ b/apps/benchmarks/GranularGas/mesa_pd_upload.py @@ -0,0 +1,52 @@ +#! /usr/bin/env python3 + +import os +import time +import math +import random +import re +from influxdb import InfluxDBClient +from git import Repo + + +class Upload: + def __init__(self): + try: + self.write_user_pw = os.environ["INFLUXDB_MESAPD_PW"] + except KeyError: + import sys + print('Password for the InfluxDB write_user was not set.\n', + 'See https://docs.gitlab.com/ee/ci/variables/#secret-variables', file=sys.stderr) + exc_info = sys.exc_info() + raise exc_info[0].with_traceback(exc_info[1], exc_info[2]) + + self.client = InfluxDBClient('i10grafana.informatik.uni-erlangen.de', 8086, + 'mesa_pd', self.write_user_pw, 'mesa_pd') + + def process(self, filename): + tts = dict() + + with open(filename) as f: + for s in f.readlines(): + m = re.search(r'\[0\]\s*(\w*)\s*\|[\s\d\.\%]*\|\s*([\d\.]*)', s) + + if (m != None): + tts[m.group(1)] = float(m.group(2)) + + json_body = [ + { + 'measurement': 'mesa_pd_benchmark', + 'tags': { + 'host' : os.uname()[1], + 'image' : os.environ["DOCKER_IMAGE_NAME"], + }, + 'time': int(time.time()), + 'fields': tts + } + ] + print(tts) + self.client.write_points(json_body, time_precision='s') + +if __name__ == "__main__": + up = Upload() + up.process("mesa_pd.txt") diff --git a/apps/benchmarks/GranularGas/upload.py b/apps/benchmarks/GranularGas/pe_upload.py similarity index 100% rename from apps/benchmarks/GranularGas/upload.py rename to apps/benchmarks/GranularGas/pe_upload.py