summaryrefslogtreecommitdiff
path: root/runSims.py
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-03-23 01:40:30 -0400
committerConnor Moore <connor@hhmoore.ca>2026-03-23 01:40:30 -0400
commit5b08f435327695bb633cd21ae8252b25528de3f6 (patch)
tree7eb5cdfa0acded8eaf8f1881e8542fe7b441d67c /runSims.py
parentf7ad40d801e30f542baaf471e0b0d08aacc212ee (diff)
New report and code for final submission.HEADmaster
Diffstat (limited to 'runSims.py')
-rw-r--r--runSims.py23
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