umontreal-simul / TestU01-2009

This is the 2009 version of TestU01, a software library, implemented in the ANSI C language, and offering a collection of utilities for the empirical statistical testing of uniform random number generators.
Apache License 2.0
64 stars 17 forks source link

Sstring_Run end of file reached #8

Open ChrisVega opened 3 years ago

ChrisVega commented 3 years ago

When running bbattery_RabbitFile once the Sstring_Run tests is reached the test failes stating that there are not enough bits in the file. The issue is that this fails for some files but not for others. The files are the same length and generated using the same method. If I edit my code to just spit out a series of all 1's for the failing file the test will not fail. To me it seems like there is a series of values in the file which is causing ufile.c to fail when reading. This should not be the case if I'm trying to evaluate a set of random numbers.

The following the the error for the Sstring_run test.

N=1, n=1002700, r=0, s=32

error in file ufile.c on line 248

5013504 bits have been read End-of-file detected. Not enough bits in file for these tests parameters

pierrelecuyer commented 3 years ago

Chris:

The reason is that for this particular test, the number of bits required for the test is random.  Read the description of the test.  The test runs until it has found n disjoint blocks of successive 1's.  If the 1's happen to be more clustered than usual, more bits will be required.  In fact, the total number of bits required for the test, named Y, is one of the test statistics:  The RNG fails this test when Y is too large!

-- Pierre L'Ecuyer

On 7/22/2021 12:07 PM, Chris Vega wrote:

When running bbattery_RabbitFile once the Sstring_Run tests is reached the test failes stating that there are not enough bits in the file. The issue is that this fails for some files but not for others. The files are the same length and generated using the same method. If I edit my code to just spit out a series of all 1's for the failing file the test will not fail. To me it seems like there is a series of values in the file which is causing ufile.c to fail when reading. This should not be the case if I'm trying to evaluate a set of random numbers.

The following the the error for the Sstring_run test.

N=1, n=1002700, r=0, s=32

5013504 bits have been read End-of-file detected. Not enough bits in file for these tests parameters

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/umontreal-simul/TestU01-2009/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVHLI2JJUGBK3SMJ6JKCM3TZA63XANCNFSM5A2KFQ5Q.

-- Pierre L'Ecuyer, Professeur Titulaire CIRRELT, GERAD, and DIRO, Université de Montréal, Canada http://www.iro.umontreal.ca/~lecuyer (Currently on sabbatical at Google Research)