futures_multiprocessing

support for using the multiprocessing library in combination with the workbench.

class ema_workbench.em_framework.futures_multiprocessing.MultiprocessingEvaluator(msis, n_processes=None, maxtasksperchild=None, **kwargs)

Evaluator for experiments using a multiprocessing pool.

Parameters:
  • msis (collection of models)

  • n_processes (int (optional)) – A negative number can be inputted to use the number of logical cores minus the negative cores. For example, on a 12 thread processor, -2 results in using 10 threads.

  • max_tasks (int (optional))

note that the maximum number of available processes is either multiprocessing.cpu_count() and in case of windows, this never can be higher then 61

evaluate_experiments(experiments: Iterable[Experiment], callback: Callable, **kwargs)

Evaluate experiments.

finalize()

Finalize the pool.

initialize()

Initialize the multiprocessing pool.