<?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: Different numerical answers when calling mkl_set_num_thread in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895104#M10814</link>
    <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Tony,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;You mention a slow down if you do not set MKL to run on only one thread. How many cores are there per processor? How many threads are used in each of the two executables, and are you running two instances of the same program or two different executables. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I ask because Abhimentions your slow down and I can imagine a number of scenarios where MKL creates more threads than you would want because it can not know what else you have running on the system.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Todd&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2008 22:21:26 GMT</pubDate>
    <dc:creator>Todd_R_Intel</dc:creator>
    <dc:date>2008-04-30T22:21:26Z</dc:date>
    <item>
      <title>Different numerical answers when calling mkl_set_num_threads (1)?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895100#M10810</link>
      <description>&lt;P&gt;We are using MKL for some scientific computations and have just put a call to &lt;FONT color="#008000" size="2"&gt;mkl_set_num_threads ( 1 ) &lt;FONT color="#000000" size="3"&gt;in our product (because we found that running 2 executables on a dual processor machine similtaneouslywas about twice as slow without the call). However, the numberswe are getting are now slightly different to before. So, the question is: does setting the number of threads to1 change the numerics of the LAPACKand/or BLAS routines?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Tony&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2008 19:54:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895100#M10810</guid>
      <dc:creator>Tony_Garratt</dc:creator>
      <dc:date>2008-04-30T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895101#M10811</link>
      <description>&lt;P&gt;Changing the number ofcomputational threads may change the numerical characteristics,see this paragraph in the MKL user's guide:&lt;/P&gt;
&lt;P&gt;If linear algebra routines (LAPACK, BLAS) are applied to inputs that are bit-for-bit identical but the arrays are differently aligned or the computations are performed either on different platforms or with different numbers of threads, the outputs may not be bit-for-bit identical, though they will deviate within the appropriate error bounds. The Intel MKL version may also affect numerical stability of the output, as the routines may be implemented differently in different versions.&lt;/P&gt;
&lt;P&gt;-Shane&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2008 20:20:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895101#M10811</guid>
      <dc:creator>Shane_S_Intel</dc:creator>
      <dc:date>2008-04-30T20:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895102#M10812</link>
      <description>I believe the part of the question pertains to "slow down" by a factor of two when not using 1 thread. Based on the documentation and previous posts, I can see potential for slight differences in the numerics when no. of threads, alignment etc are not identical. But I am confused why does it translate to the big penalty in computational time.&lt;BR /&gt;&lt;BR /&gt;Abhi&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Apr 2008 21:13:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895102#M10812</guid>
      <dc:creator>abhimodak</dc:creator>
      <dc:date>2008-04-30T21:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895103#M10813</link>
      <description>&lt;P&gt;Thank you for that. The documentation really needs to have this paragraph up front in getting started....&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2008 21:15:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895103#M10813</guid>
      <dc:creator>Tony_Garratt</dc:creator>
      <dc:date>2008-04-30T21:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895104#M10814</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Tony,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;You mention a slow down if you do not set MKL to run on only one thread. How many cores are there per processor? How many threads are used in each of the two executables, and are you running two instances of the same program or two different executables. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I ask because Abhimentions your slow down and I can imagine a number of scenarios where MKL creates more threads than you would want because it can not know what else you have running on the system.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Todd&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2008 22:21:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895104#M10814</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-04-30T22:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895105#M10815</link>
      <description>Hi Todd&lt;BR /&gt;&lt;BR /&gt;Let's put it this way:&lt;BR /&gt;&lt;BR /&gt;(1) I have single processor dual core computer (like most sold these days).&lt;BR /&gt;(2) Number of threads setting for MKL is left untouched when I build my executable.&lt;BR /&gt;(3) I am running two instances of the same executable but using two Java threads.&lt;BR /&gt;&lt;BR /&gt;Suppose I get time = t2 for each job. (The jobs are identical i.e. same input file and generates same output.)&lt;BR /&gt;&lt;BR /&gt;Now I run only 1 instance of the executable and get time = t1. (i.e. I run only one job.)&lt;BR /&gt;&lt;BR /&gt;What would be the relation between t1 and t2? I would like to see t1 = t2. But I am afraid that Tony is getting t2 approximately 2 times t1. That would be make me quite worried. Should I change the number of threads with MKL? I am concerned as it has danger of making my parallelization and/or having more than one processor useless.&lt;BR /&gt;&lt;BR /&gt;May be am just hitting the panic button too early...&lt;BR /&gt;&lt;BR /&gt;Abhi&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2008 00:02:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895105#M10815</guid>
      <dc:creator>abhimodak</dc:creator>
      <dc:date>2008-05-01T00:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895106#M10816</link>
      <description>If you are parallelizing outside MKL, and using all available cores by starting multiple MKL copies, you probably don't want to permit each MKL copy to start multiple threads. &lt;BR /&gt;Assuming you don't want threaded MKL, the safer way is to set up non-threaded MKL (mkl_sequential library in MKL 10).&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2008 00:32:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895106#M10816</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-05-01T00:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Different numerical answers when calling mkl_set_num_thread</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895107#M10817</link>
      <description>&lt;FONT face="Arial"&gt; MKL detects the number of cores on the system and by default will use that many threads (there are some nuances to this and we've updated the process used to determine the right number of threads in Update 3, but this is basically true). &lt;BR /&gt;&lt;BR /&gt;So if you're calling MKL from 2 threads and each MKL call uses 2 threads you'll have 4 MKL threads competing for two cores. Even though you're doing the same amount of work as the case were 1 app thread calls MKL to generate 2 threads, the cost of swapping threads in and out will significantly effect your performance. &lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 01 May 2008 18:01:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Different-numerical-answers-when-calling-mkl-set-num-threads-1/m-p/895107#M10817</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-05-01T18:01:36Z</dc:date>
    </item>
  </channel>
</rss>

