Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Is the GNU GSL Mersenne twister PRNG faster than the MKL VSL version?

$
0
0

Hello everybody

I would like to perform some montecarlo simulations using the well-known Mersenne Twister PRNG. Before to start to write my code I decided to test the performance of this PRNG using the GSL and MKL libraries, so I wrote a small code for such comparison. The results I got suggested that the GSL version is faster.  May it be possible or am I doing something wrong?. I am compiling using

[]$icpc benchmark.c -O3 -c

[]$icpc benchmark.o -o benchmark -L/opt/intel/parallel_studio_xe_2017/compilers_and_libraries_2017/linux/mkl/lib/intel64 -mkl:parallel -lgsl -lgslcblas

Do you have a feeling about what is happening? The code is in attachment. It takes as argument the number of random variables to be generated.

Thanks

AttachmentSize
Downloadtext/x-csrcbenchmark.c1.78 KB

Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>