Invalid Memory Access with MKL Random Number Generation functions
Even though the code seems to be working fine, Intel Inspector 2017 (build 510645) reports two problems: Invalid Memory Access and Invalid Partial Memory Access for the following lines:
vdRngGamma(0, mktStream, numScenOneBlk, tmpSt, 1.0, 0.0, 1.0);
double *tmpSt = new double[numScenOneBlk];
For the Invalid Memory Access problem it shows "Write" for vdRngGamma function and for the Invalid Partial Memory Access it shows "Read". I have another array in this code defined and used in exactly the same way with the only difference that its size is hard coded, whereas numScenOneBlk is a pass by reference parameter.
Is it a bug in Intel Inspector or am I doing something wrong?
Thanks in advance,