diff options
Diffstat (limited to 'runSims.py')
| -rw-r--r-- | runSims.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/runSims.py b/runSims.py new file mode 100644 index 0000000..eee3451 --- /dev/null +++ b/runSims.py @@ -0,0 +1,23 @@ +import os +import time + +# Run the benchmark programs +startTime = time.time() + +# Run simulations for the listed parameters +Ns = [1024,2048,4096] # Number of particles +Ps = [1,2,4,8,16] # Number of threads +Ss = [1,2,4,8,16,32,64,128,256,512,1024,2048,4096] # Number of sectors per dimension + +for N in Ns: + for P in Ps: + for S in Ss: + t0 = time.time() + print(f"Running simulation with N={N}, P={P}, S={S}") + os.system(f"./simulationLD -N {N} -P {P} -S {S}") + runtime = time.time() - t0 + msg = f"N={N}, P={P}, S={S} | {round(runtime, 4)} seconds." + + +endTime = time.time() +elapsedTime = endTime - startTime |
