- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
by default vslSkipAheadStream takes int as argument for how far to skip ahead, no surprice, this int will overflow quickly in a typical simulation (a negative argument makes vslSkipAheadStream hang running full speed)
ok so I compile with -DMKL_ILP64 to make all ints long, then vdRngGaussian will not work.
MKL ERROR : Parameter 2 was incorrect on entry to vdRngGaussia
entire code is
double qq[20];
VSLStreamStatePtr stream,;
vslNewStream( &stream, VSL_BRNG_MCG31, 1 );
vdRngGaussian( VSL_METHOD_DGAUSSIAN_ICDF,stream, 20, qq, 0.0f, 1.0f );
I cannot see how to solve this, either argument to vslSkipAheadStream will not work, for skipping ahead too far, or vdRngGaussian gives this message. so help....
by the way vslSkipAheadStream should take long, not int as argument by default.
ok so I compile with -DMKL_ILP64 to make all ints long, then vdRngGaussian will not work.
MKL ERROR : Parameter 2 was incorrect on entry to vdRngGaussia
entire code is
double qq[20];
VSLStreamStatePtr stream,;
vslNewStream( &stream, VSL_BRNG_MCG31, 1 );
vdRngGaussian( VSL_METHOD_DGAUSSIAN_ICDF,stream, 20, qq, 0.0f, 1.0f );
I cannot see how to solve this, either argument to vslSkipAheadStream will not work, for skipping ahead too far, or vdRngGaussian gives this message. so help....
by the way vslSkipAheadStream should take long, not int as argument by default.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doesn't your MKL ILP64 installation /include directory have include files with prototypes to promote your arguments? If you don't have a prototype in scope, you will have to be careful about your arguments, using e.g. 20L, qq, 0.0, 1.0 I doubt any MKL function would take a mixture of float and double arguments, such as you quote.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
true, but this is not the problem, the second argument, the one it complains about is VSLStreamStatePtr, and this only arises when I compile with -DMKL_ILP64.
true, the float should not have been there, the prototype is
mkl_vsl_functions.h:_Vsl_Api(int,vdRngGaussian,(MKL_INT , VSLStreamStatePtr , MKL_INT , double [], double , double ))
but it happily look it as quoted, and it maked no difference to output.
e.g. following code
double qq[2];
MKL_INT NN=2,i1=0,i2=1.0;
VSLStreamStatePtr stream;
vslNewStream( &stream, VSL_BRNG_MCG31, 1 );
vdRngGaussian( VSL_METHOD_DGAUSSIAN_ICDF,stream, NN, qq, i1, i2 );
for (int i=0;i
will give
Dina ~/temp/t >./sim
0 -6.12076
1 0.0686268
but when compiled with -DMKL_ILP64
Dina ~/temp/t >./sim MKL ERROR : Parameter 2 was incorrect on entry to vdRngGaussia
0 -3.26076e-232
1 -3.30687e-232
true, the float should not have been there, the prototype is
mkl_vsl_functions.h:_Vsl_Api(int,vdRngGaussian,(MKL_INT , VSLStreamStatePtr , MKL_INT , double [], double , double ))
but it happily look it as quoted, and it maked no difference to output.
e.g. following code
double qq[2];
MKL_INT NN=2,i1=0,i2=1.0;
VSLStreamStatePtr stream;
vslNewStream( &stream, VSL_BRNG_MCG31, 1 );
vdRngGaussian( VSL_METHOD_DGAUSSIAN_ICDF,stream, NN, qq, i1, i2 );
for (int i=0;i
will give
Dina ~/temp/t >./sim
0 -6.12076
1 0.0686268
but when compiled with -DMKL_ILP64
Dina ~/temp/t >./sim MKL ERROR : Parameter 2 was incorrect on entry to vdRngGaussia
0 -3.26076e-232
1 -3.30687e-232
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using -DMKL_ILP64 please link your application to the suitable library locatedin the lib_ilp64 sub-directory of MKL folder (for example,..lib_ilp64em64tlibmkl_em64t.lib). Please, let us know how it works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that is what the manual says, but but the ilp libs are not included in the mac version I have, under /Library/Frameworks/Intel_MKL.framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ILP64 support for MAC starts from MKL 10 Beta. As temporary work around you may want to replace one call to SkipAhead with 64-bit nskip parameter with sequence of calls to the same routine with proper 32-bit value of nskip. For generators like MCG31 32-bit version of SkipAheadwould be enough.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page