[Scilab-users] {EXT} Re: grand in loop

Stéphane Mottelet stephane.mottelet at utc.fr
Wed Oct 2 11:04:10 CEST 2019


Le 30/09/2019 à 11:23, jbaudais a écrit :

> I used disp instead of mprintf and it is the same. I removed mprintf, so the
> code is
>
>> for i=1:2000, grand(1,1000000,"exp",1); end
> and after some minutes I cannot stop or kill within Scilab. I must use the
> kill linux command. That's incredible!!!

There are other incredible things in Scilab, but this one seems quite 
easy to track.

First of all, this is not a problem in the Scilab kernel itself, but 
rather localized in the random generator itself. More precisely in the 
base uniform generator. If you change the default one (Mersenne-Twister) 
by the "Keep It Simple Stupid" :

grand("setgen","kiss")

then your script does not freeze Scilab. However, with the default 
Mersenne-Twister generator the freeze occurs very early before the  
2^19937 period so it does not seem so simple  but I think we can fix the 
issue. In the meantime, please use "kiss" generator which has a 
not-so-small period (2^131).

S.


>
> Jean-Yves
>
>
>
> --
> Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet




More information about the users mailing list