Intel® Fortran compiler - random number intrinsic function RAN malfunction


Reference Number :  DPD200050312

Version :  11.x (and all earlier releases)

Operating System :  Windows*, Linux* and Mac OS X*/IA-32, Intel® 64, IA-64

Problem Description : 

The Intel Fortran compiler elemental intrinsic function RAN will malfunction in the presence of a USE IFPORT statement in the calling routine. The inclusion of the IFPORT module causes RAN to produce the same random number across subsequent calls.

For example, g
iven this sample Fortran program

program sample
integer iseed /3/   
write (*,*) ran(iseed)
write (*,*) ran(iseed)

When compiled with the Intel Fortran compiler, the program prints the following random numbers:


When removing USE IFPORT from the sample program above and compiling with the Intel Fortran compiler, the program prints the following random numbers:


Resolution Status : This issue is fixed in the following 11.0 update packages: w_cprof_p_11.0.072 (Windows), l_cprof_p_11.0.081 (Linux), m_cprof_p_11.0.059 (Mac OS X). In lieu of installing a newer update, to work-around this compiler issue, isolate the RAN function into a calling routine that does not include a USE IFPORT statement. 


[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
For more complete information about compiler optimizations, see our Optimization Notice.