Random Number Generators

Intel MKL VSL provides a set of routines implementing commonly used pseudo- or quasi-random number generators with continuous and discrete distribution. To improve performance, all these routines were developed using the calls to the highly optimized Basic Random Number Generators (BRNGs) and the library of vector mathematical functions (VML, see "Vector Mathematical Functions").

VSL provides interfaces both for Fortran and C languages. For users of the C and C++ languages the mkl_vsl.h header file is provided. For users of the Fortran 90 or Fortran 95 language the mkl_vsl.f90 header file is provided. The mkl_vsl.fi header file available in the previous versions of Intel MKL is retained for backward compatibility. For users of the FORTRAN 77 language the mkl_vsl.f77 header file is provided. All header files are found in the following directory:
${MKL}/include

The mkl_vsl.f90 header is intended for using via the Fortran include clause and is compatible with both standard forms of F90/F95 sources - the free and 72-columns fixed forms. If you need to use the VSL interface with 80- or 132-columns fixed form sources, you may add a new file to your project. That file is formatted as a 72-columns fixed-form source and consists of a single include clause as follows:

include ‘mkl_vsl.f90’

This include clause causes the compiler to generate the module files mkl_vsl.mod and mkl_vsl_type.mod, which are used to process the Fortran use clauses referencing to the VSL interface:

use mkl_vsl_type
use mkl_vsl

Because of this specific feature, you do not need to include the mkl_vsl.f90 header into each source of your project. You only need to include the header into some of the sources. In any case, make sure that the sources that depend on the VSL interface are compiled after those that include the header so that the module files mkl_vsl.mod and mkl_vsl_type.mod are generated prior to using them.

The mkl_vsl.f77 header is intended for using via the Fortran include clause as follows:

include ‘mkl_vsl.f77’

Note iconNote

For Fortran 90 interface, VSL provides both subroutine-style interface and function-style interface. Default interface in this case is a function-style interface. Function-style interface, unlike subroutine-style interface, allows the user to get error status of each routine. Subroutine-style interface is provided for backward compatibility only. To use subroutine-style interface, manually include mkl_vsl_subroutine.fi file instead of mkl_vsl.f90 by changing the line include ‘mkl_vsl.f90’ in include\mkl.fi with the line include ‘mkl_vsl_subroutine.fi’.

For the FORTRAN 77 interface, VSL provides only function-style interface.

 

All VSL routines can be classified into three major categories:

The last two categories are referred to as service routines.

Optimization Notice

Intel compilers, associated libraries and associated development tools may include or utilize options that optimize for instruction sets that are available in both Intel and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel compilers, including some that are not specific to Intel micro-architecture, are reserved for Intel microprocessors. For a detailed description of Intel compiler options, including the instruction sets and specific microprocessors they implicate, please refer to the "Intel Compiler User and Reference Guides" under "Compiler Options." Many library routines that are part of Intel compiler products are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel compiler products offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

Intel compilers, associated libraries and associated development tools may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

While Intel believes our compilers and libraries are excellent choices to assist in obtaining the best performance on Intel and non-Intel microprocessors, Intel recommends that you evaluate other compilers and libraries to determine which best meet your requirements. We hope to win your business by striving to offer the best performance of any compiler or library; please let us know if you find we do not.

Notice revision #20110307


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.