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
325 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
Black Belt
314 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?

Gennady_F_Intel
Moderator
302 Views

#include "mkl_vsl.h"

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

Carly
Beginner
288 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.

Gennady_F_Intel
Moderator
286 Views

You are welcome to contact us with any further questions. 


Reply