ema workbench

Other Sub Sites

ema_parallel

Created on 21 dec. 2010

Code author: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>

calculator pool adapted from the pool provided in multiprocessing. This version is based on the python 2.6 version.

multiprocessing logging ideas based on code examples found on StackTrace: http://stackoverflow.com/questions/641420/how-should-i-log-while-using-multiprocessing-in-python

the implementation here allows the user to not be bothered with many of the details of multiprocessing. For example, logging will work the same regardless of whether multiprocessing is used. The process class here modifies the _logger in ema_logging to refer to the logger for its particular subprocess

class ema_parallel.CalculatorPool(msis, processes=None, kwargs=None)

Class representing a pool of processes that handles the parallel calculation heavily derived from the standard pool provided with the multiprocessing library

apply_async(experiment, callback, event)

Asynchronous equivalent of apply() builtin

run_experiments(experiments, callback)

starts a feeder thread that will add the experiments to the task queue