<?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 Re:error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1262675#M31000</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have not heard back from you, so I will go ahead and close this thread from my end. Feel free to&amp;nbsp;post a new query if you require further assistance from Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 09 Mar 2021 10:01:25 GMT</pubDate>
    <dc:creator>RahulV_intel</dc:creator>
    <dc:date>2021-03-09T10:01:25Z</dc:date>
    <item>
      <title>error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1257771#M30930</link>
      <description>&lt;P&gt;Problem is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lnk2038 happens when I call the functions defined in mkl_spblas.h in Debugx86 and Debug x64 module.&lt;/P&gt;
&lt;PRE class="lang-cpp s-code-block hljs"&gt;&lt;CODE&gt;error LNK2038: mismatch detected &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'_ITERATO R_DEBUG_LEVEL'&lt;/SPAN&gt;: value &lt;SPAN class="hljs-string"&gt;'0'&lt;/SPAN&gt; doesn&lt;SPAN class="hljs-number"&gt;'&lt;/SPAN&gt;t match value &lt;SPAN class="hljs-string"&gt;'2'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE class="lang-cpp s-code-block hljs"&gt;&lt;CODE&gt;error LNK2038: mismatch detected &lt;SPAN class="hljs-keyword"&gt;for&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'RuntimeLibrary'&lt;/SPAN&gt;: value &lt;SPAN class="hljs-string"&gt;'MT_StaticRelease'&lt;/SPAN&gt; doesn&lt;SPAN class="hljs-number"&gt;'&lt;/SPAN&gt;t match value &lt;SPAN class="hljs-string"&gt;'MTd_StaticDebug'&lt;/SPAN&gt; in application.obj &lt;BR /&gt;in file:\mkl_core.lib(_avx512_jit_destroy.obj)&lt;BR /&gt;mkl_core.lib(_avx2_jit_destroy.obj)&lt;BR /&gt;mkl_core.lib(_avx_jit_destroy.obj)&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;run module:&lt;/STRONG&gt;&amp;nbsp;Debugx86 and Debug x64&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;environment:&amp;nbsp;&lt;/STRONG&gt;vs2017 IDE + vs2017(v141) compiler + intelmkl2020.4&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;link libraries list&lt;/STRONG&gt; in &lt;STRONG&gt;x86&lt;/STRONG&gt; is:&amp;nbsp;mkl_intel_c.lib;&amp;nbsp;mkl_sequential.lib;&amp;nbsp;mkl_core.lib&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;link libraries list&lt;/STRONG&gt; in &lt;STRONG&gt;x64&lt;/STRONG&gt; is:&amp;nbsp;mkl_intel_lp64.lib;&amp;nbsp;mkl_sequential.lib; mkl_core.lib&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;code generation set&lt;/STRONG&gt; in C/C++ of configuration: MTd/ MDd..(I have tried all mt/mtd/md/mdd, it doesn't work)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;preprocesser definition&lt;/STRONG&gt;:&amp;nbsp;_DEBUG; _CONSOLE (I also try by adding&amp;nbsp;&lt;SPAN&gt;_ITERATOR_DEBUG_LEVEL=0;&amp;nbsp; it doesn't work)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;However, all the other mkl functions such as "cblas_daxpy" defined in mkl_blas.h work well.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;code sample&lt;/STRONG&gt; is here (I copy this sample from mklroot/example, ps. same error exists when directly debug the file in mklroot/example):&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;complex&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;complex&amp;gt;
#include &amp;lt;cmath&amp;gt;

#include "mkl_spblas.h"

using namespace std;

int main()
{
#define M 5
#define NRHS 2
#define NNZ 13

	double csrVal[NNZ] = { 1.0, -1.0,     -3.0,
							 -2.0,  5.0,
										 4.0, 6.0, 4.0,
							 -4.0,       2.0, 7.0,
									8.0,          -5.0 };
	MKL_INT    csrColInd[NNZ] = { 0,      1,        3,
							  0,      1,
										   2,   3,   4,
							  0,           2,   3,
									  1,             4 };
	MKL_INT    csrRowPtr[M + 1] = { 0, 3, 5, 8, 11, 13 };

	sparse_matrix_t       csrA;

	mkl_sparse_d_create_csr(&amp;amp;csrA, SPARSE_INDEX_BASE_ZERO,
		M,  // number of rows
		M,  // number of cols
		csrRowPtr,
		csrRowPtr + 1,
		csrColInd,
		csrVal);

}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 03:52:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1257771#M30930</guid>
      <dc:creator>ruihuasun</dc:creator>
      <dc:date>2021-02-20T03:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1257801#M30931</link>
      <description>&lt;P&gt;I compiled your example in a 64-bit OneAPI command window (Version 2021.1.2 Build 20201208_000000) using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;icl /MD /traceback /Qmkl rui.cpp&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The program was built with no error messages,&amp;nbsp; and the resulting EXE ran to completion.&lt;/P&gt;
&lt;P&gt;I repeated, using &lt;STRONG&gt;icx&lt;/STRONG&gt; instead of &lt;STRONG&gt;icl&lt;/STRONG&gt;, and the results were the same.&lt;/P&gt;
&lt;P&gt;Conclusion: check your Visual Studio preferences and project settings.&lt;/P&gt;
&lt;P&gt;You wrote: "&lt;SPAN&gt;I have tried all mt/mtd/md/mdd, it doesn't work". Please do not waste time trying arbitrary options.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;On &lt;A href="https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2038?view=msvc-160" target="_self"&gt;this page&lt;/A&gt; the specific error that you reported is documented. I do not recognize the modules that you named "&lt;SPAN&gt;Debugx86 and Debug x64 module". Where did they come from?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 13:04:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1257801#M30931</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2021-02-20T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1259639#M30954</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/141952"&gt;@ruihuasun&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to build/run your code sample using the latest oneAPI release on VS-19. The build was successful. Also, the executable ran without any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you have Parallel studio update-4 in your environment. Could you please try to compile/run your code sample on the command line (by sourcing the PSXE environment) and let us know if it works?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rahul&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 09:40:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1259639#M30954</guid>
      <dc:creator>RahulV_intel</dc:creator>
      <dc:date>2021-02-26T09:40:28Z</dc:date>
    </item>
    <item>
      <title>Re:error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1261757#M30981</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Just a quick reminder to try out your code sample on the command line and let us know if you notice any issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Mar 2021 11:12:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1261757#M30981</guid>
      <dc:creator>RahulV_intel</dc:creator>
      <dc:date>2021-03-05T11:12:08Z</dc:date>
    </item>
    <item>
      <title>Re:error #lnk2038 while running any function defined in mkl_spblas.h      vs2017+intelmkl2020.4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1262675#M31000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have not heard back from you, so I will go ahead and close this thread from my end. Feel free to&amp;nbsp;post a new query if you require further assistance from Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Mar 2021 10:01:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-lnk2038-while-running-any-function-defined-in-mkl-spblas-h/m-p/1262675#M31000</guid>
      <dc:creator>RahulV_intel</dc:creator>
      <dc:date>2021-03-09T10:01:25Z</dc:date>
    </item>
  </channel>
</rss>

