I'm trying to use the module "Parallel Python" (pp) to distribute the computation of a "big" tool (gdal2tiles, if you've heard of it). I was running a few simple tests to get familiar with pp, but I ran into a problem that I can't explain.
Here is the code :
import pp
def fun():
import subprocess
p = subprocess.Popen("dir", shell=True)
p.wait()
ppservers=("*",)
job_server=pp.Server(ncpus=0,ppservers=ppservers)
if __name__=='__main__':
FORMAT = u'%(asctime)-15s %(message)s'
import logging
logging.basicConfig( level=logging.DEBUG, format=FORMAT )
f = job_server.submit(fun)
r=f()
job_server.print_stats()
The "dir" in subprocess.Popen is just here to pass a valid shell command.
On my ppserver, I run "ppserver.py -a -d". On the client's console, it appears that the task never ends, whereas it does end on the server.
Before going any further in my tests, I would like to understand what's happening here, because my final program is way more complicated.
Thanks!