<?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:Linking with MIGW g++ in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1240109#M30573</link>
    <description>&lt;P&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Dec 2020 08:02:11 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2020-12-23T08:02:11Z</dc:date>
    <item>
      <title>Linking with MIGW g++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1230663#M30381</link>
      <description>&lt;P&gt;I am using MingW 8.1.0 g++ to compile a program and link MKL libraries. My platform is Windows 10 with INTEL MKL 2020.0&lt;/P&gt;&lt;P&gt;Using the linker advisor I use the following Makefile:&lt;/P&gt;&lt;P&gt;CXX=g++&lt;BR /&gt;CXXFLAGS=-O4 -march=native -fopenmp-simd -fopenmp -fopt-info-vec=report.rpt -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -L/C/Program\ Files\ \(x86\)\/IntelSWTools/compilers_and_libraries_2020.4.311/windows/mkl/lib/intel64_win -lm -Wl,--no-as-needed -I/C/Program\ Files\ \(x86\)\/IntelSWTools/compilers_and_libraries_2020.4.311/windows/mkl/include -std=c++11&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;default : app.exe&lt;/P&gt;&lt;P&gt;worker.o : worker.cc&lt;BR /&gt;${CXX} -c ${CXXFLAGS} -o "$@" "$&amp;lt;"&lt;/P&gt;&lt;P&gt;app.exe : main.cc worker.o&lt;BR /&gt;${CXX} ${CXXFLAGS} -o "$@" "$&amp;lt;" worker.o&lt;/P&gt;&lt;P&gt;clean :&lt;BR /&gt;rm app.exe worker.o *.optrpt&lt;/P&gt;&lt;P&gt;And get the following result:&lt;/P&gt;&lt;P&gt;$ mingw32-make -B&lt;BR /&gt;g++ -c -O4 -march=skylake -fopenmp-simd -fopenmp -fopt-info-vec=report.rpt -lmkl&lt;BR /&gt;_intel_lp64 -lmkl_core -lmkl_sequential -L/C/Program\ Files\ \(x86\)\/IntelSWToo&lt;BR /&gt;ls/compilers_and_libraries_2020.4.311/windows/mkl/lib/intel64_win -lm -Wl,--no-a&lt;BR /&gt;s-needed -I/C/Program\ Files\ \(x86\)\/IntelSWTools/compilers_and_libraries_2020&lt;BR /&gt;.4.311/windows/mkl/include -std=c++11 -o "worker.o" "worker.cc"&lt;BR /&gt;g++ -O4 -march=skylake -fopenmp-simd -fopenmp -fopt-info-vec=report.rpt -lmkl_in&lt;BR /&gt;tel_lp64 -lmkl_core -lmkl_sequential -L/C/Program\ Files\ \(x86\)\/IntelSWTools/&lt;BR /&gt;compilers_and_libraries_2020.4.311/windows/mkl/lib/intel64_win -lm -Wl,--no-as-n&lt;BR /&gt;eeded -I/C/Program\ Files\ \(x86\)\/IntelSWTools/compilers_and_libraries_2020.4.&lt;BR /&gt;311/windows/mkl/include -std=c++11 -o "app.exe" "main.cc" worker.o&lt;BR /&gt;main.cc: In function 'int main(int, char**)':&lt;BR /&gt;main.cc:36:55: warning: integer overflow in expression of type 'long int' result&lt;BR /&gt;s in '0' [-Woverflow]&lt;BR /&gt;float *data = (float *) malloc((long)sizeof(float)*n*m);&lt;BR /&gt;~~~~~~~~~~~~~~~~~~~~~^~&lt;BR /&gt;C:\Users\RAULRA~1\AppData\Local\Temp\ccgFLrvQ.o:main.cc:(.text+0x6d): undefined&lt;BR /&gt;reference to `vsRngUniform'&lt;BR /&gt;C:\Users\RAULRA~1\AppData\Local\Temp\ccgFLrvQ.o:main.cc:(.text.startup+0x83): un&lt;BR /&gt;defined reference to `vslNewStream'&lt;BR /&gt;collect2.exe: error: ld returned 1 exit status&lt;BR /&gt;mingw32-make: *** [Makefile:12: app.exe] Error 1&lt;/P&gt;&lt;P&gt;What library am I missing? INTEL documentation states that both vdRngUniform and vslNewStream are MKL libraries.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Raul Ramirez-Velarde&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 04:21:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1230663#M30381</guid>
      <dc:creator>Raul-Ramirez-Velarde</dc:creator>
      <dc:date>2020-11-23T04:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Linking with MIGW g++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1230692#M30382</link>
      <description>&lt;P&gt;yes, &lt;SPAN&gt;vdRngUniform and vslNewStream are from MKL libraries and yes dynamically linking against these shared libs -lmkl_intel_lp64 -lmkl_core -lmkl_sequential is the correct way to link, but I am not sure how it could be linked under the MING g++ environment. You may try to check the build on any other Linus OS-based systems and apply the MKL &lt;A href="https://software.intel.com/content/www/us/en/develop/articles/intel-mkl-link-line-advisor.html" target="_self"&gt;Linkier Adviser&lt;/A&gt; or &lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mkl-linux-developer-guide/top/linking-your-application-with-the-intel-math-kernel-library/linking-examples/linking-on-intel-64-architecture-systems.html" target="_self"&gt;Dev Guide&lt;/A&gt; recommendations.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 06:22:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1230692#M30382</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-23T06:22:52Z</dc:date>
    </item>
    <item>
      <title>Re:Linking with MIGW g++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1240109#M30573</link>
      <description>&lt;P&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2020 08:02:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Linking-with-MIGW-g/m-p/1240109#M30573</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-12-23T08:02:11Z</dc:date>
    </item>
  </channel>
</rss>

