<?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 I tried &amp;quot;export MKL_THREADING in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158831#M27779</link>
    <description>&lt;P&gt;I tried "export MKL_THREADING_LAYER=GNU" and I will try today a bit later other flags&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Steps:&lt;/P&gt;

&lt;P&gt;1. compile Numpy&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;wget &lt;A href="https://github.com/numpy/numpy/archive/v1.14.2.tar.gz" target="_blank"&gt;https://github.com/numpy/numpy/archive/v1.14.2.tar.gz&lt;/A&gt;
tar -xzf v1.14.2.tar.gz
cd numpy-1.14.2
echo "[mkl]" &amp;gt;&amp;gt; site.cfg
echo "library_dirs = /opt/intel/mkl/lib/intel64" &amp;gt;&amp;gt; site.cfg
echo "include_dirs = /opt/intel/mkl/include" &amp;gt;&amp;gt; site.cfg
echo "mkl_libs = mkl_rt" &amp;gt;&amp;gt; site.cfg
echo "lapack_libs = " &amp;gt;&amp;gt; site.cfg
python3 setup.py build
sudo python3 setup.py install&lt;/PRE&gt;

&lt;P&gt;2. run standard Numpy test&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;python3&lt;/PRE&gt;

&lt;PRE class="brush:python;"&gt;&amp;gt;&amp;gt;import numpy as np
&amp;gt;&amp;gt;np.test(verbose=3)&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 06:21:00 GMT</pubDate>
    <dc:creator>mvrht__u3425923</dc:creator>
    <dc:date>2018-03-27T06:21:00Z</dc:date>
    <item>
      <title>Intel MKL 2018 update 2 freezes during numpy test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158825#M27773</link>
      <description>&lt;P&gt;Newly released Intel MKL 2018 Update 2 freezes when running standard numpy (1.14.2) test suite. It stops running&lt;/P&gt;

&lt;PRE class="brush:python;"&gt;numpy.distutils.tests.test_exec_command.TestExecCommand.test_basic ...&lt;/PRE&gt;

&lt;P&gt;test while using 1 CPU core with 100% loading. With Intel MKL 2018 initial release all tests are passed without problems.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 14:04:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158825#M27773</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-22T14:04:54Z</dc:date>
    </item>
    <item>
      <title>If you narrow down the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158826#M27774</link>
      <description>&lt;P&gt;If you narrow down the question to which MKL routine caused the failure and what argument values were passed to that routine, more people would be able to take a look. If you use Intel's Python distribution, there is a separate forum for questions related to it, see &lt;SPAN style="font-size: 11.382px;"&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-distribution-for-python&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-distribution-for-python&amp;nbsp;&lt;/A&gt;;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 14:44:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158826#M27774</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-03-22T14:44:59Z</dc:date>
    </item>
    <item>
      <title>It is ordinary C/C++/Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158827#M27775</link>
      <description>&lt;P&gt;It is ordinary C/C++/Fortran MKL installation with manually built numpy with MKL as BLAS on Linux machine.&lt;/P&gt;

&lt;P&gt;Well, I tried but I am not able to identify exact routine. But I reproduced behavior on another machine.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 17:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158827#M27775</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-22T17:56:00Z</dc:date>
    </item>
    <item>
      <title>Hi Mvrht,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158828#M27776</link>
      <description>&lt;P&gt;Hi Mvrht,&lt;BR /&gt;
	&lt;BR /&gt;
	​I may first to recommend your try Intel distributed python, which have optimized numpy and more by MKL.&lt;/P&gt;

&lt;P&gt;Then consider build numpy manually, are you using Intel C/C++/fortran compiler or using GNU gcc/gfortran to build the numpy?&lt;BR /&gt;
	​Here is one article discussed some issues for your reference:&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl&lt;/A&gt;&lt;BR /&gt;
	​Best Regards,&lt;BR /&gt;
	​Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 08:46:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158828#M27776</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-03-26T08:46:01Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158829#M27777</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thanks for your advices! I am using GNU gcc/gfortran for building numpy. I tried to add additional compilation flags from referenced article but unfortunately with no luck - testing still freezes.&lt;/P&gt;

&lt;P&gt;Considering python distribution - I am using deep learning library which require C/C++ MKL as BLAS backend as well, so only python distribution is not a solution and it is bit heavy (Anaconda+a lot of libraries) considering that I need&amp;nbsp;only numpy.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:49:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158829#M27777</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-26T12:49:47Z</dc:date>
    </item>
    <item>
      <title>Hi Mvrht,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158830#M27778</link>
      <description>&lt;P&gt;Hi Mvrht,&lt;BR /&gt;
	what is exact command line are you using? or do you have details steps to reproduce the problem?&lt;/P&gt;

&lt;P&gt;and have you tried&lt;/P&gt;

&lt;P&gt;&amp;gt;export MKL_THREADING_LAYER=GNU&lt;BR /&gt;
	​&amp;gt;export MKL_NUM_THREADS=1&lt;BR /&gt;
	&amp;gt;export MKL_VERBOSE=1&lt;BR /&gt;
	​&amp;gt; your test.py&lt;BR /&gt;
	​and what is the output?&lt;BR /&gt;
	Best Regards,&lt;BR /&gt;
	Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 03:42:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158830#M27778</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-03-27T03:42:55Z</dc:date>
    </item>
    <item>
      <title>I tried "export MKL_THREADING</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158831#M27779</link>
      <description>&lt;P&gt;I tried "export MKL_THREADING_LAYER=GNU" and I will try today a bit later other flags&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Steps:&lt;/P&gt;

&lt;P&gt;1. compile Numpy&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;wget &lt;A href="https://github.com/numpy/numpy/archive/v1.14.2.tar.gz" target="_blank"&gt;https://github.com/numpy/numpy/archive/v1.14.2.tar.gz&lt;/A&gt;
tar -xzf v1.14.2.tar.gz
cd numpy-1.14.2
echo "[mkl]" &amp;gt;&amp;gt; site.cfg
echo "library_dirs = /opt/intel/mkl/lib/intel64" &amp;gt;&amp;gt; site.cfg
echo "include_dirs = /opt/intel/mkl/include" &amp;gt;&amp;gt; site.cfg
echo "mkl_libs = mkl_rt" &amp;gt;&amp;gt; site.cfg
echo "lapack_libs = " &amp;gt;&amp;gt; site.cfg
python3 setup.py build
sudo python3 setup.py install&lt;/PRE&gt;

&lt;P&gt;2. run standard Numpy test&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;python3&lt;/PRE&gt;

&lt;PRE class="brush:python;"&gt;&amp;gt;&amp;gt;import numpy as np
&amp;gt;&amp;gt;np.test(verbose=3)&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158831#M27779</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-27T06:21:00Z</dc:date>
    </item>
    <item>
      <title>Hi, Ying</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158832#M27780</link>
      <description>&lt;P&gt;Hi, Ying&lt;/P&gt;

&lt;P&gt;well with defined all 3 flags&lt;/P&gt;

&lt;P&gt;&amp;gt;export MKL_THREADING_LAYER=GNU&lt;BR /&gt;
	​&amp;gt;export MKL_NUM_THREADS=1&lt;BR /&gt;
	&amp;gt;export MKL_VERBOSE=1&lt;/P&gt;

&lt;P&gt;NumPy tests passed.&lt;/P&gt;

&lt;P&gt;But I guess MKL_NUM_THREADS=1 flag kills most of BLAS benefits? Somehow MKL 2018 initial release do not require defining this flags to pass the tests. BTW I tried MKL 2018 update 1 the problem is the same as with update 2.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 07:18:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158832#M27780</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-27T07:18:18Z</dc:date>
    </item>
    <item>
      <title>In fact it is not necessary</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158833#M27781</link>
      <description>&lt;P&gt;In fact it is not necessary to use GNU threads. I attached outputs of running test with 1 and 2 threads with MKL_VERBOSE=1.&lt;/P&gt;

&lt;P&gt;It stops during&lt;/P&gt;

&lt;PRE class="brush:;"&gt;numpy.distutils.tests.test_exec_command.TestExecCommand.test_basic ...&lt;/PRE&gt;

&lt;P&gt;test. But I guess it is not the real problem - it does not call BLAS routines and if I add return statement in the beginning of this test it will anyway freeze with one core 100% usage.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 10:51:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158833#M27781</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-27T10:51:56Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158834#M27782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The issue you are describing is similar to what our Intel Python Distribution team already faced a few times.&lt;/P&gt;

&lt;P&gt;They suggested a workaround: set environment variable KMP_INIT_AT_FORK=FALSE.&lt;/P&gt;

&lt;P&gt;Can you please check and let us know is it helpful or not?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Konstantin&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 20:46:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158834#M27782</guid>
      <dc:creator>Konstantin_A_Intel</dc:creator>
      <dc:date>2018-03-29T20:46:06Z</dc:date>
    </item>
    <item>
      <title>Hi, Konstantin</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158835#M27783</link>
      <description>&lt;P&gt;Hi, Konstantin&lt;/P&gt;

&lt;P&gt;Yes, with KMP_INIT_AT_FORK=FALSE NumPy tests passed successfully! Thank you for helping!&lt;/P&gt;

&lt;P&gt;I have some more questions: how does this flag affect performance (somehow &lt;A href="https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-supported-environment-variables" target="_blank"&gt;https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-supported-environment-variables&lt;/A&gt; even does not list such env variable)? Or maybe it just NumPy test corner case and generally it is not required anywhere else (in my application MKL will be called not only by NumPy, but by mix of NumPy code + deep learning framework C++ code)?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 06:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-2018-update-2-freezes-during-numpy-test/m-p/1158835#M27783</guid>
      <dc:creator>mvrht__u3425923</dc:creator>
      <dc:date>2018-03-30T06:56:00Z</dc:date>
    </item>
  </channel>
</rss>

