<?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 if you want to link with in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089771#M23165</link>
    <description>&lt;P&gt;if you want to link with ILP64 interfaces, then please don't forget to add &lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13.3333px; line-height: 16px;"&gt;DMKL_ILP64&lt;/SPAN&gt;&amp;nbsp;compiler option. Pls refer to the User's Guide for more details&lt;FONT color="#333333" face="Courier New, Courier, monospace"&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 16px;"&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2016 04:06:43 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2016-08-17T04:06:43Z</dc:date>
    <item>
      <title>Parameter 7 incorrect for cblas_dgemv</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089764#M23158</link>
      <description>&lt;P&gt;I have the following code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	CBLAS_LAYOUT layout = CblasRowMajor;
	CBLAS_TRANSPOSE trans = CblasNoTrans;

	int m = 2;
	int n = 4;
	double a[8] = { 1,2,3,4,5,6,7,8 }; // m * n matrix
	double x[4] = { 1,2,3,4 }; // vector of size n
	double y[2] = { 0,0 }; // vector of size m
	
	double *a_ptr = &amp;amp;a[0];
	double *x_ptr = &amp;amp;x[0];
	double *y_ptr = &amp;amp;y[0];

	cblas_dgemv(layout,	// matrix has row-major layout
		trans,			// should not be transposed
		m,				// has m number of rows
		n,				// n number of columns
		1,				// alpha = 1
		a_ptr,			// pointer to matrix A
		n,				// dimensionality of leading dimension of A (#columns, in this case)
		x_ptr,			// pointer to vector x
		1,				// stride of x
		0,				// beta = 0
		y_ptr,			// pointer to vector y (output will also be placed in y)
		1);				// stride of y&lt;/PRE&gt;

&lt;P&gt;This compiles fine. When running, I get&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;Intel MKL ERROR: Parameter 7 was incorrect on entry to cblas_dgemv&lt;/PRE&gt;

&lt;P&gt;Parameter 7 is the lda, which I set to be n, the nr of columns since I use row-major layout. According to the documentation and this post:&amp;nbsp;&lt;A href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/501513"&gt;https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/501513&lt;/A&gt;&amp;nbsp;this should be correct.&lt;/P&gt;

&lt;P&gt;So, why is it giving me this error?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 16:15:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089764#M23158</guid>
      <dc:creator>Lavrijsen__Matthijs</dc:creator>
      <dc:date>2016-08-08T16:15:45Z</dc:date>
    </item>
    <item>
      <title>Please provide details of how</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089765#M23159</link>
      <description>&lt;P&gt;Please provide details of how you compiled and linked the program -- OS, target 32 or 64 bit, compiler options, how MKL was linked into, etc.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 16:46:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089765#M23159</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-08-08T16:46:17Z</dc:date>
    </item>
    <item>
      <title>Hi Mecej,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089766#M23160</link>
      <description>&lt;P&gt;Hi Mecej,&lt;/P&gt;

&lt;P&gt;Answering for Matthijs S, the platform is Windows 7&amp;nbsp;using MSVC 2015 (19.00.23918) in x64&amp;nbsp;release mode. Statically linked.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 13:22:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089766#M23160</guid>
      <dc:creator>Dennis_F_2</dc:creator>
      <dc:date>2016-08-15T13:22:50Z</dc:date>
    </item>
    <item>
      <title>One of the questions implied</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089767#M23161</link>
      <description>&lt;P&gt;One of the questions implied by Sham is whether you might have linked the ilp64 MKL libraries (which require int64_t), seeing that your code uses 32-bit integer arguments.&amp;nbsp; The question would be answered by showing your build log.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 06:11:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089767#M23161</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-08-16T06:11:12Z</dc:date>
    </item>
    <item>
      <title>Thanks. We're indeed linking</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089768#M23162</link>
      <description>&lt;P&gt;Thanks. We're indeed linking to ilp64. Here are relevant CMake lines:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;find_library(mkl_intel_ilp64 "mkl_intel_ilp64.lib" PATHS "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64")
find_library(mkl_core "mkl_core.lib" PATHS "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64")
find_library(mkl_sequential "mkl_sequential.lib" PATHS "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64")

target_link_libraries(our_lib ${mkl_intel_ilp64})
target_link_libraries(our_lib ${mkl_core})
target_link_libraries(our_lib ${mkl_sequential})&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Based on your comment, I changed line 4 and 5 in the code from the first post to int64_t. Still the same error.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;EDIT: we're currently building in Debug mode. Not sure whether that's relevant.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 08:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089768#M23162</guid>
      <dc:creator>Lavrijsen__Matthijs</dc:creator>
      <dc:date>2016-08-16T08:55:00Z</dc:date>
    </item>
    <item>
      <title>Sorry, I meant to point out</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089769#M23163</link>
      <description>&lt;P&gt;Sorry, I meant to point out that for plain int arguments you would link the lp64 libraries, which are the ones you get with the -Qmkl options.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 11:20:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089769#M23163</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-08-16T11:20:20Z</dc:date>
    </item>
    <item>
      <title>Sorry, not sure I follow:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089770#M23164</link>
      <description>&lt;P&gt;Sorry, not sure I follow:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;"you would link the lp64 libraries." Do you agree that we're linking to these libraries with the above CMake lines, or is that not sufficient?&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;"For plain int arguments". I used plain int arguments in my original code, with the same CMake setup -- i.e. linking to ilp64, unless point 1 is incorrect. This didn't work. Then I switched to int64_t, which also did not work.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;So -- if the CMake setup should indeed be sufficient for linking to the ilp64 libraries -- I'm not sure what to do differently.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 12:53:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089770#M23164</guid>
      <dc:creator>Lavrijsen__Matthijs</dc:creator>
      <dc:date>2016-08-16T12:53:10Z</dc:date>
    </item>
    <item>
      <title>if you want to link with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089771#M23165</link>
      <description>&lt;P&gt;if you want to link with ILP64 interfaces, then please don't forget to add &lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: rgb(51, 51, 51); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13.3333px; line-height: 16px;"&gt;DMKL_ILP64&lt;/SPAN&gt;&amp;nbsp;compiler option. Pls refer to the User's Guide for more details&lt;FONT color="#333333" face="Courier New, Courier, monospace"&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 16px;"&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 04:06:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089771#M23165</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2016-08-17T04:06:43Z</dc:date>
    </item>
    <item>
      <title>Thanks Gennady, that works!</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089772#M23166</link>
      <description>&lt;P&gt;Thanks Gennady, that works!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 13:37:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Parameter-7-incorrect-for-cblas-dgemv/m-p/1089772#M23166</guid>
      <dc:creator>Lavrijsen__Matthijs</dc:creator>
      <dc:date>2016-08-17T13:37:18Z</dc:date>
    </item>
  </channel>
</rss>

