Commit 011039bd authored by Lukas Werner's avatar Lukas Werner
Browse files

Update benchmark.py

parent a26a97c8
Pipeline #351503 canceled with stages
in 9 minutes and 29 seconds
......@@ -25,7 +25,7 @@ class MeasureMESAPD:
kernelbenchmark_exec = os.path.join(self.benchmarkFolder, 'MESA_PD_KernelBenchmark')
kernelbenchmark_config = os.path.join(self.benchmarkFolder, 'MESA_PD_Benchmark.cfg')
kernelbenchmark_cmd = 'mpirun --allow-run-as-root -np '+str(min(8, self.numCores))+' --map-by core --bind-to core --report-bindings '+kernelbenchmark_exec+' '+kernelbenchmark_config
kernelbenchmark_cmd = 'mpirun --use-hwthread-cpus -np '+str(self.numCores)+' '+kernelbenchmark_exec+' '+kernelbenchmark_config
print(kernelbenchmark_cmd)
start = time.time()
......@@ -78,7 +78,7 @@ class MeasureMESAPD:
granulargas_exec = os.path.join(self.benchmarkFolder, 'MESA_PD_GranularGas')
granulargas_config = os.path.join(self.benchmarkFolder, 'GranularGas.cfg')
granulargas_cmd = 'mpirun --allow-run-as-root -np '+str(min(8, self.numCores))+' --map-by core --bind-to core '+granulargas_exec+' '+granulargas_config
granulargas_cmd = 'mpirun --use-hwthread-cpus -np '+str(self.numCores)+' '+granulargas_exec+' '+granulargas_config
print(granulargas_cmd)
start = time.time()
......@@ -108,6 +108,7 @@ class MeasureMESAPD:
return json_body
def main():
# write_user_pw = 'HCFusn9joVAt3C'
try:
write_user_pw = os.environ["CUSTOM_ENV_INFLUXDB_WRITE_USER_PASSWORD"]
except KeyError:
......@@ -123,10 +124,14 @@ def main():
print("Usage: " + sys.argv[0] + " num_cores build_folder")
exit(1)
numCores = int(sys.argv[1])
numCores = int(sys.argv[1])
buildFolder = sys.argv[2]
point_time = int(time.time())
host = os.uname()[1]
print("Using "+str(numCores)+" tasks on "+host+" for benchmarking, timestamp: "+str(point_time)+".")
json_body = []
# perform measurements
......@@ -140,9 +145,9 @@ def main():
for measurement in json_body:
measurement['time'] = point_time
measurement['fields']['commit'] = commit.hexsha
measurement['fields']['num_cores'] = int(numCores)
measurement['tags']['host'] = os.uname()[1]
measurement['fields']['num_cores'] = numCores
measurement['tags']['host'] = host
#print(json_body)
# upload to influx db
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment