The seppo module allows the same functionality, but distributed over several processes:
seppo.map_parallel( some_module.function, [1,2,3,4] )
In this case, each iteration may evaluate the function in a different process, possibly in a different computer. The idea is a simple concept and is hopefully natural transition for Python programmers to use the power of multi-processor computers and clusters.
Currently, seppo is based on Pyro mobile code and is subject to the same caveats. To understand these issues, please read about Pyro mobile code.
An example
The following example is included with seppo.
The main program (simple.py):
import seppo
import example_module
results = seppo.map_parallel(example_module.hello_world, [1,2,3,4,5])
for result in results:
print result
Here is the function that does the work. Note, this function must be in a separate module, due to a limitation of Pyro mobile code. (example_module.py):
import socket, os
def hello_world( value ):
value2 = value*value
fqdn = socket.getfqdn()
pid = os.getpid()
host_str = "%s, process %d"%(fqdn,pid)
result = 'hello world from %s (input=%f, value*value=%f)'%(host_str,value,value2)
return result
And to start a server (serv_a_process.py):
import seppo
seppo.start_seppo_enslaved_server()
The sequence to run this example:
Start a Pyro name server
Run the server(s) (python serv_a_process.py)
Run the client (python simple.py)
The above should produce output something like the following if there are 2 servers running:
$ python simple.py
hello world from host1, process 23759 (input=1.000000, value*value=1.000000)
hello world from host1, process 23759 (input=2.000000, value*value=4.000000)
hello world from host1, process 23759 (input=3.000000, value*value=9.000000)
hello world from host2, process 9832 (input=4.000000, value*value=16.000000)
hello world from host2, process 9832 (input=5.000000, value*value=25.000000)
LOL Did that make you laugh?
2006-09-16 13:57:26
·
answer #1
·
answered by Anonymous
·
0⤊
0⤋
I have been given the midland too....i'm from nyc nevertheless. i assume that is solid to be fairly accentless considering that i'm an actress. i nevertheless adore community accents nevertheless! Your effect: The Midland "you have a Midland accessory" is merely yet in a various way of exclaiming "you do not have an accessory." you probable are from the Midland (Pennsylvania, southern Ohio, southern Indiana, southern Illinois, and Missouri) yet then for all all of us understand you should be from Florida or Charleston or one in all those huge southern cities like Atlanta or Dallas. you have a solid voice for television and radio.
2016-10-15 01:58:07
·
answer #2
·
answered by scharber 4
·
0⤊
0⤋
Derogertory word used by the English and Australians for all American nationals. Derived from Rhyming slang (Septic Tank = Yank)
By the way, I have never used it because I am not that way.
2006-09-16 13:45:49
·
answer #3
·
answered by rltouhe 6
·
1⤊
1⤋
Sure it's just another made up word for some a$shole to use to insult somebody.
2006-09-16 13:45:57
·
answer #4
·
answered by Anonymous
·
0⤊
0⤋
It's the c-r-a-p that comes out of some peoples mouth or their keyboard and the place they store it.
2006-09-16 14:00:10
·
answer #5
·
answered by dam 5
·
0⤊
0⤋