Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Undefined RNG method in MKL VSL

Carly
Beginner
707 Views

Hello,

I have a C++ program that produces random numbers from various distributions. I am using multiple generators: vdRngGaussian, vdRngUniform, etc. The one generator that throws an error upon compilation is the vdRngChiSquare generator.

Here is the error:

main.cpp(31): error: identifier "VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA" is undefined
vdRngChiSquare(VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA, stream, 1, &r, nu);

main.cpp(31): error: identifier "vdRngChiSquare" is undefined
vdRngChiSquare(VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA, stream, 1, &r, nu);

 

I don't see a syntax error in my call to the generator. Any ideas what might be going on here?

Thanks in advance.

0 Kudos
4 Replies
mecej4
Honored Contributor III
696 Views

The symbolic constant in question is declared in mkl_vsl_defines.h . Did you #include this file, either directly or through one of the other mkl_vsl*.h files?

0 Kudos
Gennady_F_Intel
Moderator
684 Views

#include "mkl_vsl.h"

You may check the vdrngchisquare.c example ( mklroot\vslc\source\ ) .

0 Kudos
Carly
Beginner
670 Views

Thank you both for your responses. It turns out I am using an outdated version of MKL, and that is why I do not have access to the Chi Square RNG.

0 Kudos
Gennady_F_Intel
Moderator
668 Views

You are welcome to contact us with any further questions. 


0 Kudos
Reply