On 12/09/2010 10:54 AM, Astan Chee wrote:
> Hi,
> I've got a python script that calls a function many times with various
> arguments and returns a result. What I'm trying to do is run this
> function each on different processors and compile the result at the
> end based on the function result. The
Astan Chee wrote:
> Sorry about that, here is a summary of my complete code. I haven't cleaned
> it up much or anything, but this is what it does:
>
> import time
> import multiprocessing
>
> test_constx =0
> test_consty =0
>
> def functionTester(x):
> global test_constx
You don't need to de
Sorry about that, here is a summary of my complete code. I haven't cleaned
it up much or anything, but this is what it does:
import time
import multiprocessing
test_constx =0
test_consty =0
def functionTester(x):
global test_constx
global test_consty
print "constx " + str(test_constx)
pr
geremy condra wrote:
> On Fri, Dec 10, 2010 at 4:42 AM, Astan Chee wrote:
>> On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten <__pete...@web.de> wrote:
>>>
>>> I can't replicate the crash. However, your problem looks like there is a
>>> ready-to-use solution:
>>>
>>>
>>> http://docs.python.org/librar
On Fri, Dec 10, 2010 at 4:42 AM, Astan Chee wrote:
> On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten <__pete...@web.de> wrote:
>>
>> I can't replicate the crash. However, your problem looks like there is a
>> ready-to-use solution:
>>
>>
>> http://docs.python.org/library/multiprocessing.html#using-a-
On 10/12/2010 17:52, Dennis Lee Bieber wrote:
On Fri, 10 Dec 2010 23:02:24 +1100, Astan Chee
declaimed the following in gmane.comp.python.general:
for thread in threads:
if not thread.is_alive():
threads.remove(thread)
I can see a potential flaw ju
On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten <__pete...@web.de> wrote:
> I can't replicate the crash. However, your problem looks like there is a
> ready-to-use solution:
>
> http://docs.python.org/library/multiprocessing.html#using-a-pool-of-workers
>
> --
> http://mail.python.org/mailman/listinf
I just saw this:
http://bugs.python.org/issue8094
which seem to be similar to what I'm having. Does anyone know if there is a
fix for it?
Thanks again
On Fri, Dec 10, 2010 at 11:02 PM, Astan Chee wrote:
> Thanks for that. I'll try and see if it makes any difference but I'm using
> python 2.6 not
Thanks for that. I'll try and see if it makes any difference but I'm using
python 2.6 not 3
Are the multiprocessing modules different? That code (or whatever is using
the multiprocessing module) seems to cause infinite python processes on my
machine and eventually kills it.
I'm running python 2.6 o
On Thu, Dec 9, 2010 at 5:03 AM, Astan Chee wrote:
> Thanks but I'm having trouble with that module too. Currently what I
> have is something like this:
>
> import sys
> import os
> import multiprocessing
>
> import time
>
> def functionTester(num):
> return ((num+2)/(num-2))**2
>
> num_args = [
Astan Chee wrote:
> Thanks but I'm having trouble with that module too. Currently what I
> have is something like this:
>
> import sys
> import os
> import multiprocessing
>
> import time
>
> def functionTester(num):
> return ((num+2)/(num-2))**2
>
> num_args = [61,62,33,7,12,16,19,35,36,3
Thanks but I'm having trouble with that module too. Currently what I
have is something like this:
import sys
import os
import multiprocessing
import time
def functionTester(num):
return ((num+2)/(num-2))**2
num_args = [61,62,33,7,12,16,19,35,36,37,38,55,56,57,63]
max_result = 0
start = ti
Astan Chee wrote:
Hi,
I've got a python script that calls a function many times with various
arguments and returns a result. What I'm trying to do is run this
function each on different processors and compile the result at the
end based on the function result. The script looks something like
this
Hi,
I've got a python script that calls a function many times with various
arguments and returns a result. What I'm trying to do is run this
function each on different processors and compile the result at the
end based on the function result. The script looks something like
this:
import time
def
14 matches
Mail list logo