- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've got academic license for MKL, but we produce also commercial software in witch I would like to use MKL (only Redistributions). Can I use it free or must pay for additional license? If the last, can I buy only Redistributions, cause I don't need your compilers (I use Delphi)?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey, in this case you have to purchase the commercial license. I will joint you with our business development manager via separate email to give your some steps you need to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I know this is out of the post’s scope but I noticed you (the original poster) are using Delphi. I’ve been trying to link a simple console application to the MKL SDL but I haven’t managed to succeed yet (I’m not an expert on Delphi). Anyway, I’m trying to use MKL PARDISO but I don’t get any results, the output vector is not modified after calling the function. In my limited experience, I believe there must be a problem in the way I’m loading the function from the SDL. Below I have included the code I’m using to declare the function and also part of the console application code (I’ve left a lot of stuff out just to save space). In this example if I don’t initialize “x”, I get all zeros but if I do, the vector is not changed. Any help will be much appreciated (sorry to post this here but other delphi related posts are over 5 years old and I don't know if it's worth to create a new post just for this).
unit IntelMKL; interface uses Windows, Wintypes, WinProcs, SysUtils, Classes; function PARDISO(var pt:array of Pointer; var maxfct, mnum, mtype, phase, n:Integer; var a:array of Double; var ia,ja:array of Integer; var perm, nrhs:Integer; var iparm:array of Integer; var msglvl:Integer; var b: Array of Double; var x: Array of Double; var error:Integer): Pointer; stdcall; external 'mkl_rt.dll' name 'PARDISO'; function MKL_Set_Num_Threads_Local(nt: Integer): Integer; stdcall; external 'mkl_rt.dll' name 'MKL_Set_Num_Threads_Local'; function MKL_Set_Num_Threads(nt: Integer): Pointer; stdcall; external 'mkl_rt.dll' name 'MKL_Set_Num_Threads'; function MKL_Set_Dynamic(nt: Integer): Pointer; stdcall; external 'mkl_rt.dll' name 'MKL_Set_Dynamic'; implementation end.
var a,b,x,ddum: array of Double; ia,ja,iparm: array of Integer; pt : array of Pointer; n, mtype, nrhs, maxfct, mnum, phase, error, msglvl, idum, i, nthreads, dynthreads: Integer; begin setLength(a,18); setLength(ja,18); setLength(ia,9); setLength(b,8); setLength(x,8); setLength(ddum,1); setLength(pt,64); setLength(iparm,64); phase := 13; PARDISO(pt, maxfct, mnum, mtype, phase, n, a, ia, ja, idum, nrhs, iparm, msglvl, b, x, error); for i := 1 to n do Writeln('x['+IntToStr(i-1)+'] ='+FloatToStr(x[i-1])); end
Regards
Gerardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I have used only simple LAPACK functions of 1-3 level. All of them work fine exclude ones with wml extension (now I try to solve the problem). If you are interested in this point I can send you some examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be nice if you could send me your examples. I've been trying other stuff, like defining all function parameters as pointers (I saw someone do it in an example) but haven't made any progress. Thanks in advance for your help!
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not earlier then on Tuesday (little vacation).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure, no problem! Enjoy your vacation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
//If You need more examples, please let me now. unit MKL1; interface const IntelDLL = 'mkl_intel_thread.DLL' ; procedure saxpy(var n:int64; var alpha:single; var x:single; var incx:int64; var y:single; var incy:int64); CDecl ; implementation procedure saxpy ; CDecl ; external IntelDLL name 'mkl_blas_saxpy' ; //Test: multiplication of array by 10. // Tested for 64-bit applications; // for 32-bit's you should somewhere use "integer" type instead of "int64" (change if doesn't work). // For both it's possible to use conditional compilation with symbol "win64" var i,N,incx:int64; X:single; A,Y:array[1..100] of single; begin N:=100; incx:=1; for i:=1 to N do A:=i; X:=10; saxpy(N,X,A[1],incx,Y[1],incx); end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the example! I managed to make mine work based on yours. Thanks again, you are a real lifesaver.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm very glad to help you :)
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page