I use a loadbalancedview from Ipython.parallel to call a function on an iterable, ie
from IPython.parallel import Client
from functools import partial
rc = Client()
lview = rc.load_balanced_view()
lview.block = True
def func(arg0, arg1, arg2):
return func2(arg0) + arg1 + arg2
def func2(arg0):
return 2*arg0
answer = lview.map(partial(func, arg1=A, arg2=B), iterable_data)
Does the fact that func calls func2 make func not be executed in parallel (ie. does the GIL come into play?) I assume that when you call map, each cluster node gets a copy of func, but do they also get copies of func2. Further, does the fact that I use functools.partial cause any problems?