summaryrefslogtreecommitdiff
path: root/runSims.py
blob: eee3451efbd71dc7af6279ccc9c1de969fd0d79f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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