[scilab-Users] generators for grand

Michaël Baudin michael.baudin at scilab.org
Mon Dec 6 08:26:10 CET 2010


Hi,

I was able to reproduce the bug:

http://bugzilla.scilab.org/show_bug.cgi?id=8560

Best regards,

Michaël Baudin

Le 05/12/2010 21:07, Daniele Andreucci a écrit :
> michael.baudin at scilab.org wrote on 12/05/10 11:29:
>>   Hi,
>>
>>   Your report is that, on your machine:
>>    * mt, urand, kiss : work
>>    * fsultra, clcg2, clcg4 : fail
>>   It may happen that there is a bad portability of the source code of
>>   these generators on 64 bits systems.
>>
> Actually,
>
> * mt, clcg2, clcg4: work
> * fsultra, kiss, urand: fail
>
> as confirmed by running your script:
>>   for rngen = [ "mt", "kiss", "clcg2", "clcg4", "urand", "fsultra" ]
>>     mprintf("rngen:%s\n",rngen);
>>     grand ( "setgen" , rngen );
>>     r = grand(1,1,"exp",1);
>>     m = grand(1,"mul",10,[0.2;0.5]);
>>   end
>>
> I ran it by removing the three generators "kiss", "urand", "fsultra"
> from the list rngen, and everything worked. If I add one of the three to
> the list, Scilab gets stuck: I mean, when the cycle arrives at the
> failing generator, it outputs the generator name, and then the
> computation never ends, the Scilab window menu commands (like Quit) do
> not work, and I need stop the process by means of the Linux kill command.
>
> The instruction actually causing the freeze seems to be the one calling
> the "mul" distribution. Indeed, the instruction
>
>>     r = grand(1,1,"exp",1);
> is carried out anyway, even with "kiss", "urand", "fsultra". But its
> results are suspect (I think): the following is the output of a
> modification of the script above, cycling 1000 times for each given
> generator, and averaging the variable r:
>
> *** Scilab script:
> for rngen = [ "mt", "clcg2", "clcg4" , "kiss", "fsultra", "urand" ]
>     mprintf("rngen:%s\n",rngen);
>     grand ( "setgen" , rngen );
>     r=grand(1,1,"exp",1);
>     for i=1:999 do
>     r = grand(1,1,"exp",1) + r;
>     end
>     r=r/1000
> //  m = grand(1,"mul",10,[0.2;0.5])
> end
> ***
> *** Scilab output:
> -->exec("test2.sci");
> rngen:mt
>   r  =
>
>      0.9827961
> rngen:clcg2
>   r  =
>
>      1.0035369
> rngen:clcg4
>   r  =
>
>      1.0353063
> rngen:kiss
>   r  =
>
>      30419447.
> rngen:fsultra
>   r  =
>
>      31473190.
> rngen:urand
>   r  =
>
>      63800551.
> ***
> Moreover, about the other hint:
>> Does the following work (after a restart of Scilab):
>>
>>    grand ( "setgen" , "fsultra" );
>>    m = grand(1,"mul",10,[0.2;0.5]);
> it does not work, Scilab freezes as explained above.
>
> I performed the trials with Scilab 5.3 beta5 Linux 64 bit, but sporadic
> attempts confirmed the same behaviour for Scilab 5.2.2 (standard Debian
> Squeeze amd64 package).
>
> Thanks a lot for your help, and for the pointers to the code.
>
> Best regards
>
> Daniele Andreucci
>


-- 
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94





More information about the users mailing list