Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

How to write ILP64-version vdRngUniform? (Namely, very long random number array)

$
0
0
......
MKL_LONG status;
VSLStreamStatePtr stream;
......
int main(){
vslNewStream(&stream, VSL_BRNG_SFMT19937, 777);
rnd_data = (double*)malloc(total * sizeof(double));
status = vdRngUniform(VSL_RNG_METHOD_UNIFORM_STD, stream, total, rnd_data, 0.0, 1.0);
vslDeleteStream(&stream);
......
}

The above quite standard c++ VSL code gives 'MKL ERROR: Parameter 3 was incorrect on entry to vdRngUniform' once the variable 'total' is large than 2^32-1. I'm trying to write a ILP64 version to overcome this. In so far as I've tried, by referring to MKL manual https://software.intel.com/sites/products/documentation/hpc/mkl/lin/MKL_UG_structure/Support_for_ILP64_Programming.htm, the error remained all along. I tried using compilation command 'icpc -DMKL_ILP64 -mkl a.cpp' and defining variable 'total' as MKL_INT type. I'm using some 64-bit linux machine.

Could you kindly help me on this? Thanks in advance!

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>