I'm trying to distribute some mkl files around for client use. Here's a quick synopsis of the problem.
1 - I have a Intel License Server running on a remote machine.
2 - I have some math libraries which get picked up in a ribbon for use in Excel.
3 - When I distribute the mkl libraries around and a client tries to run function which calls MKL in Excel, it crashes. Using the event logger and other logging tools have proven fruitless.
Things I've tried to resolved the issue.
a - Creating an environment variable on the client machine that either points to a local *.lic file or to the server *.lic file. Both have failed.
b - Install Intel Composer on the client machine. This fixed the problem, but I cannot do this for every client. There must be a way around this. After this worked, I removed all instances of anything related to this installation that I could find. Checked the directory, registry, GAK, ... After doing this, the functionality in Excel still works.
Now I'm trying to figure out what remained so that MKL works correctly. Any insight would be welcome.
Unfortunately this doesn't work.
To ensure we're talking about the same thing. I'm grabbing the necessary DLLs from /Intel/Composer XE 2013 SP1/redist/ia32/mkl/ and including them in my distributable package for my software where ia32 could be intel64 depending on the architecture. The distributed DLLs are listed below. We're calling a couple of matrix functions; LAPACKE_dpotrf, LAPACKE_dpotrs, LAPACKE_dpocon, LAPACKE_dgetri, LAPACK_dgetrf, LAPACKE_dgesv, LAPACKE_dgesvd, and LAPACKE_dgtsv.
x64 - mkl_rt.dll, mkl_avx.dll, mkl_core.dll, mkl_def.dll, mkl_intel_thread.dll
x86 - mkl_rt.dll, mkl_avx.dll, mkl_core.dll, mkl_intel_thread.dll, mkl_p4.dll
Currently we use AMCL for our math calculations and these need to be replaced. I'm still doing the same DllImport in C# with the exceptions being the name of the DLL is changed along with the name of the entry point into the DLL to match the Intel naming. Otherwise everything else remains constant.
[DllImport("mkl_rt.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, SetLastError = false)] public static extern int LAPACKE_dpotrf(int matrixOrder, char uplo, int n, double a, int lda);
So far the clients who install Composer can run the software without exhibiting any problems, even after the deletion of everything mentioned in my first post. Otherwise it fails without logging events being of any aid.
Dependency Walker shows nothing out of the ordinary.
On one of the clients machines I just copied over all the DLLs from /redist/ia32/mkl instead of the select few listed above and it still forces an exit from Excel without logging an event.
One thing that I've found is that MKL appears to be dynamically loading some additional libraries than what you would see using ldd on Linux (I presume this is also true with Dependency Walker on Windows). In particular, I had to redistribute libiomp5.so, which is in /opt/intel/composer_xe_2015.2.164/compiler/lib/intel64. Try including the equivalent Intel OpenMP library on windows.