[SciPy-User] multiprocessing module

Ted To forums@theo...
Mon Nov 1 15:52:02 CDT 2010


Hi,

I'm trying to get multiprocess to do a bunch of independent
calculations and save the results in a file and I'm probably going
about it the wrong way.  I have a function defined "computeEq" that
does the calculation and writes the result to a file (outfile) and I
call it using:

po = Pool()
po.map_async(computeEq, product(rules,repeat=N))
po.close()
po.join()
outfile.close()

This seems to work for the most part but I seem to lose the last few
calculations.  Indeed, one of my writes is truncated before the write
is complete.

Thanks in advance,
Ted To


More information about the SciPy-User mailing list