Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29293 Discussions

Random number generator functions DRAND do not pass DIEHARD TEST

Mauricio_Ortiz
Beginner
820 Views

Hi, I have been using the DRAND and RAND functions to generateuniform RNs, but when tested with the DIEHARD suite of test , it performas very poorly, in factquite bad. I hadtried diffent seed values but same results overall, Have any one run into similar problems ?

thanks,
Mauricio Ortiz

0 Kudos
2 Replies
TimP
Honored Contributor III
820 Views

As I understand it, those functions are present only for backward compatibility with some legacy compilers of 2 decades ago, so aren't intended to pass quality tests, certainly not tests devised in the last 10 years. See analogous comments about RAND() in the URL quoted below. Also note the comments there about the requirement for open licensing of algorithms.

Even for the Fortran standard RANDOM_NUMBER function, which would be preferred in any application which has been maintained in the last decade, there doesn't appear to be a consensus among various compilers on the criteria for quality and speed.

We just had a post where there was a complaint, in effect, that current ifort doesn't have a faster RANDOM_NUMBER than its predecessor of 10 years ago (when both are run on the same recent CPU). Yet, the ifort RANDOM_NUMBER is several times as fast as the one offered by gfortran. gfortran is able to make changes to improved quality at the expense of speed without inciting riots:

http://gcc.gnu.org/ml/fortran/2007-07/msg00454.html
0 Kudos
Steven_L_Intel1
Employee
820 Views

The ifort RANDOM_NUMBER is a very good implementation,

0 Kudos
Reply