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.
29297 Discussions

Random number generation using ranlib

danielpollmann
Beginner
629 Views
Hi,

for an application, I am generating random variates from a standard exponential distribution using the function sexpo() included in the popular ranlib.f (e.g., http://people.sc.fsu.edu/~jburkardt/f77_src/ranlib/ranlib.html).

It works perfectly fine using the compiler version 11.1.072. However, if I use version 12.3.174 (with MKL included), the function returns very large integer values instead which are definitely not drawn from a standard exponential distribution. Unfortunately, I need to use the newer version because it has better support for allocatable arrays.

I was wondering whether anyone had come across either this or a similar problem, or has an idea what might go wrong in the newer version given its new features or any particularities of MKL.

Thanks!
0 Kudos
1 Reply
Steven_L_Intel1
Employee
629 Views
I wonder if you have declared the procedure properly in the caller. It should be returning reals, not integers. Since you have the source code, you should be able to step through it with the debugger and see what is going wrong.
0 Kudos
Reply