tkp.distribute – routines for running on distributed nodes

tkp.distribute implement various computation distribution methods. All sub modules should communicate with the other parts of TKP through the tkp.steps submodule.

class tkp.distribute.Runner(distributor, cores=0)[source]

Bases: object

Parameters:distributor – the name of the distribution method, example multiproc
map(func_name, iterable, args=[])[source]
  • func – The function to be called
  • iterable – a list of objects to iterate over
  • arguments – list of arguments to give to the function

the results of all mapped functions, iterable, arguments=[])[source]

doesn’t do anything for serial

A computation distribution implementation using the build in multiprocessing module. the function only accepts one argument, so we need to zip the iterable together with the arguments., iterable, args)[source]

set the number of cores to use. 0 = autodetect