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
#7
(Oct-27-2020, 10:54 AM)deanhystad Wrote: The problem appears to be with putting large results in the queue. I tried running with 1 process and it works until square.answers becomes large. I can do any number of square calculations as long as I only add a few numbers to the queue. This is probably why it seldom works for me. One of the first things I tried was reduce the number of processes which increased the size of each individual results.

1) I found varying the number of groups (processes) does alter the end_number that result in a hang.
when I reduce the number_of_groups = 2 (line 42), the program hang with end_number = 11675

2) I found similar problem does not develop if I change the operation from x * x to x + x. (line 28 of the program)

that do indicate that problem was not due to the number of processes.

btw: I have alter the program, so that it will loop the end_number from 1 to a specific number,
ie, I change the main() to a function and made a new main that will run the old main in loop.
so that I can run through numbers until it fails. That is how I found 11675.

if it is helpful, I can insert the new program here.
Reply


Messages In This Thread
RE: multiprocess hang when certain number is used in the program - by esphi - Oct-27-2020, 12:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Smile Help making number analysis program Dainer 2 2,748 Jun-24-2021, 09:55 PM
Last Post: jefsummers
  prometheus in multiprocess code georgelza 4 6,627 Jan-21-2020, 05:13 PM
Last Post: georgelza
  how to make a program with a certain number of multiples? syafiq14 3 3,896 Jan-01-2020, 02:39 PM
Last Post: syafiq14
  Multiprocess not writing to file DreamingInsanity 4 11,233 Dec-07-2019, 03:10 PM
Last Post: DreamingInsanity
  help with multiprocess concept kiyoshi7 2 3,458 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,102 Sep-08-2018, 12:30 AM
Last Post: Skaperen
  Hang man game supermane 2 3,050 Aug-15-2018, 12:07 PM
Last Post: Larz60+
  Why does this hang the system up Able98 15 13,879 Sep-02-2017, 09:50 PM
Last Post: nilamo
  example of multiprocess piping Skaperen 4 7,348 Dec-02-2016, 12:55 PM
Last Post: Larz60+
  multiprocess passing multiple arguments double asterisk pic8690 1 6,508 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