30 June 2008

(Pseudo)random numbers matter


The newly released LAPACK Working Note #206 gives yet another reason why generating good pseudorandom numbers matters:


In May 2007, a large high performance computer manufacturer ran a twenty-hour long High Performance Linpack benchmark. The run fails with the following output:

|| A x - b ||_oo / ( eps * ||A||_1 * N ) = 9.22e+94 ...... FAILED


What happened was that the benchmark's matrix generator uses a lame linear congruential pseudorandom number generator, which causes generated matrices to have repeated columns for certain unfortunate choices of matrix dimension. This of course makes one wonder why the generator doesn't just make a matrix which is known to be invertible, say, by generating a sufficiently nonzero diagonal matrix and hitting it on both sides with orthogonal transforms until the zeros are filled in. Regardless, the bug meant 20 hours of very expensive, intensely power-consuming supercomputer time were wasted on computing the wrong answer to a problem which at such sizes very few people need to solve. So, random numbers do matter ;-)

6 comments:

John said...

Who, in say the past 40 years, has been articulating the opposite case, that they aren't important?

HilbertAstronaut said...

My post was more like one of those public service announcements for soccer fans that encourage them not to be racist -- generally people don't articulate the opposite position, but tacitly hold it by their actions or lack thereof.

John said...

In that case, proceed with much wecoming! :-D

HilbertAstronaut said...

haha, thanks :-D

PRNGs are one of those things for which I have to harp on the n00bs in our research group, as they always assume that either the system PRNG or whatever formula they find in Numerical Recipes is good enough, and then they go off and use the PRNG in extreme ways that expose its flaws (lack of thread safety is a good example).

John said...

I remember one class really hammered it home for me, where the U(0,1) random number generator that used to ship with Excel would occasionally include negative values.

HilbertAstronaut said...

HAHA! ;-P

It could be that they use floating-point numbers instead of integers in the sequence. That's a mistake which I've never seen before ;-)