<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Intel MKL 7.0 and Microsoft Excel 2000 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-7-0-and-Microsoft-Excel-2000/m-p/942522#M14586</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;Hello all! &lt;/P&gt;
&lt;P&gt;I should start saying I am a new user of Intel MKL 7.0. &lt;/P&gt;
&lt;P&gt;I am trying to create a dll&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt; (callable from Microsoft Excel 2000) &lt;/FONT&gt;&lt;FONT size="2"&gt;that exports a function called func_pow_MKL. This function makes a call &lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;to &lt;/FONT&gt;&lt;FONT size="2"&gt;one of the functions inside VML library, namely vdPowx.&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt; &lt;P&gt;&lt;/P&gt;
&lt;P&gt;Well, this is the implementation:&lt;/P&gt;
&lt;P&gt;#include "mkl_vml.h"&lt;/P&gt;
&lt;P&gt;double _stdcall func_pow_MKL(double x, double y) {&lt;/P&gt;
&lt;P&gt;double arr1[1];&lt;/P&gt;
&lt;P&gt;double arr2[1];&lt;/P&gt;
&lt;P&gt;arr1[0] = x;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vdPowx(1, arr1, y, arr2); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;return arr2[0];&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;I am using Visual Studio 6.0 on a machine with Windows 2000 operating system.&lt;/P&gt;
&lt;P&gt;The Visual C++ project links to mkl_s.lib library. Also, I have included MKL_VML_STDCALL preprocessor identifier.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;In an Excel Workbook, I have the following function declaration (in the VBA code):&lt;/P&gt;
&lt;P&gt;Public Declare Function func_pow_MKL _&lt;/P&gt;
&lt;P&gt;Lib "MKL_Test.dll" _&lt;/P&gt;
&lt;P&gt;(ByVal x As Double, ByVal y As Double) As Double&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;The problem I have is Excel crashes every time I call func_pow_MKL function. While trying to debug my function I noticed that func_pow_MKL crashes whenever vdPowx(1, arr1, y, arr2); line is executed.&lt;/P&gt;
&lt;P&gt;If I create a Win32 Console application (i.e. a simple exe program) func_pow_MKL works as expected. Also, if I comment vdPowx(1, arr1, y, arr2); line, Excel does not crash.&lt;/P&gt;
&lt;P&gt;Any suggestions in how to use Intel MKL when implementing functions that are going to be used in Microsoft Excel?&lt;/P&gt;
&lt;P&gt;Just in case, I have attached the Excel Workbook "MKL Test Wkbook.xls", as well as the files used in creating my test dll (MKL_TEST.dll). Change cell C6 (from MKL Test Wkbook.xls!Sheet1) to "=func_pow_MKL(C3,C4)" and you will get a beautiful Excel.exe - Application error message box... (before you do that, in the Excel VBA code don't forget to change "C:YourFolderHereMKL_Test.dll" to your proper path)&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Manuel C.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Aug 2004 01:33:42 GMT</pubDate>
    <dc:creator>mciobanu</dc:creator>
    <dc:date>2004-08-26T01:33:42Z</dc:date>
    <item>
      <title>Intel MKL 7.0 and Microsoft Excel 2000</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-7-0-and-Microsoft-Excel-2000/m-p/942522#M14586</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;
&lt;P&gt;Hello all! &lt;/P&gt;
&lt;P&gt;I should start saying I am a new user of Intel MKL 7.0. &lt;/P&gt;
&lt;P&gt;I am trying to create a dll&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt; (callable from Microsoft Excel 2000) &lt;/FONT&gt;&lt;FONT size="2"&gt;that exports a function called func_pow_MKL. This function makes a call &lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;to &lt;/FONT&gt;&lt;FONT size="2"&gt;one of the functions inside VML library, namely vdPowx.&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt; &lt;P&gt;&lt;/P&gt;
&lt;P&gt;Well, this is the implementation:&lt;/P&gt;
&lt;P&gt;#include "mkl_vml.h"&lt;/P&gt;
&lt;P&gt;double _stdcall func_pow_MKL(double x, double y) {&lt;/P&gt;
&lt;P&gt;double arr1[1];&lt;/P&gt;
&lt;P&gt;double arr2[1];&lt;/P&gt;
&lt;P&gt;arr1[0] = x;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;vdPowx(1, arr1, y, arr2); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;return arr2[0];&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;I am using Visual Studio 6.0 on a machine with Windows 2000 operating system.&lt;/P&gt;
&lt;P&gt;The Visual C++ project links to mkl_s.lib library. Also, I have included MKL_VML_STDCALL preprocessor identifier.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;In an Excel Workbook, I have the following function declaration (in the VBA code):&lt;/P&gt;
&lt;P&gt;Public Declare Function func_pow_MKL _&lt;/P&gt;
&lt;P&gt;Lib "MKL_Test.dll" _&lt;/P&gt;
&lt;P&gt;(ByVal x As Double, ByVal y As Double) As Double&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;
&lt;P&gt;The problem I have is Excel crashes every time I call func_pow_MKL function. While trying to debug my function I noticed that func_pow_MKL crashes whenever vdPowx(1, arr1, y, arr2); line is executed.&lt;/P&gt;
&lt;P&gt;If I create a Win32 Console application (i.e. a simple exe program) func_pow_MKL works as expected. Also, if I comment vdPowx(1, arr1, y, arr2); line, Excel does not crash.&lt;/P&gt;
&lt;P&gt;Any suggestions in how to use Intel MKL when implementing functions that are going to be used in Microsoft Excel?&lt;/P&gt;
&lt;P&gt;Just in case, I have attached the Excel Workbook "MKL Test Wkbook.xls", as well as the files used in creating my test dll (MKL_TEST.dll). Change cell C6 (from MKL Test Wkbook.xls!Sheet1) to "=func_pow_MKL(C3,C4)" and you will get a beautiful Excel.exe - Application error message box... (before you do that, in the Excel VBA code don't forget to change "C:YourFolderHereMKL_Test.dll" to your proper path)&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Manuel C.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Aug 2004 01:33:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-7-0-and-Microsoft-Excel-2000/m-p/942522#M14586</guid>
      <dc:creator>mciobanu</dc:creator>
      <dc:date>2004-08-26T01:33:42Z</dc:date>
    </item>
  </channel>
</rss>

