Hi Deanhystad,
1) I have a 8 cores CPU. I was trying to see how number of processes in relation to number of CPU, influence the speed.
2) For other numbers, it will print a list of results. For example end_number = 20, the output is as follows.
With end_number = 12_999, the program hangs, it will not print the result and "[MainProcess] process shutting down" was not performed.
With end_number = 13_000, the program works. But print out will be very long, therefore, I did not put an example here.
-------------------------------------
Example when end_number = 20
-------------------------------------
1) I have a 8 cores CPU. I was trying to see how number of processes in relation to number of CPU, influence the speed.
2) For other numbers, it will print a list of results. For example end_number = 20, the output is as follows.
With end_number = 12_999, the program hangs, it will not print the result and "[MainProcess] process shutting down" was not performed.
With end_number = 13_000, the program works. But print out will be very long, therefore, I did not put an example here.
-------------------------------------
Example when end_number = 20
-------------------------------------
Output:20 2 4
[range(1, 3), range(3, 5), range(5, 7), range(7, 9), range(9, 11), range(11, 13), range(13, 15), range(15, 17), range(17, 21)]
[INFO/Process-1] child process calling self.run()
[INFO/Process-1] process shutting down
[INFO/Process-2] child process calling self.run()
[INFO/Process-1] process exiting with exitcode 0
[INFO/Process-3] child process calling self.run()
[INFO/Process-3] process shutting down
[INFO/Process-3] process exiting with exitcode 0
[INFO/Process-2] process shutting down
[INFO/Process-2] process exiting with exitcode 0
[INFO/Process-6] child process calling self.run()
[INFO/Process-8] child process calling self.run()
[INFO/Process-8] process shutting down
[INFO/Process-5] child process calling self.run()
[INFO/Process-7] child process calling self.run()
[INFO/Process-8] process exiting with exitcode 0
[INFO/Process-5] process shutting down
[INFO/Process-5] process exiting with exitcode 0
[INFO/Process-4] child process calling self.run()
[INFO/Process-7] process shutting down
[INFO/Process-4] process shutting down
[INFO/Process-6] process shutting down
[INFO/Process-7] process exiting with exitcode 0
[INFO/Process-6] process exiting with exitcode 0
[INFO/Process-4] process exiting with exitcode 0
[INFO/Process-9] child process calling self.run()
[INFO/Process-9] process shutting down
[INFO/Process-9] process exiting with exitcode 0
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400]
[INFO/MainProcess] process shutting down