Skip to content
Snippets Groups Projects
Commit 192ce149 authored by David Hendriks's avatar David Hendriks
Browse files

added script to automatically generate the tests

parent 7eee0def
No related branches found
No related tags found
No related merge requests found
# Script to generate the test script :P
import socket, psutil
import numpy as np
amount_of_cores = psutil.cpu_count(logical=False)
amount_of_cpus = psutil.cpu_count()
hostname = socket.gethostname()
if amount_of_cpus <= 4:
stepsize = 1
elif 4 < amount_of_cpus <= 24:
stepsize = 2
elif 24 < amount_of_cpus <= 48:
stepsize = 4
# Generate the lines to run
with open('run_tests_{}.sh'.format(hostname), 'w') as f:
command = ""
for cpu_count in np.arange(stepsize, amount_of_cpus + stepsize, stepsize):
command += "python3 evolve_population_comparing_with_multiprocessing.py 10 10 {} {}\n".format(cpu_count, hostname)
command += "python3 evolve_population_comparing_with_multiprocessing.py 20 20 {} {}\n".format(cpu_count, hostname)
command += "python3 evolve_population_comparing_with_multiprocessing.py 25 25 {} {}\n".format(cpu_count, hostname)
command += "python3 evolve_population_comparing_with_multiprocessing.py 35 35 {} {}\n".format(cpu_count, hostname)
command += "python3 evolve_population_comparing_with_multiprocessing.py 50 50 {} {}\n".format(cpu_count, hostname)
command += "\n"
f.write(command)
command = ""
python3 evolve_population_comparing_with_multiprocessing.py 10 10 1 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 20 20 1 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 25 25 1 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 35 35 1 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 50 50 1 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 10 10 2 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 20 20 2 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 25 25 2 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 35 35 2 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 50 50 2 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 10 10 3 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 20 20 3 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 25 25 3 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 35 35 3 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 50 50 3 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 10 10 4 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 20 20 4 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 25 25 4 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 35 35 4 david-Lenovo-IdeaPad-S340-14IWL
python3 evolve_population_comparing_with_multiprocessing.py 50 50 4 david-Lenovo-IdeaPad-S340-14IWL
(2, 225, 23.872895002365112, 17.51114845275879, 1.3632969343369403)
(2, 625, 76.88419461250305, 63.15470623970032, 1.2173945409656914)
(1, 100, 18.417582511901855, 19.06265616416931, 0.9661603479225548)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment