diff --git a/tests/population/scaling/generate_test_script.py b/tests/population/scaling/generate_test_script.py new file mode 100644 index 0000000000000000000000000000000000000000..46bc6357a7f9aa0cbc7f5fe64f6c26e1ec954d18 --- /dev/null +++ b/tests/population/scaling/generate_test_script.py @@ -0,0 +1,32 @@ +# 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 = "" diff --git a/tests/population/scaling/run_tests_david-Lenovo-IdeaPad-S340-14IWL.sh b/tests/population/scaling/run_tests_david-Lenovo-IdeaPad-S340-14IWL.sh new file mode 100755 index 0000000000000000000000000000000000000000..eba29c9774398b699ae2c0326bdc344fef0377ce --- /dev/null +++ b/tests/population/scaling/run_tests_david-Lenovo-IdeaPad-S340-14IWL.sh @@ -0,0 +1,24 @@ +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 + diff --git a/tests/population/scaling/scaling_results/comparison_result_david-Lenovo-IdeaPad-S340-14IWL.dat b/tests/population/scaling/scaling_results/comparison_result_david-Lenovo-IdeaPad-S340-14IWL.dat index 81ae05378baa7c43c4a8343a0e7b0ed67ac4b39f..702d346450fd428b24477bdb049be037e7d64bd5 100644 --- a/tests/population/scaling/scaling_results/comparison_result_david-Lenovo-IdeaPad-S340-14IWL.dat +++ b/tests/population/scaling/scaling_results/comparison_result_david-Lenovo-IdeaPad-S340-14IWL.dat @@ -1,2 +1,3 @@ (2, 225, 23.872895002365112, 17.51114845275879, 1.3632969343369403) (2, 625, 76.88419461250305, 63.15470623970032, 1.2173945409656914) +(1, 100, 18.417582511901855, 19.06265616416931, 0.9661603479225548)