Ask Your Question

Revision history [back]

Not sure if that would help, but one could try making the relevant import part of the function that is being called in parallel.

Something like the following:

from sage.parallel.multiprocessing_sage import pyprocessing

p_iter = pyprocessing(4)
P = parallel(p_iter=p_iter)

def f(x):
    from keflll import invertibles
    return invertibles(x)

list(P(f)([(2,), (3,)]))

Not sure if that would help, but one could try making the relevant import import could be made part of the function that is being called in parallel.

Something like the following:

from sage.parallel.multiprocessing_sage import pyprocessing

p_iter = pyprocessing(4)
P = parallel(p_iter=p_iter)

def f(x):
    from keflll import invertibles
    return invertibles(x)

list(P(f)([(2,), (3,)]))