> Feature - the calls all happen at once starting with the same state of 
>> sage including the random state.
>>  
>>
>
> how one would then run a randomised algorithm in parallel? (e.g. testing 
> property with random input)
> In such a case one certainly need something orthogonal to this.
>

Calling the same function f with the parallel decorator iteratively gives:

sage: [f(a) for a in range(10)]
[0.5456150826695888,
 1.5274761438193447,
 2.6261975603956875,
 3.311480135021058,
 4.622068879474614,
 5.056304819780978,
 6.850777826232956,
 7.652224224628873,
 8.419067022860219,
 9.356877740213488]

That's why, as a user, I was expecting the same behavior for f(range(10)).

Also, I realized using @parallel(p_iter='reference') gives what I was 
expecting and @parallel(p_iter='multiprocessing') gives a intermediate 
(pairs of results with same random part, two because I have two cpus I 
guess). So between using p_iter='fork' with a random input or using 
p_iter='reference', is there some reason to choose one instead of the other?

Sébastien

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to