Hi,

Le mercredi 29 janvier 2020 08:47:32 UTC+1, Mattia Villani a écrit :
>
> I did as suggested adding the line
>
>
> Parallelism().set(nproc=4)
>
> before the contraction, but it behaves strangely: it works for a short while 
> with 4 processors, then with 3, then with 2 and finally it works for hours 
> with a single processor. 
> It seems that no new packages are distributed between the processors. 
>
>
>

This  behaviour is not so strange: the parallelization is performed on 
pairs of indices and it could that for one pair of indices the computation 
takes much longer time. Since most of the computational time is spent in 
the simplification of symbolic expressions, you could try to use a light 
simplifying function via the method M.set_simplify_function, where M is 
your manifold. The fastest one would be M.set_simplify_function(simplify), 
but it might not be efficient. See
https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/manifold.html#sage.manifolds.manifold.TopologicalManifold.set_simplify_function
for examples.

Best wishes,

Eric.
  

> Il giorno mercoledì 22 gennaio 2020 07:43:52 UTC+1, Mattia Villani ha 
> scritto:
>>
>> How to use parallelization on contraction of tensor? Consider the case I 
>> have two successive contraction like this:
>>
>> Tud=etuu['^{ab}']*eamup['^c_b']
>> Tp=Tud['^{ab}']*eamup['^c_a']
>>
>> How con I parallelize it?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/48760cdf-e943-4480-a9c0-30c2208531f8%40googlegroups.com.

Reply via email to