473,626 Members | 3,119 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parallel/distributed generator

I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.
http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way. As a use case, imagine a function that generates a range of
primes. I'd like to be able to do something along the following lines:

def iterprimes(star t=1, end=None):
# ...
yield prime
# rpc-related initialization
....
rpc_proxy = some_rpc_lib(it erprimes, start=1e6, end=1e12)
for prime in proxy:
print prime

Is there any module out there that does anything close to this ?

George

May 23 '07 #1
5 1651
George Sakkis wrote:
I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.
http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way. As a use case, imagine a function that generates a range of
primes. I'd like to be able to do something along the following lines:

def iterprimes(star t=1, end=None):
# ...
yield prime
# rpc-related initialization
...
rpc_proxy = some_rpc_lib(it erprimes, start=1e6, end=1e12)
for prime in proxy:
print prime

Is there any module out there that does anything close to this ?
Have you tried using pyro to just return a generator? After all, it's just
an object with a next()-method, that raises a certain exception. I can't
see why pyro shouldn't be able to handle that.

diez
May 23 '07 #2
On May 23, 2:58 pm, half.ital...@gm ail.com wrote:
On May 23, 11:00 am, George Sakkis <george.sak...@ gmail.comwrote:


I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way. As a use case, imagine a function that generates a range of
primes. I'd like to be able to do something along the following lines:
def iterprimes(star t=1, end=None):
# ...
yield prime
# rpc-related initialization
...
rpc_proxy = some_rpc_lib(it erprimes, start=1e6, end=1e12)
for prime in proxy:
print prime
Is there any module out there that does anything close to this ?
George

DOLT!- Hide quoted text -

- Show quoted text -
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.

-- Paul

May 23 '07 #3
On May 23, 4:22 pm, Paul McGuire <p...@austin.rr .comwrote:
On May 23, 2:58 pm, half.ital...@gm ail.com wrote:
On May 23, 11:00 am, George Sakkis <george.sak...@ gmail.comwrote:
I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way. As a use case, imagine a function that generates a range of
primes. I'd like to be able to do something along the following lines:
def iterprimes(star t=1, end=None):
# ...
yield prime
# rpc-related initialization
...
rpc_proxy = some_rpc_lib(it erprimes, start=1e6, end=1e12)
for prime in proxy:
print prime
Is there any module out there that does anything close to this ?
George
DOLT!- Hide quoted text -
- Show quoted text -

I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.

-- Paul
No, he probably sent it from Google groups as I did, which claimed
that "your message has not been sent, please try again later". Go
figure.

George

May 23 '07 #4
On May 23, 1:22 pm, Paul McGuire <p...@austin.rr .comwrote:
On May 23, 2:58 pm, half.ital...@gm ail.com wrote:
On May 23, 11:00 am, George Sakkis <george.sak...@ gmail.comwrote:
I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way. As a use case, imagine a function that generates a range of
primes. I'd like to be able to do something along the following lines:
def iterprimes(star t=1, end=None):
# ...
yield prime
# rpc-related initialization
...
rpc_proxy = some_rpc_lib(it erprimes, start=1e6, end=1e12)
for prime in proxy:
print prime
Is there any module out there that does anything close to this ?
George
DOLT!- Hide quoted text -
- Show quoted text -

I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.
I thought you were making a joke about parallel processing.

-- Paul
Damn computers!

May 24 '07 #5
On 23 May 2007 11:00:56 -0700, George Sakkis <ge***********@ gmail.comwrote:
I'm looking for any existing packages or ideas on how to implement the
equivalent of a generator (in the Python sense, i.e.
http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed
way.
Kamaelia? http://tinyurl.com/35fjbr

--
Cheers,
Simon B.
si***@brunningo nline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues
May 24 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4554
by: Andy Dalton | last post by:
Greetings, Does anyone know if there is a tool similar to distcc (http://distcc.samba.org/) for Java? I'm interested in finding a parallel or distributed Java compiler. Thanks for your time. Andy
0
1883
by: Yuancai \(Charlie\) Ye | last post by:
Hi, All: I am happy to annouce that we have formally released our latest SocketPro version 4 at www.udaparts.com, an advanced remoting framework written from batching/queue, asynchrony and parallel computation. Key Benefits of SocketPro: Super performance and scalability It is a guarantee that SocketPro based client-server applications
126
4273
by: ramyach | last post by:
Hi friends, I need to write a parallel code in 'C' on the server that is running SGI Irix 6.5. This server supports MIPS Pro C compiler. I don't have any idea of parallel C languages. I looked into few posts in this group. I could make out that there are several languages for parallel programming and parallel C is one of them. I need to know if this is supported by MIPS Pro C Compiler. Or are there any other parallel C languages that have...
0
1270
by: fiepye | last post by:
Hello. I am interested in parallel computing in Python. Except other modulesI would like to use new modules for vector and matrix operations and scientific computing SciPy and NumPy. I have already installed LAPACK and BLAS libraries. It works well. For object oriented parallel programming in Python on a single machine I can use techniques such as Bulk Synchronous Parallelism (BSP) or Message Passing Interface (MPI). There are mentioned...
10
2470
by: Mythmon | last post by:
I am trying to make a program that will basically simulate a chess clock in python. To do this I have two threads running, one that updates the currently running clock, and one that watches for a keypress. I am using the effbot Console module, and that is where I get the events for the keypresses. But when I press space it crashes shortly after. The program stops, the Console closes, and windows says that the program pythonw.exe has had an...
43
4303
by: parallelpython | last post by:
Has anybody tried to run parallel python applications? It appears that if your application is computation-bound using 'thread' or 'threading' modules will not get you any speedup. That is because python interpreter uses GIL(Global Interpreter Lock) for internal bookkeeping. The later allows only one python byte-code instruction to be executed at a time even if you have a multiprocessor computer. To overcome this limitation, I've created...
3
2517
by: schouwla | last post by:
Any chance that Visual Studio 2005 will support parallel or even discributed build on c# code soon? Lars
26
8095
by: Prime Mover | last post by:
Hello all, I have got the pseudo-code below that I would like to convert to c language. The algorithm calculates Pi value. I am somewhat familiar with C language, but I am just starting to learn parallel programming. In this specific example, the idea seems to be simple: one must subdivide the main loop into pieces that can be executed by independent "tasks" (computers??). Then, each "worker task" executes a part of the loop a...
0
8262
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.