Commit 2b45e8de authored by sfritschi's avatar sfritschi
Browse files

Improved comparison script

parent c5a13ba7
...@@ -7,7 +7,7 @@ import netflow_serial.netgen as netgen_ser ...@@ -7,7 +7,7 @@ import netflow_serial.netgen as netgen_ser
from time import perf_counter from time import perf_counter
def compute_target_sizes(max_power2 = 2): def compute_target_sizes(max_power2):
power = 0 power = 0
d = 3 d = 3
target_sizes = [[1, 1, 1]] target_sizes = [[1, 1, 1]]
...@@ -23,8 +23,8 @@ def compute_target_sizes(max_power2 = 2): ...@@ -23,8 +23,8 @@ def compute_target_sizes(max_power2 = 2):
return target_sizes return target_sizes
def main(): def main():
if (len(sys.argv) != 2): if (len(sys.argv) != 3):
raise AssertionError("Usage: python3 compare.py <nthreads>") raise AssertionError("Usage: python3 compare.py <nthreads> <max_power>")
basenet = netgen_par.load_network_from('../network/network.h5') basenet = netgen_par.load_network_from('../network/network.h5')
print("Network statistics:") print("Network statistics:")
print("Throats: %d" % len(basenet.throats)) print("Throats: %d" % len(basenet.throats))
...@@ -35,7 +35,7 @@ def main(): ...@@ -35,7 +35,7 @@ def main():
nthreads = int(sys.argv[1]) nthreads = int(sys.argv[1])
print("Using: {} threads".format(nthreads)) print("Using: {} threads".format(nthreads))
targetsizes = compute_target_sizes(1) targetsizes = compute_target_sizes(int(sys.argv[2]))
cutoff = 0.5 * max([basenet.ub[i] - basenet.lb[i] \ cutoff = 0.5 * max([basenet.ub[i] - basenet.lb[i] \
for i in range(len(basenet.ub))]) for i in range(len(basenet.ub))])
......
#!/bin/bash
# Targets Xeon Gold 6150 nodes with 36 cores/node
bsub -n 36 -W 04:00 -R fullnode python3 perf.py 36 2
Markdown is supported
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