(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.