From 5b08f435327695bb633cd21ae8252b25528de3f6 Mon Sep 17 00:00:00 2001 From: Connor Moore Date: Mon, 23 Mar 2026 01:40:30 -0400 Subject: New report and code for final submission. --- runSims.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 runSims.py (limited to 'runSims.py') 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 -- cgit v1.2.3