ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 13 Aug 2011 01:11:09 +0200Creating plots in parallelhttps://ask.sagemath.org/question/8271/creating-plots-in-parallel/Ok, even though my last question about @parallel was foolish, here is another one. I want to create a simple animation that consists of many plots. It takes a minute or two on my computer to produce. But it would be nice if I could harness the idle CPU's I have and create the frames for the animation in parellel. I thought this would be easy like this:
x = var('x')
FRAMES = 10
@parallel
def frame(i):
return plot(sin(i*x), (x, 0, pi))
P = [ p[1] for p in frame(range(1,FRAMES+1)) ]
#A = animate(blah, blah, ...)
and what I get back (in the Sage notebook) is:
invalid load key, 'x'.
Killing any remaining workers...
Any idea what is going wrong here?
benjaminfjonesSat, 13 Aug 2011 01:11:09 +0200https://ask.sagemath.org/question/8271/