<?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 Issue using mkl_service routines with mkl_rt library in Fortran in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1568681#M35777</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm using MKL in a mixed-language environment (C/C++/Fortran) and to improve alignment of it's usage I'm transitioning to the MKL Single Dynamic Library (libmkl_rt).&lt;/P&gt;&lt;P&gt;For C/C++ codes I'm not having any issues with compiling/linking and I'm able to properly use the mkl_set_interface/threading_layer() functions.&lt;/P&gt;&lt;P&gt;The error I have encountered is using the mkl_set_interface/threading_layer() functions from Fortran. I've followed the MKL guide for Fortran and use the mkl_service module whilst including the pre-compiled Fortran module file during compilation. However, at the link stage where I specify '-lmkl_rt' and the library search path ('-L...'), the linker complains that:&lt;/P&gt;&lt;PRE&gt;error: undefined reference to 'mkl_set_interface_layer_'&lt;BR /&gt;error: undefined reference to 'mkl_set_threading_layer_'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I check what is available in libmkl_rt.so.2:&lt;/P&gt;&lt;PRE&gt;nm -D lib/libmkl_rt.so | grep mkl_set_&lt;BR /&gt;00000000002fd700 T mkl_set_dynamic&lt;BR /&gt;00000000002fd700 T mkl_set_dynamic_&lt;BR /&gt;00000000002fd7a0 T mkl_set_env_mode&lt;BR /&gt;00000000002fd7a0 T mkl_set_env_mode_&lt;BR /&gt;00000000002fd860 T mkl_set_exit_handler&lt;BR /&gt;00000000002fd860 T mkl_set_exit_handler_&lt;BR /&gt;00000000002fed60 T mkl_set_interface_layer&lt;BR /&gt;00000000002fd8e0 T mkl_set_memory_limit&lt;BR /&gt;00000000002fd8e0 T mkl_set_memory_limit_&lt;BR /&gt;00000000002fd9c0 T mkl_set_mpi&lt;BR /&gt;00000000002fd9c0 T mkl_set_mpi_&lt;BR /&gt;00000000002fdaa0 T mkl_set_num_stripes&lt;BR /&gt;00000000002fdaa0 T mkl_set_num_stripes_&lt;BR /&gt;00000000002fdb40 T mkl_set_num_threads&lt;BR /&gt;00000000002fdb40 T mkl_set_num_threads_&lt;BR /&gt;00000000002fdbe0 T mkl_set_num_threads_local&lt;BR /&gt;00000000002fdbe0 T mkl_set_num_threads_local_&lt;BR /&gt;00000000002fdca0 T mkl_set_pardiso_pivot&lt;BR /&gt;00000000002fdca0 T mkl_set_pardiso_pivot_&lt;BR /&gt;00000000002fdd00 T mkl_set_progress&lt;BR /&gt;00000000002fdd00 T mkl_set_progress_&lt;BR /&gt;00000000002fed10 T mkl_set_threading_layer&lt;BR /&gt;00000000002fdd60 T mkl_set_xerbla&lt;BR /&gt;00000000002fdd60 T mkl_set_xerbla_&lt;BR /&gt;00000000002fddc0 T mkl_set_xerbla_interface&lt;/PRE&gt;&lt;P&gt;It's clear that although many of the service functions offer an equivalent with a trailing underscore, these are not available for the interface and threading layer functions.&lt;/P&gt;&lt;P&gt;Is this an oversight in the libmkl_rt.so.2 library, or some mistake in the precompiled mkl_service.mod that is provided in the MKL package?&lt;/P&gt;&lt;P&gt;For reference, I'm using:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;oneapi-v-2023.0.0.25339&lt;/LI&gt;&lt;LI&gt;Intel Fortran Compiler classic&lt;/LI&gt;&lt;LI&gt;GCC 9.5.0&lt;/LI&gt;&lt;LI&gt;Linux OS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ewan&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 09:54:06 GMT</pubDate>
    <dc:creator>Towie__Ewan</dc:creator>
    <dc:date>2024-02-02T09:54:06Z</dc:date>
    <item>
      <title>Issue using mkl_service routines with mkl_rt library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1568681#M35777</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm using MKL in a mixed-language environment (C/C++/Fortran) and to improve alignment of it's usage I'm transitioning to the MKL Single Dynamic Library (libmkl_rt).&lt;/P&gt;&lt;P&gt;For C/C++ codes I'm not having any issues with compiling/linking and I'm able to properly use the mkl_set_interface/threading_layer() functions.&lt;/P&gt;&lt;P&gt;The error I have encountered is using the mkl_set_interface/threading_layer() functions from Fortran. I've followed the MKL guide for Fortran and use the mkl_service module whilst including the pre-compiled Fortran module file during compilation. However, at the link stage where I specify '-lmkl_rt' and the library search path ('-L...'), the linker complains that:&lt;/P&gt;&lt;PRE&gt;error: undefined reference to 'mkl_set_interface_layer_'&lt;BR /&gt;error: undefined reference to 'mkl_set_threading_layer_'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I check what is available in libmkl_rt.so.2:&lt;/P&gt;&lt;PRE&gt;nm -D lib/libmkl_rt.so | grep mkl_set_&lt;BR /&gt;00000000002fd700 T mkl_set_dynamic&lt;BR /&gt;00000000002fd700 T mkl_set_dynamic_&lt;BR /&gt;00000000002fd7a0 T mkl_set_env_mode&lt;BR /&gt;00000000002fd7a0 T mkl_set_env_mode_&lt;BR /&gt;00000000002fd860 T mkl_set_exit_handler&lt;BR /&gt;00000000002fd860 T mkl_set_exit_handler_&lt;BR /&gt;00000000002fed60 T mkl_set_interface_layer&lt;BR /&gt;00000000002fd8e0 T mkl_set_memory_limit&lt;BR /&gt;00000000002fd8e0 T mkl_set_memory_limit_&lt;BR /&gt;00000000002fd9c0 T mkl_set_mpi&lt;BR /&gt;00000000002fd9c0 T mkl_set_mpi_&lt;BR /&gt;00000000002fdaa0 T mkl_set_num_stripes&lt;BR /&gt;00000000002fdaa0 T mkl_set_num_stripes_&lt;BR /&gt;00000000002fdb40 T mkl_set_num_threads&lt;BR /&gt;00000000002fdb40 T mkl_set_num_threads_&lt;BR /&gt;00000000002fdbe0 T mkl_set_num_threads_local&lt;BR /&gt;00000000002fdbe0 T mkl_set_num_threads_local_&lt;BR /&gt;00000000002fdca0 T mkl_set_pardiso_pivot&lt;BR /&gt;00000000002fdca0 T mkl_set_pardiso_pivot_&lt;BR /&gt;00000000002fdd00 T mkl_set_progress&lt;BR /&gt;00000000002fdd00 T mkl_set_progress_&lt;BR /&gt;00000000002fed10 T mkl_set_threading_layer&lt;BR /&gt;00000000002fdd60 T mkl_set_xerbla&lt;BR /&gt;00000000002fdd60 T mkl_set_xerbla_&lt;BR /&gt;00000000002fddc0 T mkl_set_xerbla_interface&lt;/PRE&gt;&lt;P&gt;It's clear that although many of the service functions offer an equivalent with a trailing underscore, these are not available for the interface and threading layer functions.&lt;/P&gt;&lt;P&gt;Is this an oversight in the libmkl_rt.so.2 library, or some mistake in the precompiled mkl_service.mod that is provided in the MKL package?&lt;/P&gt;&lt;P&gt;For reference, I'm using:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;oneapi-v-2023.0.0.25339&lt;/LI&gt;&lt;LI&gt;Intel Fortran Compiler classic&lt;/LI&gt;&lt;LI&gt;GCC 9.5.0&lt;/LI&gt;&lt;LI&gt;Linux OS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ewan&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 09:54:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1568681#M35777</guid>
      <dc:creator>Towie__Ewan</dc:creator>
      <dc:date>2024-02-02T09:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issue using mkl_service routines with mkl_rt library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1568757#M35778</link>
      <description>&lt;P&gt;I've done some more digging, and with the attached small test program I have repeated the behaviour I discuss above.&lt;/P&gt;&lt;P&gt;It's clear to me that the precompiled mkl_service module bundled in MKL includes a trailing underscore in the function names, and that libmkl_rt.s0.2 doesn't provide the corresponding symbol for the mkl_set_interface/threading_layer functions.&lt;/P&gt;&lt;P&gt;If I recompile the mkl_service.f90 module and set '-assume nounderscore' then I can get a version that works with mkl_rt.&lt;/P&gt;&lt;P&gt;Attached is an archive containing a sample program and the corresponding shell script to compile, link, and run the binary. The shell script will require modification to set the path to your MKL library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:17:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1568757#M35778</guid>
      <dc:creator>Towie__Ewan</dc:creator>
      <dc:date>2024-02-02T15:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue using mkl_service routines with mkl_rt library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569191#M35781</link>
      <description>&lt;P&gt;Ewan,&lt;/P&gt;
&lt;P&gt;it looks like the problem. May we ask you to check the latest 2024.0?&lt;/P&gt;
&lt;P&gt;--Gennady&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 05:13:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569191#M35781</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-05T05:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue using mkl_service routines with mkl_rt library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569266#M35783</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;&lt;P&gt;I have tried both the 2023.2 release and now the 2024.0 release. Both show the same error at the link command.&lt;/P&gt;&lt;P&gt;Ewan&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 10:10:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569266#M35783</guid>
      <dc:creator>Towie__Ewan</dc:creator>
      <dc:date>2024-02-05T10:10:38Z</dc:date>
    </item>
    <item>
      <title>Re:Issue using mkl_service routines with mkl_rt library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569614#M35786</link>
      <description>&lt;P&gt;Thanks Ewan. &lt;/P&gt;&lt;P&gt;Yes, I confirmed the problem on oneMKL end and we will fix it into one of the next release/updates. I will keep you informed the status.&lt;/P&gt;&lt;P&gt;--Gennandy&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Feb 2024 05:39:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Issue-using-mkl-service-routines-with-mkl-rt-library-in-Fortran/m-p/1569614#M35786</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-06T05:39:33Z</dc:date>
    </item>
  </channel>
</rss>

