Invalid Memory Access with MKL Random Number Generation functions

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:

Write (Read):
vdRngGamma(0, mktStream, numScenOneBlk, tmpSt, 1.0, 0.0, 1.0);

Allocation Site:
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,
Dmitry

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.