<?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: Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1497041#M34681</link>
    <description>&lt;P&gt;I noticed after your comment that we utilize by default MKL with TBB on mac and MKL with openMP on linux by default.&amp;nbsp; The behaviour above is replicable on linux by itself. So the issue is that the behaviour is different from a TBB linked executable and an openMP linked executable.&lt;BR /&gt;&lt;BR /&gt;Here are the 3 link lines for mkl.&lt;BR /&gt;&lt;BR /&gt;Darwin TBB&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,-rpath,&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;INTELROOT&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,-rpath,&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;INTELROOT&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Linux TBB&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Linux OpenMP&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 13:57:29 GMT</pubDate>
    <dc:creator>AndreFecteau</dc:creator>
    <dc:date>2023-06-19T13:57:29Z</dc:date>
    <item>
      <title>Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1491551#M34624</link>
      <description>&lt;P&gt;The behaviour of mkl_set_num_threads(n) and mkl_get_max_threads() seems to be different on mac and linux. Here is a small code snippet to show the different behaviours and the output from mac and linux.&lt;/P&gt;&lt;P&gt;It seems that on mac the mkl_get_max_threads() return the number of physical cores on my machine unless the mkl_set_num_threads_local(n) function has been set. Where on Linux it returns the mkl_set_num_threads(n) if that one has been set.&lt;/P&gt;&lt;P&gt;Am I missing any settings that can affect the threading to not fall back on the global settings.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#include "mkl.h"
#include "iostream"

int main()
{
    mkl_verbose(1);
    MKLVersion Version;
    mkl_get_version(&amp;amp;Version);

    printf("Major version:           %d\n",Version.MajorVersion);
    printf("Minor version:           %d\n",Version.MinorVersion);
    printf("Update version:          %d\n",Version.UpdateVersion);
    printf("Product status:          %s\n",Version.ProductStatus);
    printf("Build:                   %s\n",Version.Build);
    printf("Platform:                %s\n",Version.Platform);
    printf("Processor optimization:  %s\n",Version.Processor);
    printf("================================================================\n");
    printf("\n");

    // Here just to show these environment variables are not set.
    if(const char* env_p = std::getenv("MKL_NUM_THREADS"))
        std::cout &amp;lt;&amp;lt; "Your MKL_NUM_THREADS is: " &amp;lt;&amp;lt; env_p &amp;lt;&amp;lt; '\n';
    if(const char* env_p = std::getenv("OMP_NUM_THREADS"))
        std::cout &amp;lt;&amp;lt; "Your OMP_NUM_THREADS is: " &amp;lt;&amp;lt; env_p &amp;lt;&amp;lt; '\n';
    if(const char* env_p = std::getenv("NUMEXPR_NUM_THREADS"))
        std::cout &amp;lt;&amp;lt; "Your NUMEXPR_NUM_THREADS is: " &amp;lt;&amp;lt; env_p &amp;lt;&amp;lt; '\n';
    if(const char* env_p = std::getenv("VECLIB_MAXIMUM_THREADS"))
        std::cout &amp;lt;&amp;lt; "Your VECLIB_MAXIMUM_THREADS is: " &amp;lt;&amp;lt; env_p &amp;lt;&amp;lt; '\n';
    if(const char* env_p = std::getenv("OPENBLAS_NUM_THREADS"))
        std::cout &amp;lt;&amp;lt; "Your OPENBLAS_NUM_THREADS is: " &amp;lt;&amp;lt; env_p &amp;lt;&amp;lt; '\n';

    std::cout &amp;lt;&amp;lt; mkl_get_dynamic() &amp;lt;&amp;lt; std::endl;
    std::cout &amp;lt;&amp;lt; mkl_get_max_threads() &amp;lt;&amp;lt; std::endl;
    mkl_set_num_threads(4);
    std::cout &amp;lt;&amp;lt; mkl_get_dynamic() &amp;lt;&amp;lt; std::endl;
    std::cout &amp;lt;&amp;lt; mkl_get_max_threads() &amp;lt;&amp;lt; std::endl;
    mkl_set_num_threads_local(0);
    std::cout &amp;lt;&amp;lt; mkl_get_dynamic() &amp;lt;&amp;lt; std::endl;
    std::cout &amp;lt;&amp;lt; mkl_get_max_threads() &amp;lt;&amp;lt; std::endl;
    mkl_set_num_threads_local(4);
    std::cout &amp;lt;&amp;lt; mkl_get_dynamic() &amp;lt;&amp;lt; std::endl;
    std::cout &amp;lt;&amp;lt; mkl_get_max_threads() &amp;lt;&amp;lt; std::endl;
    mkl_set_num_threads_local(0);
    std::cout &amp;lt;&amp;lt; mkl_get_dynamic() &amp;lt;&amp;lt; std::endl;
    std::cout &amp;lt;&amp;lt; mkl_get_max_threads() &amp;lt;&amp;lt; std::endl;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output from a mac on GCC or Apple clang version 13.1.6 (clang-1316.0.21.2.5)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Output from a macMajor version:           2023
Minor version:           0
Update version:          1
Product status:          Product
Build:                   20230303
Platform:                Intel(R) 64 architecture
Processor optimization:  Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors
================================================================

1
8
1
8
1
8
1
4
1
8&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Output from a linux gcc/icc/icx compilers&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Major version:           2022
Minor version:           0
Update version:          2
Product status:          Product
Build:                   20220804
Platform:                Intel(R) 64 architecture
Processor optimization:  Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) with support of Intel(R) Deep Learning Boost (Intel(R) DL Boost), EVEX-encoded AES and Carry-Less Multiplication Quadword instructions
================================================================
1
1
1
4
1
4
1
4
1
4&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Note: I did try the 2022 version on my mac and the same issue persist.&lt;BR /&gt;Note: Duplicated content from&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/76176545/how-to-properly-define-the-maximum-thread-number-in-mkl-on-mac-computers" target="_blank"&gt;https://stackoverflow.com/questions/76176545/how-to-properly-define-the-maximum-thread-number-in-mkl-on-mac-computers&lt;/A&gt;&amp;nbsp;but I either don't understand the reply or it is not relevant to the question.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 13:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1491551#M34624</guid>
      <dc:creator>AndreFecteau</dc:creator>
      <dc:date>2023-05-31T13:55:00Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1493185#M34640</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please let us know the MacOS details, hardware, and XCode version you are using?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jun 2023 09:00:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1493185#M34640</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-06T09:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1493237#M34641</link>
      <description>&lt;P&gt;Thanks for your reply, here are the details requested. Let me know if you need anything else.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  System Version:	macOS 12.4 (21F79)
  Kernel Version:	Darwin 21.5.0
  Boot Volume:	Macintosh HD
  Boot Mode:	Normal
  Computer Name:	*******
  User Name:	******
  Secure Virtual Memory:	Enabled
  System Integrity Protection:	Enabled
  Time since boot:	5 days 19:48&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro16,1
  Processor Name:	8-Core Intel Core i9
  Processor Speed:	2.3 GHz
  Number of Processors:	1
  Total Number of Cores:	8
  L2 Cache (per Core):	256 KB
  L3 Cache:	16 MB
  Hyper-Threading Technology:	Enabled
  Memory:	16 GB
  System Firmware Version:	1731.120.10.0.0 (iBridge: 19.16.15071.0.0,0)
  OS Loader Version:	540.120.3~6
  Serial Number (system):	C02G43AZMD6N
  Hardware UUID:	085D1AE1-DA87-51AA-8CAA-11E9F7E68DD9
  Provisioning UDID:	085D1AE1-DA87-51AA-8CAA-11E9F7E68DD9
  Activation Lock Status:	Enabled&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Xcode 13.4.1
Build version 13F100&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Jun 2023 13:31:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1493237#M34641</guid>
      <dc:creator>AndreFecteau</dc:creator>
      <dc:date>2023-06-06T13:31:53Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1496094#M34665</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are working on your issue. We will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Jun 2023 10:14:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1496094#M34665</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-15T10:14:04Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1496386#M34674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please let us know the threading you are using for both Linux and MacOS?&lt;/P&gt;&lt;P&gt;If possible, could you please provide us with the complete command you are using?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jun 2023 07:55:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1496386#M34674</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-16T07:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1497041#M34681</link>
      <description>&lt;P&gt;I noticed after your comment that we utilize by default MKL with TBB on mac and MKL with openMP on linux by default.&amp;nbsp; The behaviour above is replicable on linux by itself. So the issue is that the behaviour is different from a TBB linked executable and an openMP linked executable.&lt;BR /&gt;&lt;BR /&gt;Here are the 3 link lines for mkl.&lt;BR /&gt;&lt;BR /&gt;Darwin TBB&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,-rpath,&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;INTELROOT&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,-rpath,&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;INTELROOT&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Linux TBB&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Linux OpenMP&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;set(&lt;SPAN&gt;MKL_LINK_LINE -L&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;MKLLIBDIR&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 13:57:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1497041#M34681</guid>
      <dc:creator>AndreFecteau</dc:creator>
      <dc:date>2023-06-19T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1500709#M34727</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are working on your issue internally, we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jun 2023 11:15:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1500709#M34727</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-06-30T11:15:34Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1504293#M34804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The issue raised by you is being looked at by the development team. We will update you once the issue is fixed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Jul 2023 02:42:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1504293#M34804</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-07-13T02:42:48Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1527842#M35192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience and Apologies for the delay in the response.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Yes, &amp;nbsp;All the mkl_set_num_threads(n) and mkl_get_max_threads() APIs are expected to provide correct values for OpenMP threading only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It might be, that if you link the MKL and TBB thread library, then oneTBB controls the number of threads - not Intel oneMKL. So, it is not recommended to use the MKL Threading APIs instead you can use the tbb::schedule_task class. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For more details regarding threading controls, please refer to the below link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-2/threading-control.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-2/threading-control.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2023 18:10:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1527842#M35192</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-26T18:10:10Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1530256#M35241</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please let us know if you have any other queries?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Oct 2023 12:30:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1530256#M35241</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-04T12:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1531131#M35260</link>
      <description>&lt;P&gt;Thanks for the reply,&lt;BR /&gt;&lt;BR /&gt;We currently support both tbb and openmp versions of MKL since the openmp version for us is more performant on most platforms for our application and apple clang does not have support of openmp.&lt;BR /&gt;&lt;BR /&gt;During execution we toggle from running one instance Paradiso (which uses tbb or openmp) with multiple core to running a parallel for loop that contains Paradiso running in serial mode. (Or we assumed that we ran paradiso in serial after calling&amp;nbsp;&lt;SPAN&gt;mkl_set_num_threads(1)&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;We will be evaluating the behaviour more closely and how to replicate this toggling of Paradiso in serial with tbb in parallel when we have the bandwidth to do so.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 13:13:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1531131#M35260</guid>
      <dc:creator>AndreFecteau</dc:creator>
      <dc:date>2023-10-06T13:13:05Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1534059#M35309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please let us know if you had some bandwidth and tried evaluating the behavior?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2023 08:50:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1534059#M35309</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-16T08:50:50Z</dc:date>
    </item>
    <item>
      <title>Re:Setting the number of threads in mkl on the mac version does not modify mkl_get_max_threads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1536684#M35353</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please let us know if you had some bandwidth and tried evaluating the behavior?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:16:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Setting-the-number-of-threads-in-mkl-on-the-mac-version-does-not/m-p/1536684#M35353</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-10-24T07:16:21Z</dc:date>
    </item>
  </channel>
</rss>

