<?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 LAPACKE_dgeqrf hangs with omp dynamic enabled in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeqrf-hangs-with-omp-dynamic-enabled/m-p/1755376#M37640</link>
    <description>&lt;P&gt;I've been having an issue where scipy's svd hangs in mkl. My investigation seems to suggest its an issue where mkl is assuming it has 4 workers and is stuck waiting for them when it only has 1, due to me setting OMP_DYNAMIC=TRUE and omp reducing the number of workers when the machine is busy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Repro which was using the python `mkl-devel==2026.1.0` package:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#define _GNU_SOURCE

#include &amp;lt;mkl.h&amp;gt;
#include &amp;lt;omp.h&amp;gt;
#include &amp;lt;sched.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;


static double a[3000 * 128];
static double tau[128]


int main(void) {
    cpu_set_t cpus;

    /*
    We pin to one CPU to simulate OMP's behaviour when the load average on the machine is high.
    In dynamic mode this causes it to lower the maximum threading.
    */
    CPU_ZERO(&amp;amp;cpus);
    CPU_SET(sched_getcpu(), &amp;amp;cpus);
    if (sched_setaffinity(0, sizeof(cpus), &amp;amp;cpus) != 0) {
        perror("sched_setaffinity");
        return 1;
    }

    omp_set_dynamic(1);
    mkl_set_dynamic(0);
    mkl_set_num_threads_local(4);

    puts("starting DGEQRF");
    fflush(stdout);
    return LAPACKE_dgeqrf(LAPACK_COL_MAJOR, 3000, 128, a, 3000, tau)
}&lt;/LI-CODE&gt;&lt;P&gt;Let me know if any more information would be useful&lt;/P&gt;</description>
    <pubDate>Sat, 01 Aug 2026 19:26:45 GMT</pubDate>
    <dc:creator>JohhnyEnglish</dc:creator>
    <dc:date>2026-08-01T19:26:45Z</dc:date>
    <item>
      <title>LAPACKE_dgeqrf hangs with omp dynamic enabled</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeqrf-hangs-with-omp-dynamic-enabled/m-p/1755376#M37640</link>
      <description>&lt;P&gt;I've been having an issue where scipy's svd hangs in mkl. My investigation seems to suggest its an issue where mkl is assuming it has 4 workers and is stuck waiting for them when it only has 1, due to me setting OMP_DYNAMIC=TRUE and omp reducing the number of workers when the machine is busy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Repro which was using the python `mkl-devel==2026.1.0` package:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#define _GNU_SOURCE

#include &amp;lt;mkl.h&amp;gt;
#include &amp;lt;omp.h&amp;gt;
#include &amp;lt;sched.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;


static double a[3000 * 128];
static double tau[128]


int main(void) {
    cpu_set_t cpus;

    /*
    We pin to one CPU to simulate OMP's behaviour when the load average on the machine is high.
    In dynamic mode this causes it to lower the maximum threading.
    */
    CPU_ZERO(&amp;amp;cpus);
    CPU_SET(sched_getcpu(), &amp;amp;cpus);
    if (sched_setaffinity(0, sizeof(cpus), &amp;amp;cpus) != 0) {
        perror("sched_setaffinity");
        return 1;
    }

    omp_set_dynamic(1);
    mkl_set_dynamic(0);
    mkl_set_num_threads_local(4);

    puts("starting DGEQRF");
    fflush(stdout);
    return LAPACKE_dgeqrf(LAPACK_COL_MAJOR, 3000, 128, a, 3000, tau)
}&lt;/LI-CODE&gt;&lt;P&gt;Let me know if any more information would be useful&lt;/P&gt;</description>
      <pubDate>Sat, 01 Aug 2026 19:26:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LAPACKE-dgeqrf-hangs-with-omp-dynamic-enabled/m-p/1755376#M37640</guid>
      <dc:creator>JohhnyEnglish</dc:creator>
      <dc:date>2026-08-01T19:26:45Z</dc:date>
    </item>
  </channel>
</rss>

