let x be a list of mathematical objects and let + be a commutative binary operation on x's elements
def f(x):
result = x[0]
for i in range(1,len(x))
result = result + x[i]
return(result)
We want to break x up so that this function acts on a subset of elements in x, and these subsets are tackled on different CPU's on a cluster. Then we need to take y= [result_{cpu1},result{cpu2}] and f(y). I've browsed some documentation on this, and I'm having trouble making sense of the parallel decorator, getting it to acknowledge more than one CPU (there seems to be some ambiguity between setting using @parallel('ncpus' = #) or using SAGE_NUM_THREADS ?), and I can't tell whether we need to use MPI4PY here or whether SAGE already has everything we need. Any help would be very much appreciated.
Best,
Alex