Changed to 64-bit, now my app crashes

Changed to 64-bit, now my app crashes

I am using MKL in a C# program. I previously was using the 32-bit dlls but have changed to 64-bit and now my application will not run. I need assistance in setting up Visual Studio to correctly link and build so that the application can be run on a PC with no MKL installation. This software is built via a central server for distribution. I need to use the VS compiler as this is a highly Microsoft-heavy program, which is how it was done up until now.

I've read through a lot of the articles and forums looking for the correct method of setting this up. I have version 10.3.8 I've identified the dlls that I need and have them in the same directory as my executable as well as added to the project. I created a wrapper project for the MKL functions that I needed and created a custom dll for them. That dll is included as a reference in the project. It compiles successfully but when run, it crashes when a call is made to an MKL function. The crash indicates that it cannot find the file mkl_rt.dll. The project includes mkl_rt.dll, and it's located in the same directory as the executable. I've also tried putting the dll's into the PATH variable on the PC. 

I only need BLAS, VSL and FFTs. 

Please assist with clear instructions on how to properly set VS up to get this back into a production build. Thank you.

Janene Pappas-McCrillis

jmccrillis@wirelessseismic.com

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Regardless of whether you use Microsoft or other compilers, you must change your entire project explicitly to an X64 project, using the X64 version of the compiler, to support linking against 64-bit .dlls. Guessing that you are building in VS, you would set the X64 property and rebuild.
The link advisor application will give you the MKL library dependencies for X64 static link:
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

If you did not change your int data types from 32-bit mode, you would select the LP64 (32-bit ints) option.

Thank you for responding, Tim.

I'm confused by the link advisor's output, referring to .lib files. This is a C# program, not C++, I cannot use .lib files. I thought the mkl_rt.dll removed the need to create a separate dll?

Janene

The Link Line Advisor gives you options and a list of libraries that you are to use to compile and build your custom DLL. It has no direct relation to compiling and running C# code.

Once the custom DLL is built, when you compile your C# program you use that custom DLL to resolve references in the C# code to symbols in the custom DLL.

There are some earlier articles (for example, http://software.intel.com/en-us/articles/using-intel-mkl-in-your-c-program ) that may be of help to you.

Connectez-vous pour laisser un commentaire.