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

MKL_VSL.F77 and random numbers

Gerard_Keogh
Beginner
360 Views
Hi,
I'm trying to generate random numbers using
status = vdrnggaussian( method, stream, n, r, a, sigma )
a call to the math library mkl_vsl.f77.
I get the following compilation error:
Error 1 error LNK2019: unresolved external symbol _VDRNGGAUSSIAN referenced in function _MAIN__ TM25pgm.obj
Can you tell me how I can call the math library from within the program and get a stream of NORMAL/Gaussian random numbers?
Thanks
0 Kudos
3 Replies
MikeP_Intel
Moderator
360 Views
Suggest you repost your question to the MKL forum: http://software.intel.com/en-us/forums/intel-math-kernel-library/
0 Kudos
ArturGuzik
Valued Contributor I
360 Views
Well, unresolved symbols mean the linker (it is linker error, and not a compilation error as you wrote) doesn't know where to find the function. You need to provide/define appropriate libraries. See link advisor
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
and check which libraries you need.
You may also need to specify the module(s) containing definition/interface of the function.


The other most common sources of the error are (assuming that you have provided the correct list of libraries):

  • The declaration of the symbol contains a spelling mistake, such that, it is not the same name as the definition of the symbol.

  • A function was used but the type or number of the parameters did not match the function definition.

  • The calling convention (__cdecl, __stdcall, or __fastcall) differs on the use of the function declaration and the function definition.


A.
0 Kudos
Andrey_N_Intel
Employee
360 Views
Hello Gerard,

Please, have a look at MKL link line advisor and let us know how now it works for you.

Thanks,
Andrey
0 Kudos
Reply