Merssene Twister Algorithm

So. In this Article http://www.pgroup.com/lit/articles/insider/v2n2a4.htm, has been shown how to parallelize the Mersenne Twister Algorithm using OpenMp and Cuda with the PGI Accelerator Directives.

Just talking about its OpenMP version (Because I need to use the Mersenne Twister in a #pragma omp parallel block), I’ m not able to get that time.

With 1 Thread:
Article Version: exec time = 1.306561 s
My version: exec time = 4.938561 s

Just OpenMp

So, I haven’t PGI installed because I think that the link wasn’t very good. But I should get this time and I can’t get it;

Someone have used this code and got the Article time?

I know that here we should talk about PGI but if someone can help-me Thanks.****

Hi Thalles,

What compiler are you using and with what options? Also, what type of CPU are you using?

Both the compiler and CPU will effect your performance. PGI often produces faster OpenMP performance then other compilers so this difference may account for the performance difference. Also, the article used a 2.67Ghz Nehalem processor.

  • Mat