07-04-2007 01:41 PM
Hi,
I have created a DLL in Visual Studio 2005 which uses functions from the Intel Math Kernel Library (MKL) v9.0. The DLL works perfectly when I run it in VS 2005, but when I use it in the LabVIEW environment, I receive the error 1097 [An exception occurred within the external code called by a Call Library Function Node.].
It seems that the VML function vdPowX(), which raises each element of a vector
to the constant power, creates an access violation reading at location 0x00000000.
Unhandled exception at 0x0652d545 (OptimisationDLL_Intel.dll) in LabVIEW.exe: 0xC0000005: Access violation reading location 0x00000000.
When I trace it with VS2005, it seems to read at 0x00 when they check for the mode of the function (HA or LA) to see if the function will uses High Accuracy or Low Accuracy. You can reproduce the bug by simply trying to read the Mode with the Intel Function vmlGetMode().
I'm not sure why I only get the crash in LabVIEW and not in VS2005. The other function from the MKL that I use, daSum(), works correctly in VS2005 and LabVIEW. It doesn't have an accuracy mode since it's not in the VML family, that's probably why.
I've included the source code in C that causes the crash when the DLL is used in LabVIEW (Corellation_Intel.c).
When you attach the LabVIEW process to Visual Studio Debug mode, the execution stops at eax,dword ptr [edx+ecx*4]:
_mkl_vml_core_w7_vml_GetMode:
023D528C mov ecx,dword ptr [__tls_index (240EA0Ch)]
023D5292 mov edx,dword ptr fs:[2Ch]
023D5299 mov eax,dword ptr [edx+ecx*4]
Anyone had this kind of error or have any idea what I might have done wrong? I uses mkl_c.lib and libguide.lib libraries in the i32 of Intel MKL.
Thanks a lot for your help and feel free to contact me if you need more information.
Regards,
Mat
07-04-2007 01:50 PM
07-12-2007 03:00 PM
Hi, Mat,
Could you please provide more information about your problem? If possible, could you please attach your VI? Thanks!
09-21-2007 02:46 AM
09-21-2007 03:21 AM
For the most effective communication on MKL related issues I encourage you to go directly to one of the following links:
Other Intel MKL Support Resources http://www3.intel.com/cd/software/products/asmo-na/eng/345618.htm