Intel
® 
Math Kernel Library 10.0 – Vector Statistics
PrintEmail to a friendSupportNewsletterRSSDigg thisdel.icio.us
Product InformationEvaluation CenterSupport ResourcesDocumentation
OverviewBLAS/LAPACKScaLAPACKSparseFastVectorRandomLINPACK


Buy Product ›

Free Evaluation ›

Free Non-Commercial Download for Linux* ›

Vector Statistical Library

Vector Statistical Library


The Intel® Math Kernel library (Intel® MKL) includes an expanding amount of statistical functionality that we aggregate into a sub-library which we call the Vector Statistical Library (VSL). The Intel MKL Vector Statistical Library today includes Convolution/Correlation and an extensive collection of Random Number Generators.

Convolution/Correlation


VSL provides a set of routines intended to perform linear convolution and correlation transformations for single and double precision data. We provide:

  • Fourier and Direct Algorithms
  • One or Multiple Dimensions
  • Single and Double Precision
  • C and Fortran Interfaces
  • Modern easy-to-use “task” oriented API
  • IBM ESSL* Interface for ESSL users


Detailed information on the Convolution and Correlation routines in the Intel MKL Vector Statistical Library can be found in the Intel MKL Reference Manual.

Random Numbers

The Intel MKL Vector Statistical Library (VSL) contains a collection of random number generators for a number of probability distributions. All VSL functions are highly optimized to deliver outstanding performance on Intel® architecture.

Applications that can significantly improve performance with VSL include simulation algorithms commonly used in physics, chemistry, medical simulations, and financial analysis software. The library provides both Fortran and C interfaces for all VSL functions.

VSL provides nine basic random number generators that differ in speed and statistical qualities, as shown below.

Basic Random-Number Generators (BRNGs)
Pseudo-random
MCG59Multiplicative Congruential Generator 59-bit
MCG31m1Multiplicative Congruential Generator 31-bit
MRG32k3aMultiple Recursive Generator 32-bit
R250Generalized feedback shift register
Wichman-HillA set of 273 basic generators
MT19937Mersenne Twister
MT2203A set of 1024 Mersenne Twister basic generators
Quasi-random
SobolA 32-bit Gray code-based generator
NiederreiterA 32-bit Gray code-based generator

VSL supports multiple methods for creating random streams, including the leapfrog method and the block-splitting method. For large Monte Carlo simulations, VSL provides routines to save or restore random streams to or from a file. The abstract streams give greater flexibility in the use of distribution generators with random data stored in a buffer.

VSL also provides support for user-designed basic generators, as well as for numerous continuous and discrete distribution generators.

Distribution Generator Types
Continuous
Discrete
UniformUniform
GaussianUniformBits
GaussianMVBernoulli
ExponentialGeometric
LaplaceBinomial
WeibullHypergeometric
CauchyPoisson
RayleighPoisson with varying mean
LognormalNegative binomial
Gumbel
Gamma 
Beta 
Random Number Generator Performance
VSL functions operate on single- and double-precision real vector arguments and can provide substantial performance advantages over scalar implementations. Tables containing complete performance information for all VSL random number generators and distributions on Intel® processors are available here.

To demonstrate the optimized performance of Intel® Math Kernel Library, we compared the standard C rand() function to the Intel MKL vector uniform random number generator. Intel MKL VSL functions are thread-safe, so we also present the speed of the Intel MKL vector uniform random number generator after it has been parallelized using OpenMP*.

VSL Performance vs. C Code on Intel® Xeon® Processor-based System§
Intel Xeon Processor1
Running Time (seconds)
Speedup vs. rand() (times)
Standard C rand() function
40.52
1.00
Intel® MKL VSL random number generator
6.88
5.89
OpenMP* version (8 threads)
0.92
44.04
1Two-way Quad-Core Intel® Xeon® processor-based system (8 cores total), running at 2.4 GHz with 2x8MB L2 cache and 4GB memory with Windows* 2003 Enterprise x64 Edition and Intel® C++ Compiler 10.0

2 Intel® 64 architecture version of Intel® MKL VSL was used in measurements

VSL Performance vs. C Code on Intel® Itanium® 2-based System§
Intel Itanium 2 Processor1
Running Time (seconds)
Speedup vs. rand() (times)
Standard C rand() function
168.68
1.00
Intel® MKL VSL random number generator
5.9
28.59
OpenMP* version (4 threads)
1.71
98.64
1 Two-way Dual-Core Itanium® 2-based server platform (4 cores total), running at 1.67 GHz with 4x12MB L3 cache and 16GB memory with Windows Server* 2003 Enterprise Edition and Intel® C++ Compiler 10.0

Comparison of Intel® MKL to Alternative Libraries
Visual Numerics Inc. and Numerical Algorithms Group Ltd. are providers of popular numerical and statistical libraries. Visual Numerics provides a collection of mathematical and statistical analysis subroutines for Fortran and C/C++ users known as the IMSL Fortran 90 MP Library (F90MP*) and the IMSL C Numerical Library*, respectively. Numerical Algorithms Group provides numerical libraries for C/C++ and Fortran users known as NAG Fortran 77 Library*, NAG Fortran 90 Library*, NAG C Library*, NAG SMP Library* and the NAG Parallel Library*.

The following table presents summary information on random number generation capabilities existing in the Intel MKL 10.0, IMSL F90MP 6.0, and NAG Fortran 77 (Mark 21) libraries.

Intel® Math Kernel Library (Intel® MKL) 10.0 Features vs. IMSL* and NAG*
Feature
Intel MKL
IMSL
NAG
BRNGs
  • 7 pseudorandom
  • 2 quasi-random
  • 9 pseudorandom
  • 1 quasi-random
  • 2 pseudorandom
  • 3 quasi-random
User-designed BRNGs
  • Supported
  • User-designed BRNG replaces library BRNGs; many library services do not work with user-designed BRNG
  • Not supported
Sequence manipulation
  • Mechanisms of creating, copying and deleting streams
  • Saving/restoring stream to/from a file
  • Arbitrary number of random streams based on one or more BRNGs
  • Service subroutines for switching between BRNGs
  • Subroutines for saving and restoring BRNG seed
  • Subroutines for saving and restoring state tables for GFSR and shuffled BRNGs
  • Subroutines for saving and restoring BRNG seed
  • Service subroutines for switching between BRNGs
Sub-sequence splitting
  • Support for both "skip-ahead" and "leapfrog" methods
  • Skip-ahead method allows skipping an arbitrary number of elements in a sequence
  • Leapfrog method allows splitting into an arbitrary number of non-overlapping subsequences
  • Limited skip-ahead method support (only skipping 100,000 elements in a sequence)
  • Not supported
Distribution generators and other BRNG- related functionality
  • 20 univariate
  • 1 multivariate
  • Multiple transformation methods available by passing method ID as parameter
  • 24 univariate
  • 3 multivariate
  • General discrete, continuous univariate and data based multivariate generators
  • Random orthogonal and correlation matrices, two-way tables, order statistics, samples and permutations, stochastic processes
  • Multiple transformation methods available as separate subroutines
  • ORNGs are for uniform distribution only
  • 24 univariate
  • 2 multivariate
  • General univariate distribution generator
  • Random samples, permutations, time-series models, orthogonal and correlation matrices, random tables
  • Multiple transformation methods are not available
  • ORNGs are for uniform, Gaussian and lognormal distributions
Vector/scalar interfaceVector interface onlySome distribution generators have vector and scalar form; others are of either vector or scalar form onlySome distribution generators have vector and scalar form; others are of either vector or scalar form only
Programming languages interfaceC and Fortran interface in a single packageFortran, C and Java* interface in separate packagesC and Fortran interface in separate packages
Supported hardware
  • Intel® architectures only
  • Highly optimized for target architecture
Multiple platforms (e.g., Intel, Cray, HP, IBM, Sun)Multiple platforms (e.g., Apple, Cray, HP, IBM, Sun)

1 Two methods for generation of normally distributed random numbers are available in the library starting from Mark 20.
The following table presents numerical and performance results on an Intel Xeon processor-based system for the three libraries with random number generation capabilities, namely for Intel MKL 10.0, IMSL F90MP 6.0, and NAG SMP Fortran 77 Library (Mark 21). Speed-ups are measured against the slowest version.

Performance Comparison: Black-Scholes Option-Pricing Model1, §
Library
Basic Generator
Option Value (Exact Value)
Absolute Error (Standard Error)
Time (seconds)
Speedup (times faster)
Call
Put
Call
Put
Intel® MKL
MCG31m1
16.7306

(16.7341)
7.2177

(7.2179)
0.0036

(0.0019)
0.0002

(0.0009)
4.671
8.78
MCG59
16.7364

(16.7341)
7.2162

(7.2179)
0.0023

(0.0019)
0.0017

(0.0009)
4.86
8.44
MT19937
16.7349

(16.7341)
7.2164

(7.2179)
0.0007

(0.0019)
0.0015

(0.0009)
5.078
8.08
NAG
Original
16.7339

(16.7341)
7.2182

(7.2179)
0.0002

(0.0019)
0.0003

(0.0009)
11.45
3.58
IMSL
MT19937
16.7324

(16.7341)
7.2178

(7.2179)
0.0017

(0.0019)
0.0001

(0.0009)
35.703
1.15
Minimal Standard
16.7343

(16.7341)
7.217

(7.2179)
0.0001

(0.0019)
0.0009

(0.0009)
41.031
1.00
1 Monte Carlo is a valuable tool for performing real-time financial analysis of complex, worldwide markets. In our example, we consider the well-known Black-Scholes option-pricing model, which is a framework for thinking about option pricing and is a de facto standard in the financial world.

We used the 'minimal standard' and 32-bit MT19937 basic generators in the IMSL library. We used the 'original' basic generator in the NAG library. For Intel MKL 10.0, we used three basic generators: MCG31m1, MT19937 and MCG59. The last being identical to the 'original' basic generator in NAG libraries, while properties of MCG31m1 are similar to the 'minimal standard' basic generator from IMSL.

For more information on this performance test, please refer to the white paper Making the Monte Carlo Approach Even Easier and Faster by Sergey A. Maidanov and Andrey Naraikin.

Summary
The Vector Statistical Library of Intel Math Kernel Library contains Convolution/Correlation and a comprehensive set of random number generators that are highly optimized for Intel® architecture and can significantly increase the performance of your application over alternative solutions.

Reference
  • VSL Performance Data
    Complete performance information for all VSL random number generators and distributions on Intel® Xeon® and Intel® Itanium® processors.
  • VSL Notes (PDF 1.2MB)
    Detailed information on VSL BRNGs and distributions, and random number generators in general.
  • Monte Carlo European Options Pricing (PDF 85KB)
    A paper discussing the use of popular random number generators in derivative security pricing.
  • Intel MKL Documentation
    See all of the documentation available for Intel MKL.
  • Intel MKL Discussion Forum
    The place to ask questions and share information with other Intel MKL users.
§ Performance tests and ratings are measured using specific computer systems and/or components and reflect the appropriate performance of Intel products as measured by those tests. Any difference in system design or configuration may affect actual performance. Buyers should consult other sources of information to evaluate the performance of systems or components they are considering purchasing. For more information on performance tests and on the performance of Intel products, go to http://www.intel.com/software/products/.



Intel® Software
Network
Intel® Software Network
  • It’s free and easy to become a member, so join today!