# how can I use parralelism in SAGE?

Hello I will generete multiple elliptic curves with size between 6 and 16 digits and to earn time I want to use Parralelism.

Thank you for you answer

how can I use parralelism in SAGE?

Hello I will generete multiple elliptic curves with size between 6 and 16 digits and to earn time I want to use Parralelism.

Thank you for you answer

2

A very simple way to use paralelism is provided by the @parallel decorator.

Just write a function that does what you want,with the decorator at the beginning. Then you can pass it a list of entries, and the output will be an iterator with the answers.

Example:

```
sage: @parallel
....: def f(a):
....: return a^2
....:
sage: r=f([1,2,3,4])
sage: r.next()
(((1,), {}), 1)
sage: r.next()
(((2,), {}), 4)
sage: r.next()
(((3,), {}), 9)
sage: r.next()
(((4,), {}), 16)
sage: r.next()
---------------------------------------------------------------------------
StopIteration Traceback (most recent call last)
```

Asked: **
2012-06-05 00:54:33 -0500
**

Seen: **117 times**

Last updated: **Jun 06 '12**

How to install guest addition in sage:VERR_PDM_MEDIA_LOCKED

sage 7 installation failed through ppa on ubuntu 14.04

Sage online notebook not working?

why sagemath cannot see other people' file?

How can I save an image from sage plot ?

How to convert any random mathematical expression to prefix?

How to locate sage at Python shell

Can I create a sage file, and import it as a Python module?

Using Pydev (eclipse) and Sage?

Is it better practice to show SAGE code on a web use of SAGE?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

Look at the "parallel computing" section of the reference manual: http://sagemath.org/doc/reference/parallel.html. Does that help?