Well the best thing would be if you didn't import paralel
in multi_polynomial_ideal.py. You should first write some decorators like
leif mentioned based on the trick that Tom showed so it will become easy to
make functions have multiple implementations. So that something like the
following woul
So, the solution is to move the parallel importation to somewhere
else? Which would be the apropriate place?
On 5 nov, 14:28, Maarten Derickx wrote:
> The problem is that by putting
>
> from sage.parallel.all import parallel
>
> in sage/rings/polynomial/multi_polynomial_ideal.py you changed the i
The problem is that by putting
from sage.parallel.all import parallel
in sage/rings/polynomial/multi_polynomial_ideal.py you changed the import
order of the sage library causing the import to fail because now you try to
import QuotientRing from the not yet completely initialized quotient_ring
>From a clean sage braaanch, i put the line
from sage.parallel.all import parallel
in sage/rings/polynomial/multi_polynomial_ideal.py and after
rebuilding i get the following output when starting up sage:
--
| Sage Version 4.7.2
On Fri, Nov 4, 2011 at 11:31 AM, mmarco wrote:
> Thanks for the example, Tom. I have tried to implement the
> algorithm='parallel' in the primary decomposition, but it doesn't
> recognize the parallel function. If i try to import it, it gives an
> error message at startup.
>
> I have tried with
>
Thanks for the example, Tom. I have tried to implement the
algorithm='parallel' in the primary decomposition, but it doesn't
recognize the parallel function. If i try to import it, it gives an
error message at startup.
I have tried with
import sage.parallel
from sage.parallel import all
But both
Well to be technically correct it is not the garbage collector but the
reference counting in python (the garbage collector is mainly for cleaning
up unreachable cyclic stuff and is only run once in the so many times,
while destruction after a reference count dropped to zero is done immediate
ev
On 4 Nov., 07:41, Tom Boothby wrote:
> The @parallel instance kills its still-running children once it drops
> out of scope. This happens immediately after the return statement is
> executed. Since I merely call .next() on the generator, the first one
> to finish gets picked out in milliseconds,
The @parallel instance kills its still-running children once it drops
out of scope. This happens immediately after the return statement is
executed. Since I merely call .next() on the generator, the first one
to finish gets picked out in milliseconds, and the remainders are axed
almost immediatel
On Thu, Nov 3, 2011 at 9:28 PM, leif wrote:
> On 4 Nov., 02:15, Tom Boothby wrote:
>> This is fairly easy to do with @parallel:
>>
>> def fast(x):
>> return x
>>
>> def slow(x):
>> sleep(x)
>> return x
>>
>> def slower(x):
>> sleep(x*x)
>> return x
>>
>> algorithms = [slower,
On 4 Nov., 02:15, Tom Boothby wrote:
> This is fairly easy to do with @parallel:
>
> def fast(x):
> return x
>
> def slow(x):
> sleep(x)
> return x
>
> def slower(x):
> sleep(x*x)
> return x
>
> algorithms = [slower, slow, fast]
>
> @parallel(len(algorithms))
> def fastest(i,x)
What i had in mind is something like this:
right now you can compute the primary decomposition of an ideal using
I.primary_decomposition(algorithm='sy') (default) or
I.primary_decomposition(algorithm='gtz')
what i propose is to keep this, and add some option like
I.primary_decomposition(algorit
On 3 Nov., 20:08, Maarten Derickx wrote:
> I already wrote some framework wich does this for my personal use. It isn't
> up to sage library code quality yet but I can send it to you or upload it
> to trac if you make a ticket.
One could write some decorator for functions (implementing different
s
I already wrote some framework wich does this for my personal use. It isn't
up to sage library code quality yet but I can send it to you or upload it
to trac if you make a ticket.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an emai
14 matches
Mail list logo