<?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 lapack.f90 how to include correctly in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652551#M36775</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I included into the program&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;INCLUDE 'lapack.f90'

  Module myMKL
   include 'mkl_lapack.fi'
  end module myMKL&lt;/LI-CODE&gt;&lt;P&gt;and also included "use" statements&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   use F95_PRECISION
   use LAPACK95
   use myMKL


   call getrf(Gk1,ipvt,info)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;in the subroutine which call&amp;nbsp;&lt;STRONG&gt;getrf&lt;/STRONG&gt; subroutine&lt;/P&gt;&lt;P&gt;However, during the compilation I got an error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ifxKSN7m7.i90:(.text+0x5690c): undefined reference to `zgetrf_f95_'
ifxKSN7m7.i90:(.text+0x569cc): undefined reference to `zgetri_f95_'
make: *** [all] Error 1&lt;/LI-CODE&gt;&lt;P&gt;Could you please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2024 03:18:04 GMT</pubDate>
    <dc:creator>DmitrySkachkov</dc:creator>
    <dc:date>2024-12-27T03:18:04Z</dc:date>
    <item>
      <title>lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652551#M36775</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I included into the program&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;INCLUDE 'lapack.f90'

  Module myMKL
   include 'mkl_lapack.fi'
  end module myMKL&lt;/LI-CODE&gt;&lt;P&gt;and also included "use" statements&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   use F95_PRECISION
   use LAPACK95
   use myMKL


   call getrf(Gk1,ipvt,info)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;in the subroutine which call&amp;nbsp;&lt;STRONG&gt;getrf&lt;/STRONG&gt; subroutine&lt;/P&gt;&lt;P&gt;However, during the compilation I got an error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ifxKSN7m7.i90:(.text+0x5690c): undefined reference to `zgetrf_f95_'
ifxKSN7m7.i90:(.text+0x569cc): undefined reference to `zgetri_f95_'
make: *** [all] Error 1&lt;/LI-CODE&gt;&lt;P&gt;Could you please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 03:18:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652551#M36775</guid>
      <dc:creator>DmitrySkachkov</dc:creator>
      <dc:date>2024-12-27T03:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652710#M36776</link>
      <description>&lt;P&gt;In addition to using the Lapack95 interfaces, you also need to link the Lapack-95 (and, if needed, the Blas95) libraries.&lt;/P&gt;&lt;P&gt;See the &lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html" target="_self"&gt;MKL Link Line Advisor&lt;/A&gt; for how to do this.&lt;/P&gt;&lt;P&gt;There is an &lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/linking-to-LAPACK95-problem/m-p/891534/highlight/true#M10462" target="_self"&gt;older example code&lt;/A&gt; for ?GetRF in this forum. I built and ran that example code using the commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;ifx /Qmkl xgetrf.f90 mkl_lapack95_ilp64.lib
xgetrf&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 01:53:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652710#M36776</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2024-12-28T01:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652866#M36777</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;I used the suggested options for compiler&lt;/P&gt;&lt;P&gt;-I${MKLROOT}/include/mkl/intel64/ilp64 -i8 -qmkl-ilp64=sequential&lt;/P&gt;&lt;P&gt;and for linker&lt;/P&gt;&lt;P&gt;-qmkl-ilp64=sequential ${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a&lt;/P&gt;&lt;P&gt;However I got an error in compilation:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ifx -o "./bin/"wtb.x wtb_main.o module_input.o module_hamiltonian.o module_bse.o module_pce.o module_coulomb.o module_math.o module_berry.o module_optics.o module_tools.o module_kmesh.o -qmkl-ilp64=s
equential  /opt/shared/intel-oneapi/2024.2.0.634/mkl/2024.2/lib/libmkl_blas95_ilp64.a /opt/shared/intel-oneapi/2024.2.0.634/mkl/2024.2/lib/libmkl_lapack95_ilp64.a
/opt/shared/intel-oneapi/2024.0.1.46/compiler/2024.0/lib/libifcoremt.a(for_vm.o): In function `check_KMP':
for_vm.c:(.text+0x694): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x716): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x738): undefined reference to `__kmpc_global_thread_num'
module_bse.o: In function `module_bse_mp_dielbsep_':
ifxUx8Fwo.i90:(.text+0x1043): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_dielbsev_':
ifxUx8Fwo.i90:(.text+0x10b7): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_dielbseptemp_':
ifxUx8Fwo.i90:(.text+0x6955): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_bsedielraw_':
ifxUx8Fwo.i90:(.text+0x69a1): undefined reference to `__kmpc_global_thread_num'
ifxUx8Fwo.i90:(.text+0x8af1): undefined reference to `__kmpc_for_static_init_8'
ifxUx8Fwo.i90:(.text+0x91dd): undefined reference to `__kmpc_for_static_fini'
ifxUx8Fwo.i90:(.text+0x91ee): undefined reference to `__kmpc_barrier'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I am using Intel-oneapi-mkl/2024&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 04:12:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652866#M36777</guid>
      <dc:creator>DmitrySkachkov</dc:creator>
      <dc:date>2024-12-29T04:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652900#M36779</link>
      <description>&lt;P&gt;Please check that you are specifying the correct openMP options when using the MKL Link Line advisor.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 15:35:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652900#M36779</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2024-12-29T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652929#M36780</link>
      <description>&lt;P&gt;This is exactly what I want.&lt;/P&gt;&lt;P&gt;I would like to compile my code with OpenMP options, but MKL library to link as sequential.&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 19:26:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1652929#M36780</guid>
      <dc:creator>DmitrySkachkov</dc:creator>
      <dc:date>2024-12-29T19:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: lapack.f90 how to include correctly</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1653327#M36790</link>
      <description>&lt;P&gt;Suppose it's the similar topic as this thread&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the solution is:&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;For using oneMKL + OpenMP threading, we recommend you use intel OpenMP -liomp5 link option. For example,&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_intel_thread.a ${MKLROOT}/lib/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;More advisor, please check&amp;nbsp;&lt;A class="sub_section_element_selectors" href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.htm" target="_self" rel="nofollow noopener noreferrer"&gt;onemkl-link-line-advisor&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 05:26:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/lapack-f90-how-to-include-correctly/m-p/1653327#M36790</guid>
      <dc:creator>Ruqiu_C_Intel</dc:creator>
      <dc:date>2024-12-31T05:26:28Z</dc:date>
    </item>
  </channel>
</rss>

