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

Random number generation

Guanchen
初学者
1,591 次查看

Hi, I am a newbie to do high-performance-computing using C libraries. I am trying to revive codes inherented from our previous group memeber, at which time oneAPI was not a thing. The core of my problem seems to be how to use mkl to generate random numbers. 

 

I got error messages saying "LNK2019 unresolved external symbol vdRngGaussian referenced in function main". 

 

Any hint where shall I start to track down the problem? Or is there a simple example code I could use to call vdRngGaussian?

 

I have installed the latest mkl libaries on a windows machine. I am using the visual studio 2019. 

0 项奖励
1 解答
Fengrui
主持人
1,345 次查看

You can enable oneMKL in Configuration Properties -> Intel Performance Libraries.

在原帖中查看解决方案

0 项奖励
5 回复数
mecej4O
新分销商 I
1,550 次查看

You have to instruct the compiler to link the MKL libraries to your objects. If you use the command line, use the /Qmkl option under Windows. If using VS, specify that the MKL libraries are to be used, by clicking the relevant setting in your project options.

0 项奖励
Guanchen
初学者
1,432 次查看

Hi, 

 

Thank you very much for the hint. This was how I configured the linker when I got this error. Anything wrong you could spot it out?

Guanchen_0-1763380370277.png

 

0 项奖励
mecej4O
新分销商 I
1,391 次查看

You have specified where to find the MKL libraries, but did not specify which one(s) to use.

0 项奖励
Guanchen
初学者
1,311 次查看

Hi,

 

Thanks for pointing out the problem. I thought mkl_sequential.lib is one of the library(ies) that I have specified. But probably, not the one that gives me trouble. 

0 项奖励
Fengrui
主持人
1,346 次查看

You can enable oneMKL in Configuration Properties -> Intel Performance Libraries.

0 项奖励
回复