[EMAIL PROTECTED] wrote:
>
> There is a module in development (processing.py) that provides an API like
> the threading module but that uses processes under the covers:
>
> http://mail.python.org/pipermail/python-dev/2006-October/069297.html
>
> You might find that an interesting alternative.
John wrote:
> I want to do something like this:
>
> for i = 1 in range(0,N):
> for j = 1 in range(0,N):
>D[i][j] = calculate(i,j)
>
> I would like to now do this using a fixed number of threads, say 10
> threads.
Why do you want to run this in 10 threads? Do you have 10 CPUs?
If you are con
John> Damn! That is bad news. So even if caclulate is independent for
John> (i,j) and is computable on separate CPUs (parts of it are CPU
John> bound, parts are IO bound) python cant take advantage of this?
It will help if parts are I/O bound, presuming the threads which block
release
John wrote:
> Thanks. Does it matter if I call shell commands os.system...etc in
> calculate?
>
> Thanks,
> --j
The os.system command neglects important changes in the environment
(redirected streams) and would not work with current version of ppsmp.
Although there is a very simple workaround:
pri
"John" <[EMAIL PROTECTED]> writes:
> Damn! That is bad news. So even if caclulate is independent for
> (i,j) and is computable on separate CPUs (parts of it are CPU bound,
> parts are IO bound) python cant take advantage of this?
Not at the moment, unless you write C extensions that release the
gl
Thanks. Does it matter if I call shell commands os.system...etc in
calculate?
Thanks,
--j
[EMAIL PROTECTED] wrote:
> John wrote:
> > I want to do something like this:
> >
> > for i = 1 in range(0,N):
> > for j = 1 in range(0,N):
> >D[i][j] = calculate(i,j)
> >
> > I would like to now do th
Damn! That is bad news. So even if caclulate is independent for (i,j)
and
is computable on separate CPUs (parts of it are CPU bound, parts are IO
bound)
python cant take advantage of this?
Surprised,
--j
Paul Rubin wrote:
> "John" <[EMAIL PROTECTED]> writes:
> > I want to do something like this:
Damn! That is bad news. So even if caclulate is independent for (i,j)
and
is computable on separate CPUs (parts of it are CPU bound, parts are IO
bound)
python cant take advantage of this?
Surprised,
--Tom
Paul Rubin wrote:
> "John" <[EMAIL PROTECTED]> writes:
> > I want to do something like thi
John wrote:
> I want to do something like this:
>
> for i = 1 in range(0,N):
> for j = 1 in range(0,N):
>D[i][j] = calculate(i,j)
>
> I would like to now do this using a fixed number of threads, say 10
> threads.
> What is the easiest way to do the "parfor" in python?
>
> Thanks in advance for
Dennis Lee Bieber wrote:
> On 13 Jan 2007 12:15:44 -0800, "John" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> >
> > I want to do something like this:
> >
> > for i = 1 in range(0,N):
> > for j = 1 in range(0,N):
> >D[i][j] = calculate(i,j)
> >
> > I would like to now
"John" <[EMAIL PROTECTED]> writes:
> I want to do something like this:
>
> for i = 1 in range(0,N):
> for j = 1 in range(0,N):
>D[i][j] = calculate(i,j)
>
> I would like to now do this using a fixed number of threads, say 10
> threads. What is the easiest way to do the "parfor" in python?
I
John> I want to do something like this:
John> for i = 1 in range(0,N):
John> for j = 1 in range(0,N):
John>D[i][j] = calculate(i,j)
John> I would like to now do this using a fixed number of threads, say
John> 10 threads. What is the easiest way to do the "parfor" in
I want to do something like this:
for i = 1 in range(0,N):
for j = 1 in range(0,N):
D[i][j] = calculate(i,j)
I would like to now do this using a fixed number of threads, say 10
threads.
What is the easiest way to do the "parfor" in python?
Thanks in advance for your help,
--j
--
http://ma
13 matches
Mail list logo