Python Forum
multiprocess hang when certain number is used in the program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiprocess hang when certain number is used in the program
#4
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
-------------------------------------
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
Reply


Messages In This Thread
RE: multiprocess hang when certain number is used in the program - by esphi - Oct-27-2020, 10:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Smile Help making number analysis program Dainer 2 2,739 Jun-24-2021, 09:55 PM
Last Post: jefsummers
  prometheus in multiprocess code georgelza 4 6,578 Jan-21-2020, 05:13 PM
Last Post: georgelza
  how to make a program with a certain number of multiples? syafiq14 3 3,878 Jan-01-2020, 02:39 PM
Last Post: syafiq14
  Multiprocess not writing to file DreamingInsanity 4 11,213 Dec-07-2019, 03:10 PM
Last Post: DreamingInsanity
  help with multiprocess concept kiyoshi7 2 3,446 Aug-10-2019, 08:19 PM
Last Post: kiyoshi7
  Creating a program to look for the largest prime number of a number Wikki14 4 5,084 Sep-08-2018, 12:30 AM
Last Post: Skaperen
  Hang man game supermane 2 3,037 Aug-15-2018, 12:07 PM
Last Post: Larz60+
  Why does this hang the system up Able98 15 13,836 Sep-02-2017, 09:50 PM
Last Post: nilamo
  example of multiprocess piping Skaperen 4 7,343 Dec-02-2016, 12:55 PM
Last Post: Larz60+
  multiprocess passing multiple arguments double asterisk pic8690 1 6,499 Oct-23-2016, 08:51 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020