BLOCK_SIZE in vdRngLognormal

BLOCK_SIZE in vdRngLognormal

I am new to using IMKL. I will be primarily using in for running numerical simulations. In trying to understand how to use MKL I was programming in an example from Sergey Maidanov's paper Monte Carlo Options Pricing Using Various Industry Library Solutions, which I got from the Intel web site. In this paper for MKL he uses a variable called BLOCK_SIZE when he sets up his call to vdRngLognormal. He doesn't doesn't give a value for BLOCK_SIZE nor does he give any explanation on how to determine what it should be. Is the value for BLOCK_SIZE that will give the best performance dependent on the machine the code is run on, or the BRNG that is called for the random numbers?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The only reason to block is to use cache more effectively. You want a blocksize large enough that the VSL performance approaches the asymptotic performance for the function (see http://www.intel.com/software/products/mkl/data/vsl/vsl_performance_data...) but is not so large that there is cache thrashing.

As the performance reference shows, vectors of about 1K in length give you a substantial percentage of the ultimate performance for the various random number generators.

Bruce

Leave a Comment

Please sign in to add a comment. Not a member? Join today