<?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 the -mveclibabi=svml  in gcc in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818446#M4491</link>
    <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I don`t see any calls to MKL in your source. So, you should be able to build executable by run followinc command:&lt;BR /&gt;gccvec_example.c -O2 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml&lt;BR /&gt;Is it true?</description>
    <pubDate>Wed, 05 Oct 2011 12:56:15 GMT</pubDate>
    <dc:creator>Andrey_G_Intel2</dc:creator>
    <dc:date>2011-10-05T12:56:15Z</dc:date>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818443#M4488</link>
      <description>Consider some very simple c program, vec_example.c:&lt;BR /&gt;"&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#define N 16&lt;BR /&gt;&lt;BR /&gt;double in&lt;N&gt; = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0,&lt;BR /&gt;11.0, 12.0, 13.0, 14.0, 15.0, 16.0 };&lt;BR /&gt;double out&lt;N&gt;;&lt;BR /&gt;&lt;BR /&gt;int main ()&lt;BR /&gt;{&lt;BR /&gt; int i;&lt;BR /&gt;&lt;BR /&gt; for (i = 0; i &amp;lt; N; i++)&lt;BR /&gt; out&lt;I&gt; = exp (in&lt;I&gt;);&lt;BR /&gt;&lt;BR /&gt; for (i = 0; i &amp;lt; N; i++)&lt;BR /&gt; printf ("%f\\n", out&lt;I&gt;);&lt;BR /&gt;&lt;BR /&gt; return 0;&lt;BR /&gt;} &lt;BR /&gt;"&lt;BR /&gt;Now, suppose we want to compile using gcc (4.5.0 from MinGW on Windows XP) and use Intel MKL for SSE instructions of the "exp":&lt;BR /&gt;"&lt;BR /&gt;gcc -c vec_example.c -O2 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml&lt;BR /&gt;"&lt;BR /&gt;That works. Problems come with linking:&lt;BR /&gt;gcc vec_example.o -o vec_example "-LC:\\Program Files\\Intel\\Composer XE 2011 SP1\\mkl\\lib"&lt;BR /&gt;or with&lt;BR /&gt;gcc vec_example.o -o vec_example "-LC:\\Program Files\\Intel\\Composer XE 2011 SP1\\mkl\\lib\\ia32"&lt;BR /&gt;(The latter directory has the mkl_*.lib and mkl_*_dll.lib files)&lt;BR /&gt;Both give the same error message:&lt;BR /&gt;"&lt;BR /&gt;vec_example.o:vec_example.c:(.text+0x1d): undefined reference to `vmldExp2'&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;"&lt;BR /&gt;How should I fix this?&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/N&gt;&lt;/N&gt;&lt;/STDIO.H&gt;&lt;/MATH.H&gt;</description>
      <pubDate>Wed, 05 Oct 2011 09:56:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818443#M4488</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T09:56:36Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818444#M4489</link>
      <description>&lt;SPAN class="sectionBodyText" style="font-family: Arial; font-size: small;"&gt;&lt;SPAN class="sectionBodyText" style="font-family: Arial; font-size: small;"&gt;&lt;P align="left" class="sectionBody"&gt;"Short Vector Math Library" (SVML)is a part ofthe Intel compiler &lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;but not MKL.&lt;BR /&gt;So, please try additionally link with svml_disp*.lib (e.g. svml_dispmt.lib) where symbol `vmldExp2' is defined.&lt;BR /&gt;&lt;BR /&gt;The Intel compiler has intrinsic names for the SVML functions in the header file ia32intrin.h</description>
      <pubDate>Wed, 05 Oct 2011 11:21:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818444#M4489</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2011-10-05T11:21:18Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818445#M4490</link>
      <description>Thanks. So I added svml_dispmt.lib to this directory "C:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\ia32" and then linked using this line:&lt;BR /&gt;gcc vec_example.o -o vec_example "-LC:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\ia32" "-IC:\Program Files\Intel\Composer XE 2011 SP1\mkl\include" -lsvml_dispmt&lt;BR /&gt;&lt;BR /&gt;However, that gave many error messages like this one:&lt;BR /&gt;"&lt;BR /&gt;C:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\ia32/svml_dispmt.lib(D:/users/nbtester/x86win_nightly/branch-12_1/20110812_000000/dev/build_objs/qax86win&lt;BR /&gt;_d0p0flexlm/libobj/svml/staticmt/svml_dsincos2_la_maskiface.obj):(.text[___svml_sincos2_mask]+0x21): undefined reference to `__intel_cpu_indicator_init'&lt;BR /&gt;"&lt;BR /&gt;Any clue?&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Oct 2011 12:39:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818445#M4490</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T12:39:33Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818446#M4491</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I don`t see any calls to MKL in your source. So, you should be able to build executable by run followinc command:&lt;BR /&gt;gccvec_example.c -O2 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml&lt;BR /&gt;Is it true?</description>
      <pubDate>Wed, 05 Oct 2011 12:56:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818446#M4491</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2011-10-05T12:56:15Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818447#M4492</link>
      <description>I have doubts as to whether this gcc svml option was ever implemented in MinGW. The Windows ICL libraries weren't set up with any requirement for gcc compatibility.&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Oct 2011 13:28:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818447#M4492</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-10-05T13:28:12Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818448#M4493</link>
      <description>Sorry, I was thinking that the "-mveclibabi=svml" at compilation would translate the "exp" from math.h to&lt;BR /&gt;a vectorized call to the Intel mkl sse instruction set, after proper linking.&lt;BR /&gt;So I was thinking that no explicit calls to mkl were needed in the code.&lt;BR /&gt;Is that not so?&lt;BR /&gt;&lt;BR /&gt;Anyway, &lt;BR /&gt;gcc vec_example.c -O2 -msse2 -ffast-math -ftree-vectorize -mveclibabi=svml&lt;BR /&gt;gives&lt;BR /&gt;"&lt;BR /&gt;C:\DOCUME~1\H44B3~1.SPR\LOCALS~1\Temp\cc65Yp4X.o:vec_example.c:(.text+0x1d): undefined reference to `vmldExp2'&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;"&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Oct 2011 13:28:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818448#M4493</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T13:28:44Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818449#M4494</link>
      <description>I should have added that I also got multiple times this warning:&lt;BR /&gt;"&lt;BR /&gt;Warning: .drectve `-defaultlib:"libirc" ' unrecognized&lt;BR /&gt;"</description>
      <pubDate>Wed, 05 Oct 2011 13:43:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818449#M4494</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T13:43:19Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818450#M4495</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;&amp;gt;&amp;gt; &lt;B&gt;So I added svml_dispmt.lib to this directory "C:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\ia32"&lt;/B&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;You need to add the following path"C:\Program Files\Intel\Composer XE 2011 SP1\&lt;B&gt;compiler\lib\ia32\&lt;/B&gt;" where you can find all svml libs.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;--Gennady&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Oct 2011 13:47:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818450#M4495</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2011-10-05T13:47:51Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818451#M4496</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1317822440290="53" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=531823" href="https://community.intel.com/en-us/profile/531823/" class="basic"&gt;L. Ploeger&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;Sorry, I was thinking that the "-mveclibabi=svml" at compilation would translate the "exp" from math.h to&lt;BR /&gt;a vectorized call to the Intel mkl sse instruction set, after proper linking.&lt;BR /&gt;So I was thinking that no explicit calls to mkl were needed in the code.&lt;BR /&gt;Is that not so?&lt;BR /&gt;"&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;No, that GCC option tells GCC to use svml library in vectorizer.&lt;BR /&gt;If you want to use exp from MKL, you need to call it manually. You need to read "Vector Mathematical Functions" chapter from Intel Math Kernel Library Reference Manual (&lt;A href="http://software.intel.com/sites/products/documentation/hpc/mkl/updates/10.3.5/mklman/index.htm"&gt;http://software.intel.com/sites/products/documentation/hpc/mkl/updates/10.3.5/mklman/index.htm&lt;/A&gt;).&lt;BR /&gt;&lt;BR /&gt;Andrey&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2011 13:52:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818451#M4496</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2011-10-05T13:52:12Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818452#M4497</link>
      <description>I don't understand what you mean, I linked to that directory:&lt;BR /&gt;"-LC:\Program Files\Intel\Composer XE 2011 SP1\mkl\lib\ia32"&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Oct 2011 15:00:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818452#M4497</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T15:00:23Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818453#M4498</link>
      <description>Ok, but would that make any difference with respect to speed, direct linking to mkl or using the vml library as a vectorizer?</description>
      <pubDate>Wed, 05 Oct 2011 15:17:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818453#M4498</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-05T15:17:52Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818454#M4499</link>
      <description>If you have the Intel compiler installed, it's difficult to see why you are attempting to link against the Intel libraries in MinGW.&lt;BR /&gt;My expectation would be that SVML would give you good vector speedup on shorter loops, beginning around a loop count of 50, while VML should be faster on longer loops, perhaps upwards of 1000, until you reach a length where the memory system limits performance, and then the SVML may be faster again if your exp is embedded in a loop with other calculations, taking advantage of cache locality. So, if you really want to know, or don't want to divulge sufficient data, you'll need to test it yourself.</description>
      <pubDate>Wed, 05 Oct 2011 15:52:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818454#M4499</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-10-05T15:52:10Z</dc:date>
    </item>
    <item>
      <title>the -mveclibabi=svml  in gcc</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818455#M4500</link>
      <description>&lt;B&gt;It works now&lt;/B&gt;. libirc.lib should be linked against, too.&lt;BR /&gt;So, to summarize:&lt;BR /&gt;gcc -c vec_example.c -O2 -msse2 -ffast-math -ftree-vectorize 
-mveclibabi=svml&lt;BR /&gt;&lt;BR /&gt;gcc vec_example.o "-LC:\Program Files\Intel\Composer XE\compiler\lib\ia32" -lsvml_dispmt 
-llibirc&lt;BR /&gt;&lt;BR /&gt;---&amp;gt; a.exe&lt;BR /&gt;&lt;BR /&gt;Warning: .drectve `-defaultlib:"libirc" ' unrecognized&lt;BR /&gt;&lt;BR /&gt;remains.</description>
      <pubDate>Thu, 06 Oct 2011 11:42:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/the-mveclibabi-svml-in-gcc/m-p/818455#M4500</guid>
      <dc:creator>ploeger__lennert</dc:creator>
      <dc:date>2011-10-06T11:42:07Z</dc:date>
    </item>
  </channel>
</rss>

