diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 2207af134ec18a270bff213b00fd89abe2314aea..218faf66cc4a9501b035e4dd68c41b2cf012db9d 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -553,17 +553,16 @@ class Population(object): self.load_grid_function() for i, system in enumerate(self.grid_options["system_generator"](self)): - #full_system_dict = self.bse_options.copy() - #full_system_dict.update(system) + full_system_dict = self.bse_options.copy() + full_system_dict.update(system) - #binary_cmdline_string = self.return_argline(full_system_dict) - pass - # out = binary_c_python_api.run_population( - # binary_cmdline_string, - # self.grid_options["custom_logging_func_memaddr"], - # self.grid_options["store_memaddr"], - # ) - # print("{}/{}".format(i+1, total_starcount_run), binary_cmdline_string) + binary_cmdline_string = self.return_argline(full_system_dict) + out = binary_c_python_api.run_population( + binary_cmdline_string, + self.grid_options["custom_logging_func_memaddr"], + self.grid_options["store_memaddr"], + ) + print("{}/{}".format(i+1, total_starcount_run), binary_cmdline_string) stop_lin = time.time() @@ -792,8 +791,8 @@ class Population(object): self.grid_options["custom_logging_func_memaddr"], self.grid_options["store_memaddr"], ) - if self.custom_options['parse_function']: - self.custom_options['parse_function'](self, out) + if self.grid_options['parse_function']: + self.grid_options['parse_function'](self, out) def yield_system(): for i, system in enumerate(self.grid_options["system_generator"](self)): diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py index ea4119291d2d264e8b7ca5b8fedd77ce703936ce..8210374b0c731378f180a45573a80db6993e4d27 100644 --- a/binarycpython/utils/grid_options_defaults.py +++ b/binarycpython/utils/grid_options_defaults.py @@ -44,6 +44,8 @@ grid_options_defaults_dict = { # Probability: "weight": 1.0, # weighting for the probability "repeat": 1.0, # number of times to repeat each system (probability is adjusted to be 1/repeat) + "parse_function": None, + ## # return_array_refs=>1, # quicker data parsing mode # sort_args=>1, diff --git a/tests/population/profile_run.txt b/tests/population/profiling/profile_run.txt similarity index 100% rename from tests/population/profile_run.txt rename to tests/population/profiling/profile_run.txt diff --git a/tests/population/profile_test.txt b/tests/population/profiling/profile_test.txt similarity index 100% rename from tests/population/profile_test.txt rename to tests/population/profiling/profile_test.txt diff --git a/tests/population/readout_profile.py b/tests/population/profiling/readout_profile.py similarity index 100% rename from tests/population/readout_profile.py rename to tests/population/profiling/readout_profile.py diff --git a/tests/population/scaling/generate_scaling_script.py b/tests/population/scaling/generate_scaling_script.py new file mode 100644 index 0000000000000000000000000000000000000000..5286de3818cdf8a9c610586be1e6f23bf8244adb --- /dev/null +++ b/tests/population/scaling/generate_scaling_script.py @@ -0,0 +1,51 @@ +# 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 + + +amt_repeat = 3 + +with open('run_scaling_{}.sh', .format(hostname), 'w') as f: + + + + + + + + + + + + + + + + + +# 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/generate_test_script.py b/tests/population/scaling/generate_test_script.py index 46bc6357a7f9aa0cbc7f5fe64f6c26e1ec954d18..5eec6a1ee2ef753ef7aa30d99d0db1ec698cdd27 100644 --- a/tests/population/scaling/generate_test_script.py +++ b/tests/population/scaling/generate_test_script.py @@ -15,6 +15,18 @@ elif 24 < amount_of_cpus <= 48: + + + + + + + + + + + + # Generate the lines to run with open('run_tests_{}.sh'.format(hostname), 'w') as f: command = "" diff --git a/tests/population/multiprocessing_via_population_comparison.py b/tests/population/scaling/multiprocessing_via_population_comparison.py similarity index 100% rename from tests/population/multiprocessing_via_population_comparison.py rename to tests/population/scaling/multiprocessing_via_population_comparison.py diff --git a/tests/population/scaling/run_tests_astro1.sh b/tests/population/scaling/run_tests_astro1.sh deleted file mode 100755 index c7198382706b352ccc9883f8af55f5594ff12557..0000000000000000000000000000000000000000 --- a/tests/population/scaling/run_tests_astro1.sh +++ /dev/null @@ -1,72 +0,0 @@ -python3 evolve_population_comparing_with_multiprocessing.py 10 10 4 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 4 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 4 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 4 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 4 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 8 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 8 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 8 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 8 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 8 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 12 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 12 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 12 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 12 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 12 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 16 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 16 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 16 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 16 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 16 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 20 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 20 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 20 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 20 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 20 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 24 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 24 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 24 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 24 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 24 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 28 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 28 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 28 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 28 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 28 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 32 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 32 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 32 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 32 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 32 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 36 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 36 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 36 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 36 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 36 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 40 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 40 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 40 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 40 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 40 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 44 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 44 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 44 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 44 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 44 astro1 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 48 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 48 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 48 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 48 astro1 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 48 astro1 - diff --git a/tests/population/scaling/run_tests_astro2.sh b/tests/population/scaling/run_tests_astro2.sh deleted file mode 100755 index 32bba71348fd9ce4dc78eb47e68b0e8bd17e0888..0000000000000000000000000000000000000000 --- a/tests/population/scaling/run_tests_astro2.sh +++ /dev/null @@ -1,72 +0,0 @@ -python3 evolve_population_comparing_with_multiprocessing.py 10 10 4 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 4 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 4 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 4 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 4 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 8 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 8 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 8 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 8 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 8 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 12 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 12 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 12 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 12 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 12 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 16 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 16 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 16 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 16 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 16 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 20 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 20 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 20 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 20 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 20 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 24 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 24 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 24 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 24 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 24 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 28 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 28 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 28 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 28 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 28 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 32 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 32 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 32 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 32 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 32 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 36 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 36 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 36 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 36 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 36 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 40 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 40 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 40 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 40 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 40 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 44 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 44 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 44 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 44 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 44 astro2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 48 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 48 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 48 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 48 astro2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 48 astro2 - diff --git a/tests/population/scaling/run_tests_cluster2.sh b/tests/population/scaling/run_tests_cluster2.sh deleted file mode 100755 index ea560061eaaee0540e7f36eeca55a8ece9cc858f..0000000000000000000000000000000000000000 --- a/tests/population/scaling/run_tests_cluster2.sh +++ /dev/null @@ -1,60 +0,0 @@ -python3 evolve_population_comparing_with_multiprocessing.py 10 10 4 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 4 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 4 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 4 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 4 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 8 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 8 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 8 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 8 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 8 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 12 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 12 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 12 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 12 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 12 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 16 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 16 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 16 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 16 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 16 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 20 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 20 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 20 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 20 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 20 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 24 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 24 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 24 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 24 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 24 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 28 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 28 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 28 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 28 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 28 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 32 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 32 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 32 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 32 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 32 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 36 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 36 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 36 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 36 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 36 cluster2 - -python3 evolve_population_comparing_with_multiprocessing.py 10 10 40 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 20 20 40 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 25 25 40 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 35 35 40 cluster2 -python3 evolve_population_comparing_with_multiprocessing.py 50 50 40 cluster2 - 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 deleted file mode 100755 index eba29c9774398b699ae2c0326bdc344fef0377ce..0000000000000000000000000000000000000000 --- a/tests/population/scaling/run_tests_david-Lenovo-IdeaPad-S340-14IWL.sh +++ /dev/null @@ -1,24 +0,0 @@ -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_astro1_ol.dat b/tests/population/scaling/scaling_results/comparison_result_astro1_ol.dat deleted file mode 100644 index 073379c0f24a5c04cd3ab30b004488e304e285bc..0000000000000000000000000000000000000000 --- a/tests/population/scaling/scaling_results/comparison_result_astro1_ol.dat +++ /dev/null @@ -1,115 +0,0 @@ -(4, 1000, 104.05427241325378, 27.00112748146057, 3.8537010161779057) -(4, 1000, 102.54885578155518, 27.171754837036133, 3.7740976391328687) -(4, 1000, 104.35686087608337, 26.782670736312866, 3.896432208106593) -(4, 1000, 103.11598515510559, 27.192280530929565, 3.7921050806245336) -(8, 1000, 102.20535063743591, 14.65907335281372, 6.972156300576681) -(8, 1000, 101.34700274467468, 14.694567203521729, 6.896902871721575) -(8, 1000, 102.19972801208496, 14.790043354034424, 6.910035729152001) -(8, 1000, 102.87878012657166, 14.792370796203613, 6.95485406253979) -(4, 2000, 207.57554006576538, 54.78886413574219, 3.788644706184937) -(4, 2000, 202.786696434021, 54.18405818939209, 3.7425527583262794) -(4, 2000, 206.4160861968994, 54.77799367904663, 3.7682301291705858) -(4, 2000, 202.04300618171692, 54.89555263519287, 3.680498628447901) -(8, 2000, 207.90165948867798, 29.321029663085938, 7.09053064907943) -(8, 2000, 208.02890348434448, 28.802990436553955, 7.222475872516849) -(8, 2000, 204.79240155220032, 29.379513025283813, 6.970585297855595) -(8, 2000, 202.47611260414124, 29.069218397140503, 6.965309828352954) -(16, 2000, 211.9178500175476, 14.980526447296143, 14.146221814240512) -(16, 2000, 208.60417556762695, 15.031479835510254, 13.877820271216546) -(16, 2000, 208.11063432693481, 15.369598150253296, 13.540408297760543) -(16, 2000, 204.12664914131165, 15.360931396484375, 13.288689590009476) -(4, 5000, 527.643744468689, 135.23606204986572, 3.901649726196038) -(4, 5000, 517.9622015953064, 136.07963013648987, 3.8063169416009046) -(4, 5000, 515.7305867671967, 135.84297394752502, 3.7965201421931396) -(4, 1000, 102.62274122238159, 27.113038539886475, 3.784995955780148) -(4, 1000, 105.12208247184753, 27.120686769485474, 3.8760848265142176) -(4, 1000, 102.0183584690094, 27.36386466026306, 3.7282145535954663) -(4, 1000, 105.0119206905365, 28.213557958602905, 3.722037498589084) -(8, 1000, 103.68693804740906, 15.153008937835693, 6.842663293658605) -(8, 1000, 103.08171725273132, 14.493562936782837, 7.112241324120718) -(8, 1000, 104.6509165763855, 14.882857322692871, 7.03164145884926) -(8, 1000, 104.8209400177002, 14.74099612236023, 7.110845098093478) -(4, 2000, 203.6050124168396, 54.250617027282715, 3.7530451001957514) -(4, 2000, 207.69856119155884, 54.04366207122803, 3.8431622364490767) -(4, 2000, 203.5373842716217, 54.21375513076782, 3.75434949637179) -(4, 2000, 200.93188166618347, 55.098068714141846, 3.646804440799046) -(8, 2000, 208.2707359790802, 29.014343976974487, 7.178199036461479) -(8, 2000, 205.94265794754028, 29.46466588973999, 6.989478812289957) -(8, 2000, 208.62252259254456, 29.132497787475586, 7.161161535631658) -(8, 2000, 208.0031316280365, 28.984196424484253, 7.176432583527722) -(16, 2000, 207.22788381576538, 15.259207248687744, 13.58051440277715) -(16, 2000, 202.91206169128418, 15.149047613143921, 13.394377446885146) -(16, 2000, 204.83116912841797, 15.046677350997925, 13.613049868104813) -(16, 2000, 205.0353970527649, 15.29837441444397, 13.402430316987182) -(4, 5000, 512.5090374946594, 136.7362518310547, 3.7481577170031914) -(4, 5000, 505.957435131073, 135.62525081634521, 3.7305548346318433) -(4, 5000, 521.9210550785065, 135.70136737823486, 3.846100191634601) -(4, 5000, 519.6273250579834, 134.2490532398224, 3.870621896526314) -(8, 5000, 518.0830736160278, 72.1380262374878, 7.181830452505462) -(8, 5000, 525.8384339809418, 71.64022922515869, 7.339988155653154) -(8, 5000, 513.1743404865265, 71.90173530578613, 7.1371621046986045) -(8, 5000, 510.9314661026001, 72.34414649009705, 7.062512876180519) -(16, 5000, 516.7509648799896, 37.53547406196594, 13.767002490148501) -(16, 5000, 510.0037705898285, 37.37641382217407, 13.645069669237815) -(16, 5000, 523.5528612136841, 37.486063957214355, 13.966600009306234) -(16, 5000, 511.19897866249084, 37.40828561782837, 13.665394449909224) -(32, 5000, 521.0931882858276, 32.20561599731445, 16.18019628406674) -(32, 5000, 518.6581602096558, 31.749494791030884, 16.33595002450794) -(32, 5000, 520.9283559322357, 32.17886996269226, 16.188522360673105) -(32, 5000, 514.1640427112579, 31.93514323234558, 16.100257918695846) -(4, 1000, 104.42094922065735, 27.05269455909729, 3.8599093703049494) -(4, 1000, 101.89992642402649, 27.551891088485718, 3.6984730411703666) -(4, 1000, 104.2344958782196, 27.117160081863403, 3.8438573790009114) -(4, 1000, 103.41772150993347, 27.27121353149414, 3.7921936033576795) -(8, 1000, 102.33424353599548, 15.469272375106812, 6.615323659351424) -(8, 1000, 104.04336977005005, 14.536758422851562, 7.1572607003288615) -(8, 1000, 104.13553380966187, 14.583893775939941, 7.140447908463339) -(8, 1000, 102.71817421913147, 14.484654664993286, 7.091516960178704) -(4, 2000, 206.5037591457367, 53.54386067390442, 3.856721509182846) -(4, 2000, 208.7819540500641, 54.52429246902466, 3.8291547601222606) -(4, 2000, 202.39464044570923, 53.566444873809814, 3.77838478776227) -(4, 2000, 209.63950848579407, 55.48546886444092, 3.778277678394931) -(8, 2000, 207.04452681541443, 28.988551378250122, 7.142286074038121) -(8, 2000, 207.26304173469543, 28.957362174987793, 7.157524932078272) -(8, 2000, 203.83100771903992, 29.06782054901123, 7.012256298175524) -(8, 2000, 202.653653383255, 28.714593410491943, 7.0575142919909135) -(16, 2000, 210.743394613266, 14.946157217025757, 14.100172475985994) -(16, 2000, 207.11285138130188, 15.00833535194397, 13.799854982216624) -(16, 2000, 205.91337847709656, 15.33548092842102, 13.427252750546632) -(16, 2000, 201.6581528186798, 15.01097583770752, 13.434046860039254) -(32, 2000, 205.83645701408386, 13.055871725082397, 15.765814902932863) -(32, 2000, 209.74389004707336, 13.278757095336914, 15.795445954857392) -(32, 2000, 206.69286608695984, 13.06216049194336, 15.823788584931751) -(32, 2000, 207.6377956867218, 13.04278039932251, 15.919749419188816) -(4, 5000, 518.9882910251617, 134.86849451065063, 3.8481062082603508) -(4, 5000, 522.838042974472, 135.0669686794281, 3.8709541502733447) -(4, 5000, 512.6538271903992, 135.27970814704895, 3.7895840714938918) -(4, 5000, 512.533979177475, 134.128422498703, 3.8212182744670025) -(8, 5000, 511.6748743057251, 71.87646913528442, 7.1188092634692595) -(8, 5000, 518.7212734222412, 72.16897344589233, 7.187593901569698) -(8, 5000, 523.5697977542877, 72.60496044158936, 7.2112124925059256) -(8, 5000, 515.9446866512299, 71.47919058799744, 7.2181103676048854) -(16, 5000, 509.1269211769104, 37.47135615348816, 13.587096210007772) -(16, 5000, 526.8645267486572, 37.16785931587219, 14.175272303714962) -(16, 5000, 501.69326519966125, 36.7297477722168, 13.659044660773665) -(16, 5000, 507.670964717865, 37.03483533859253, 13.707930927097744) -(32, 5000, 513.9466030597687, 32.249024629592896, 15.93681077064738) -(32, 5000, 511.34901881217957, 32.15395474433899, 15.90314544129933) -(32, 5000, 514.7990386486053, 32.4391450881958, 15.869685753091387) -(32, 5000, 507.6543724536896, 31.767980575561523, 15.980064305510751) -(4, 10000, 1039.6945412158966, 270.35400342941284, 3.8456783625449518) -(4, 10000, 1033.4089324474335, 270.86656308174133, 3.8151956472219655) -(4, 10000, 1038.8110148906708, 268.79505014419556, 3.8646954783333953) -(4, 10000, 1041.112842798233, 273.25793194770813, 3.8100004467481114) -(8, 10000, 1022.0218458175659, 143.64133620262146, 7.115095646116066) -(8, 10000, 1031.4755203723907, 144.16310334205627, 7.15492033994999) -(8, 10000, 1034.291555404663, 143.88558387756348, 7.188291749121806) -(8, 10000, 1034.9911291599274, 144.10508680343628, 7.182197048822341) -(16, 10000, 1054.3339381217957, 73.39850378036499, 14.364515403157892) -(16, 10000, 1010.6264357566833, 75.25770449638367, 13.428876717934529) -(16, 10000, 1044.7247614860535, 74.02198815345764, 14.113708474300866) -(16, 10000, 1042.1659934520721, 73.94862246513367, 14.093108954713081) -(32, 10000, 1051.2897226810455, 63.89476823806763, 16.453455449811013) -(32, 10000, 1050.2103514671326, 63.592018842697144, 16.514813817516313) -(32, 10000, 1012.8798322677612, 65.41985893249512, 15.482757816902708) -(32, 10000, 1025.2572581768036, 64.88021302223206, 15.80231029490433) diff --git a/tests/population/scaling/scaling_results/comparison_result_astro2.dat b/tests/population/scaling/scaling_results/comparison_result_astro2.dat deleted file mode 100644 index 983ea6b77478721b535cefde5182212bdd4cbae0..0000000000000000000000000000000000000000 --- a/tests/population/scaling/scaling_results/comparison_result_astro2.dat +++ /dev/null @@ -1,60 +0,0 @@ -(4, 100, 14.10124158859253, 4.134139060974121, 3.4109258011436787) -(4, 400, 61.055301666259766, 16.35676121711731, 3.7327256206666113) -(4, 625, 95.8083848953247, 25.765241622924805, 3.718512960114394) -(4, 1225, 191.25050354003906, 50.95959973335266, 3.7529828440718127) -(4, 2500, 383.6548960208893, 103.80896878242493, 3.6957779324925037) -(8, 100, 14.198569297790527, 2.543941020965576, 5.581328018525103) -(8, 400, 60.321287631988525, 9.967990159988403, 6.051499516333662) -(8, 625, 94.71923232078552, 15.711591720581055, 6.028621033775345) -(8, 1225, 194.1308672428131, 30.583381414413452, 6.34759330932983) -(8, 2500, 384.8839490413666, 61.58411884307861, 6.249727304243525) -(12, 100, 14.217102766036987, 1.9129226207733154, 7.432136883973698) -(12, 400, 60.82681107521057, 7.934520483016968, 7.666097933127044) -(12, 625, 96.70819783210754, 12.379796743392944, 7.811775898802247) -(12, 1225, 190.89420461654663, 23.577396154403687, 8.096492223586456) -(12, 2500, 397.2485320568085, 47.053948640823364, 8.442405866702568) -(16, 100, 13.985195875167847, 1.8815627098083496, 7.432755656914745) -(16, 400, 61.11527132987976, 6.59982705116272, 9.260132251361469) -(16, 625, 95.90889692306519, 9.987864971160889, 9.602542405208117) -(16, 1225, 188.9516725540161, 19.277790546417236, 9.801521190877999) -(16, 2500, 382.5960810184479, 40.0679407119751, 9.548683416717282) -(20, 100, 14.192401885986328, 1.5446226596832275, 9.188264717608712) -(20, 400, 61.247467041015625, 5.625759840011597, 10.886967944385157) -(20, 625, 97.97649145126343, 9.02974557876587, 10.850415506906703) -(20, 1225, 190.2177484035492, 17.080851078033447, 11.136315604798853) -(20, 2500, 383.7110228538513, 34.42068696022034, 11.147686369458649) -(24, 100, 14.295984745025635, 1.7024154663085938, 8.397471139065784) -(24, 400, 60.98009443283081, 5.706386089324951, 10.68628961978361) -(24, 625, 95.29834866523743, 8.202463388442993, 11.618259558404093) -(24, 1225, 188.30058526992798, 16.213704109191895, 11.613668536307898) -(24, 2500, 392.8527772426605, 33.833460569381714, 11.611368468709959) -(28, 100, 14.291304349899292, 1.5414564609527588, 9.27129939243693) -(28, 400, 60.64618754386902, 5.269887685775757, 11.50806073297586) -(28, 625, 95.23345041275024, 8.036301612854004, 11.85040768758916) -(28, 1225, 186.29137110710144, 16.276238441467285, 11.445603465262794) -(28, 2500, 394.3067514896393, 32.23271560668945, 12.233122281754206) -(32, 100, 14.191281080245972, 1.571908950805664, 9.028055392758208) -(32, 400, 61.429462909698486, 5.237022876739502, 11.729844294272707) -(32, 625, 96.13259482383728, 8.995407342910767, 10.68685287493944) -(32, 1225, 192.896910905838, 16.203189611434937, 11.904872777005988) -(32, 2500, 399.2666940689087, 32.46242141723633, 12.299350345347715) -(36, 100, 13.927229166030884, 1.5818688869476318, 8.804287941274838) -(36, 400, 60.33647704124451, 5.5185840129852295, 10.933325813156557) -(36, 625, 95.46581268310547, 8.636940717697144, 11.053197631366793) -(36, 1225, 194.48183345794678, 16.411016941070557, 11.850687508050305) -(36, 2500, 387.9849512577057, 32.95813179016113, 11.772055337600458) -(40, 100, 13.982583284378052, 1.6111986637115479, 8.67837318842349) -(40, 400, 61.04871916770935, 5.691144943237305, 10.726966151205225) -(40, 625, 94.21784400939941, 7.811094522476196, 12.062054010265824) -(40, 1225, 190.91827774047852, 16.066108465194702, 11.883293216529696) -(40, 2500, 388.0709626674652, 33.429218769073486, 11.608735619824982) -(44, 100, 14.21125054359436, 1.737048625946045, 8.18126236152688) -(44, 400, 61.47734880447388, 5.915903806686401, 10.391877693310295) -(44, 625, 94.16870713233948, 8.427074670791626, 11.174542864646696) -(44, 1225, 190.71016192436218, 15.719615697860718, 12.131986276885632) -(44, 2500, 392.2753930091858, 33.89833736419678, 11.572113074297995) -(48, 100, 14.414173126220703, 1.5484826564788818, 9.308578992416557) -(48, 400, 61.174304723739624, 5.360774040222168, 11.411468617170883) -(48, 625, 95.53823685646057, 9.054794549942017, 10.551121434011153) -(48, 1225, 190.91729140281677, 15.882095575332642, 12.020913140665199) -(48, 2500, 392.0420844554901, 33.41745948791504, 11.73165436460742) diff --git a/tests/population/scaling/scaling_results/comparison_result_cluster2.dat b/tests/population/scaling/scaling_results/comparison_result_cluster2.dat deleted file mode 100644 index 0b91382671aee48192ed7a6ec69bc911d9de6580..0000000000000000000000000000000000000000 --- a/tests/population/scaling/scaling_results/comparison_result_cluster2.dat +++ /dev/null @@ -1,50 +0,0 @@ -(4, 100, 17.530393362045288, 4.754913568496704, 3.6867953769320843) -(4, 400, 73.91634607315063, 19.321584463119507, 3.8255840877977714) -(4, 625, 114.56839394569397, 30.45960521697998, 3.7613223523273636) -(4, 1225, 231.09235262870789, 60.027222871780396, 3.8497925036833163) -(4, 2500, 466.45902252197266, 122.86882734298706, 3.7963984243119464) -(8, 100, 16.93968415260315, 2.813231945037842, 6.021431749515871) -(8, 400, 73.41071081161499, 10.54165267944336, 6.9638711351938944) -(8, 625, 111.85531425476074, 16.508870601654053, 6.775467380763997) -(8, 1225, 225.93445348739624, 32.59254240989685, 6.93209049622316) -(8, 2500, 460.64231610298157, 65.98871207237244, 6.980622922262476) -(12, 100, 16.918346166610718, 2.0145938396453857, 8.397894321760027) -(12, 400, 72.46919679641724, 7.917168617248535, 9.15342343960366) -(12, 625, 114.03665566444397, 12.08104658126831, 9.439302704225812) -(12, 1225, 228.76386547088623, 23.69902992248535, 9.652878882347748) -(12, 2500, 468.6402156352997, 48.383867263793945, 9.685877589739237) -(16, 100, 17.114651679992676, 1.863208293914795, 9.185581524024352) -(16, 400, 72.29412269592285, 6.447221994400024, 11.213220633431982) -(16, 625, 114.42502737045288, 10.020463705062866, 11.419134956063893) -(16, 1225, 224.05144429206848, 19.879616022109985, 11.270411060398745) -(16, 2500, 459.92475152015686, 39.26897215843201, 11.712166788185206) -(20, 100, 17.14034938812256, 1.592360496520996, 10.764113669970431) -(20, 400, 72.17513751983643, 6.184013605117798, 11.671244943592193) -(20, 625, 116.0014705657959, 9.576918363571167, 12.112609313559998) -(20, 1225, 229.0708658695221, 18.488805055618286, 12.389706375313486) -(20, 2500, 465.14672780036926, 37.978049993515015, 12.247778068642175) -(24, 100, 16.727715015411377, 1.609938621520996, 10.390281214328407) -(24, 400, 73.3764419555664, 6.163752317428589, 11.904508516360663) -(24, 625, 115.0853500366211, 9.489580869674683, 12.12754826763665) -(24, 1225, 229.77985310554504, 18.294185161590576, 12.560267160079787) -(24, 2500, 461.82390236854553, 36.947997093200684, 12.499294649277003) -(28, 100, 16.906121969223022, 1.686905860900879, 10.021971208395968) -(28, 400, 73.9054696559906, 6.208874225616455, 11.90319967363372) -(28, 625, 116.12110328674316, 9.48776388168335, 12.239038063639141) -(28, 1225, 228.12121391296387, 18.196850776672363, 12.536301842152058) -(28, 2500, 466.3461253643036, 37.27383613586426, 12.511353102064888) -(32, 100, 17.02801513671875, 1.699430227279663, 10.01983774525188) -(32, 400, 72.43440103530884, 6.125530242919922, 11.825000965268398) -(32, 625, 114.07859706878662, 9.18714451789856, 12.417198493670874) -(32, 1225, 227.61294221878052, 18.364572763442993, 12.39413217779141) -(32, 2500, 470.50201296806335, 37.635680198669434, 12.501488228308876) -(36, 100, 16.765739679336548, 1.6341161727905273, 10.259821155007748) -(36, 400, 71.90405225753784, 6.409330129623413, 11.218653245087664) -(36, 625, 114.6719810962677, 9.576411962509155, 11.974420225988483) -(36, 1225, 230.71015453338623, 18.751843690872192, 12.303331786286629) -(36, 2500, 471.7755868434906, 37.441543102264404, 12.60032433906172) -(40, 100, 16.983802556991577, 1.7513949871063232, 9.697299970609388) -(40, 400, 73.24098634719849, 6.3537867069244385, 11.52713959808873) -(40, 625, 114.03470826148987, 9.189575910568237, 12.409137197544357) -(40, 1225, 228.31968879699707, 18.669682502746582, 12.229436079773071) -(40, 2500, 460.6292335987091, 37.626529932022095, 12.242139640059928) 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 deleted file mode 100644 index 702d346450fd428b24477bdb049be037e7d64bd5..0000000000000000000000000000000000000000 --- a/tests/population/scaling/scaling_results/comparison_result_david-Lenovo-IdeaPad-S340-14IWL.dat +++ /dev/null @@ -1,3 +0,0 @@ -(2, 225, 23.872895002365112, 17.51114845275879, 1.3632969343369403) -(2, 625, 76.88419461250305, 63.15470623970032, 1.2173945409656914) -(1, 100, 18.417582511901855, 19.06265616416931, 0.9661603479225548) diff --git a/tests/population/scaling/scaling_results/comparison_result_laptop.dat b/tests/population/scaling/scaling_results/comparison_result_laptop.dat deleted file mode 100644 index 64e82a8f423da92433dbcc2d24d646f3e43ad70c..0000000000000000000000000000000000000000 --- a/tests/population/scaling/scaling_results/comparison_result_laptop.dat +++ /dev/null @@ -1,29 +0,0 @@ -(4, 100, 4.975594997406006, 2.3232288360595703) -(4, 100, 4.787039518356323, 2.2747838497161865) -(4, 100, 4.9317708015441895, 2.4268319606781006) -(1, 100, 5.315765619277954, 5.674138784408569) -(2, 100, 4.9390997886657715, 2.769941806793213) -(2, 100, 5.208018779754639, 2.836611747741699) -(2, 100, 5.186922311782837, 3.152923107147217) -(4, 100, 5.072067499160767, 2.3781256675720215) -(4, 100, 5.082597970962524, 2.3073325157165527) -(4, 1000, 49.75706219673157, 30.233830213546753) -(4, 1000, 53.46943283081055, 32.60539269447327) -(4, 1000, 54.02741098403931, 30.801720142364502) -(4, 1000, 55.66723918914795, 32.122862100601196) -(4, 2000, 106.51247549057007, 61.482452392578125) -(4, 2000, 109.3186149597168, 61.64964556694031) -(4, 2000, 111.05836129188538, 91.57576203346252) -(4, 2000, 121.61987137794495, 68.84247088432312) -(4, 1000, 49.87850880622864, 30.613584995269775) -(4, 1000, 52.58728384971619, 31.519263982772827) -(4, 1000, 53.73133993148804, 31.784117937088013) -(4, 1000, 54.716689348220825, 31.911094665527344) -(4, 2000, 124.03876852989197, 62.09644532203674) -(4, 2000, 103.91023874282837, 60.63083362579346) -(4, 2000, 104.27078628540039, 61.83385968208313) -(4, 2000, 104.66957712173462, 60.45007133483887) -(4, 5000, 261.0527467727661, 154.01037573814392) -(4, 5000, 259.3938636779785, 152.388818025589) -(4, 5000, 260.7243824005127, 152.58654737472534) -(4, 5000, 261.61197566986084, 152.4033432006836) diff --git a/tests/population/scaling/scaling_script.py b/tests/population/scaling/scaling_script.py new file mode 100644 index 0000000000000000000000000000000000000000..2b64d3f42b468da07a41f06bdb7ac0abe42f0e95 --- /dev/null +++ b/tests/population/scaling/scaling_script.py @@ -0,0 +1,126 @@ +# Script to generate the test script :P +import socket, psutil +import numpy as np +import time +import json + +from binarycpython.utils.grid import Population +from binarycpython.utils.functions import get_help_all, get_help, create_hdf5 + + +import argparse + +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 + +cpu_list = [1] +for i in range(1, int(amount_of_cpus/stepsize) + 1 ): + cpu_amt = i * stepsize + if not cpu_amt in cpu_list: + cpu_list.append(i * stepsize) + + +amt_repeats = 5 + +resolution = {'M_1': 10, 'per': 10} +total_systems = np.prod([el for el in resolution.values()]) +result_dir = 'scaling_results' + + +test_pop = Population() + +test_pop.set( + verbose=1, + binary=1, +) + +test_pop.add_grid_variable( + name="M_1", + longname="log primary mass", + valuerange=[1, 100], + resolution="{}".format(resolution['M_1']), + spacingfunc="const(1, 100, {})".format(resolution['M_1']), + precode="", + # precode="M_1=math.exp(lnm1)", + probdist="Kroupa2001(M_1)", + # probdist='self.custom_options["extra_prob_function"](M_1)', + dphasevol="dlnm1", + parameter_name="M_1", + condition="", +) + +test_pop.add_grid_variable( + name="period", + longname="period", + valuerange=["M_1", 20], + resolution="{}".format(resolution['per']), + spacingfunc="np.linspace(1, 10, {})".format(resolution['per']), + precode="orbital_period = period**2", + probdist="flat(orbital_period)", + parameter_name="orbital_period", + dphasevol="dper", + condition='self.grid_options["binary"]==1', +) + +####################################################################################### + +# Scaling dict: +result_dict = {} + +# +result_dict['amt_systems'] = total_systems + + +# Linear runs +linear_times = [] +for repeat in range(amt_repeats): + total_lin_start = time.time() + + evolve_lin_time = test_pop.test_evolve_population_lin() + + total_lin_stop = time.time() + + total_lin = total_lin_stop - total_lin_start + + print("linear run with {} systems: {} of which {} spent on evolving the systems".format(total_systems, total_lin, evolve_lin_time)) + linear_times.append(total_lin) + + +result_dict['linear'] = linear_times + +####################################################################################### +# MP runs +mp_dict = {} +for cpu_amt in cpu_list: + + mp_times = [] + + test_pop.set(amt_cores=cpu_amt) + + # + for repeat in range(amt_repeats): + # MP + total_mp_start = time.time() + + evolve_mp_time = test_pop.evolve_population_mp_chunks() + total_mp_stop = time.time() + + total_mp = total_mp_stop - total_mp_start + mp_times.append(total_mp) + print("MP ({} nodes) run with {} systems: {} of which {} spent on evolving the systems".format(cpu_amt, total_systems, total_mp, evolve_mp_time)) + + mp_dict[cpu_amt] = mp_times + +result_dict['mp'] = mp_dict + + +with open('scaling_results/{}_{}_systems.json'.format(hostname, total_systems), 'w') as f: + f.write(json.dumps(result_dict)) \ No newline at end of file diff --git a/tests/population/sizes_for_commands.png b/tests/population/sizes_for_commands.png deleted file mode 100644 index 7dc21fa6136512e49514a4b918220b4eea4839da..0000000000000000000000000000000000000000 Binary files a/tests/population/sizes_for_commands.png and /dev/null differ