<?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 link to fortran function in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787741#M1970</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a function implemented in e.g. myfunc.f and this implementation invokes lapack functions e.g. DGEQRF, how can I ensure that the linking is done with MKL? &lt;BR /&gt;&lt;BR /&gt;My ultimate goal is to reuse some fortran functions (QR update) from C and that all the invokations they do to e.g. LAPACK end up hitting MKL.&lt;BR /&gt;&lt;BR /&gt;I am using cmake and this is what I do but I am not sure it is actually linking to MKL ... can anyone please confirm this is all I need to do to ensure that these fortran utilities are linked to MKL?&lt;BR /&gt;&lt;BR /&gt;# &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; begin snippet CMakeLists.txt&lt;BR /&gt;&lt;BR /&gt;set(HAVE_INTEL_MKL ${MKL_FOUND})&lt;BR /&gt;if (MKL_FOUND)&lt;BR /&gt; include_directories(${MKL_INCLUDE_DIRS})&lt;BR /&gt; link_directories(${MKL_LIBRARY_DIRS})&lt;BR /&gt;endif()&lt;BR /&gt;&lt;BR /&gt;add_library(qr_updates&lt;BR /&gt; src/addcols.f&lt;BR /&gt; src/addcolsq.f&lt;BR /&gt; src/delcols.f&lt;BR /&gt; src/delcolsq.f&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;if (MKL_FOUND)&lt;BR /&gt; target_link_libraries(qr_updates ${MKL_LIBRARIES})&lt;BR /&gt;endif()&lt;BR /&gt;&lt;BR /&gt;# &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; end snippet CMakeLists.txt&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Best regards,&lt;BR /&gt;Giovanni&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 20 Mar 2012 23:14:24 GMT</pubDate>
    <dc:creator>Azua_Garcia__Giovann</dc:creator>
    <dc:date>2012-03-20T23:14:24Z</dc:date>
    <item>
      <title>link to fortran function</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787741#M1970</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a function implemented in e.g. myfunc.f and this implementation invokes lapack functions e.g. DGEQRF, how can I ensure that the linking is done with MKL? &lt;BR /&gt;&lt;BR /&gt;My ultimate goal is to reuse some fortran functions (QR update) from C and that all the invokations they do to e.g. LAPACK end up hitting MKL.&lt;BR /&gt;&lt;BR /&gt;I am using cmake and this is what I do but I am not sure it is actually linking to MKL ... can anyone please confirm this is all I need to do to ensure that these fortran utilities are linked to MKL?&lt;BR /&gt;&lt;BR /&gt;# &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; begin snippet CMakeLists.txt&lt;BR /&gt;&lt;BR /&gt;set(HAVE_INTEL_MKL ${MKL_FOUND})&lt;BR /&gt;if (MKL_FOUND)&lt;BR /&gt; include_directories(${MKL_INCLUDE_DIRS})&lt;BR /&gt; link_directories(${MKL_LIBRARY_DIRS})&lt;BR /&gt;endif()&lt;BR /&gt;&lt;BR /&gt;add_library(qr_updates&lt;BR /&gt; src/addcols.f&lt;BR /&gt; src/addcolsq.f&lt;BR /&gt; src/delcols.f&lt;BR /&gt; src/delcolsq.f&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;if (MKL_FOUND)&lt;BR /&gt; target_link_libraries(qr_updates ${MKL_LIBRARIES})&lt;BR /&gt;endif()&lt;BR /&gt;&lt;BR /&gt;# &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; end snippet CMakeLists.txt&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Best regards,&lt;BR /&gt;Giovanni&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Mar 2012 23:14:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787741#M1970</guid>
      <dc:creator>Azua_Garcia__Giovann</dc:creator>
      <dc:date>2012-03-20T23:14:24Z</dc:date>
    </item>
    <item>
      <title>link to fortran function</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787742#M1971</link>
      <description>Hi Giovanni, &lt;BR /&gt;&lt;BR /&gt;We usually use makefile, seldom use cmake to build MKL application. But i guess the compile and link model should be same. &lt;BR /&gt;&lt;BR /&gt;A simplecommand to build a mkl application is like&lt;BR /&gt;&lt;BR /&gt;ifort myprog.f -L$MKLPATH -I$MKLINCLUDE -lmkl_solver_lp64_sequential.a &lt;BR /&gt;-Wl,--start-group -lmkl_intel_lp64.a -lmkl_sequential.a &lt;BR /&gt;-lmkl_core.a-l-l-l -Wl,--end-group -lpthread &lt;BR /&gt;static linking of user code myprog.f, sequential version of sparse solver, and &lt;BR /&gt;sequential Intel MKL supporting LP64 interface.&lt;BR /&gt;&lt;BR /&gt;You may modify themaccording to cmake syntax. &lt;BR /&gt;&lt;BR /&gt;Some doc for your reference:&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/"&gt;1. Intel Math Kernel Library Link Line Advisor&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-linux-linking-applications-with-intel-mkl-version-100/"&gt;3. Linking Applications With Intel MKL Version 10.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And mkl lapack fortran example and build custom dll example are under MKL install directory: &lt;BR /&gt;for example, &lt;BR /&gt;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\mkl\tools\builder &lt;BR /&gt;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\mkl\examples&lt;BR /&gt;&lt;BR /&gt;Hope it helps, &lt;BR /&gt;Ying H.</description>
      <pubDate>Wed, 21 Mar 2012 05:29:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787742#M1971</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2012-03-21T05:29:21Z</dc:date>
    </item>
    <item>
      <title>link to fortran function</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787743#M1972</link>
      <description>Hi Ying,&lt;BR /&gt;&lt;BR /&gt;Thank you for your answer.&lt;BR /&gt;&lt;BR /&gt;I managed to get it working using CMake can call third party fortran routines from my C and those routines end up invoking MKL no problems.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Giovanni</description>
      <pubDate>Thu, 22 Mar 2012 18:30:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/link-to-fortran-function/m-p/787743#M1972</guid>
      <dc:creator>Azua_Garcia__Giovann</dc:creator>
      <dc:date>2012-03-22T18:30:10Z</dc:date>
    </item>
  </channel>
</rss>

