<?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: Re:Error svd result is different between singlethread and multithreads in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1505395#M34824</link>
    <description>&lt;P&gt;As you compare the output results by md5sum hash function, I ques you would like to have bit to bit outputs.&lt;/P&gt;
&lt;P&gt;It is not possible with the current version of MKL for ?gesdd routine.&lt;/P&gt;
&lt;P&gt;MKL doesn’t guarantee that results are identical under normal (non-CNR) mode.&lt;/P&gt;
&lt;P&gt;Please check MKL Developer Guide follow this link: &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-0/reproducibility-conditions.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-0/reproducibility-conditions.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With CNR mode you could obtain the same results from run to run with some conditions and one of such conditions is using the same number of OpenMP threads from run to run.&lt;/P&gt;
&lt;P&gt;Therefore, applying sequential and multithreaded modes You will not obtain exactly the same results from run – to – run.&lt;/P&gt;
&lt;P&gt;-Gennady&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2023 12:28:30 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2023-07-17T12:28:30Z</dc:date>
    <item>
      <title>Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1501546#M34757</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;I use&amp;nbsp;LAPACKE_zgesdd(LAPACK_ROW_MAJOR, 'A', m, n, a, n, s, u, m, v, n) compute svd for a matrix.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;But the result is different between singlethread and multithreads. I compute md5 for the result. They are all different.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I try mkl version 2023.1, 2021.4 &amp;amp; 2022.1, all of these have this error.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/43180iEB7AD4B73F5945B5/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="picture1.PNG" alt="picture1.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 02:18:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1501546#M34757</guid>
      <dc:creator>xlds1994</dc:creator>
      <dc:date>2023-07-04T02:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1501547#M34758</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;my code and CMakeLists are here&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;#include &amp;lt;mkl.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;#include &amp;lt;iostream&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;#include &amp;lt;fstream&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;#include &amp;lt;istream&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;#include &amp;lt;complex&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;using namespace std;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;int main(){&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;int inputsize=41*41;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;ifstream input("input.svd");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;complex&amp;lt;double&amp;gt;* svndinput=(complex&amp;lt;double&amp;gt;*)malloc(inputsize*inputsize*sizeof(complex&amp;lt;double&amp;gt;));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;input.read((char*)svndinput, inputsize*inputsize*sizeof(complex&amp;lt;double&amp;gt;));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;input.close();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;int m=inputsize;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;int n=inputsize;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;complex&amp;lt;double&amp;gt;* a=svndinput;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;complex&amp;lt;double&amp;gt;* u=new complex&amp;lt;double&amp;gt;[inputsize*inputsize]();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;complex&amp;lt;double&amp;gt;* v=new complex&amp;lt;double&amp;gt;[inputsize*inputsize]();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;double* s=new double[inputsize]();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;typedef lapack_complex_double lcd;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;auto result=LAPACKE_zgesdd(LAPACK_ROW_MAJOR, 'A', m, n, (lcd*)a, n, (double*)s, (lcd*)u, m, (lcd*)v, n);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;cout&amp;lt;&amp;lt;"result: "&amp;lt;&amp;lt;result&amp;lt;&amp;lt;endl;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;ofstream saves("s.svd");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;saves.write((char*)s, inputsize*sizeof(s[0]));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;saves.flush();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;saves.close();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;ofstream savev("v.svd");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;savev.write((char*)v, inputsize*inputsize*sizeof(v[0]));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;savev.flush();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;savev.close();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;return 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;CMakeLists&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;project (Demo2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;add_compile_options(-fPIC)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;SET(INTEL_MKL_INSTALL_DIR "/opt/intel/oneapi/mkl/latest")&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;SET(MKL_LINK static)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;find_package(MKL PATHS /opt/intel/oneapi/mkl/latest NO_DEFAULT_PATH)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;INCLUDE_DIRECTORIES(/home/grp4data/anaconda3/envs/smitopc20221111/include)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;INCLUDE_DIRECTORIES(${MKL_INCLUDE})&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;add_executable(testsvd main.cpp)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;target_link_libraries(testsvd $&amp;lt;LINK_ONLY:MKL::MKL&amp;gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 02:19:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1501547#M34758</guid>
      <dc:creator>xlds1994</dc:creator>
      <dc:date>2023-07-04T02:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1503157#M34789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel communities. We have run the shared files and have generated the testsvd, s.svd, v.svd files which results 0 as mentioned below. Could please let us know the actual vs expected results of your issue? In addition, We could see an input.svd being generated at your end which was not generated in our environment. Could you please let us know the significance of that file? It would be a great help if you provide if (if it was missing here)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-- Configuring done&lt;/P&gt;
&lt;P&gt;-- Generating done&lt;/P&gt;
&lt;P&gt;-- Build files have been written to: /home/&amp;lt;uname&amp;gt;/shan/mkl/05907190/build&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scanning dependencies of target testsvd&lt;/P&gt;
&lt;P&gt;[ 50%] Building CXX object CMakeFiles/testsvd.dir/main.cpp.o&lt;/P&gt;
&lt;P&gt;[100%] Linking CXX executable testsvd&lt;/P&gt;
&lt;P&gt;[100%] Built target testsvd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;path:~/shan/mkl/05907190/build$ taskset 0xFF ./testsvd&lt;/P&gt;
&lt;P&gt;result: 0&lt;/P&gt;
&lt;P&gt;path:~/shan/mkl/05907190/build$ taskset 0x3 ./testsvd&lt;/P&gt;
&lt;P&gt;result: 0&lt;/P&gt;
&lt;P&gt;path:~/shan/mkl/05907190/build$ taskset 0xF ./testsvd&lt;/P&gt;
&lt;P&gt;result: 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 17:35:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1503157#M34789</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-11T17:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1503216#M34793</link>
      <description>&lt;P&gt;I put demo.tar.gz in attachment, when you&amp;nbsp;&lt;SPAN&gt;decompress it, you will see main.cpp CMakeLists.txt and input.svd. Then you should&amp;nbsp;compile them use cmake. And then, you should put 'input.svd' and executable file 'testsvd' in same dir.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;cout result 0 means the svd is successful.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please use 'taskset 0x01 ./testsvd ' to execute 'testsvd', it means use one cpu for this&amp;nbsp;executable. then you will get the output s.svd and v.svd, please use md5sum compute the md5 of these file and remeber these.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then use 'taskset 0x03 ./testsvd ' to execute 'testsvd', it means use two cpu for this&amp;nbsp;executable.&amp;nbsp;then you will get the output s.svd and v.svd, please use md5sum compute the md5 of these file and remeber these.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you will find the result s.svd and v.svd between twice commend are different. you can see the result I had tried before in the&amp;nbsp;first floor image.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I try 1,2,4,8 thread for&amp;nbsp;LAPACKE_zgesdd, the result are all different. I think this is a serious bug.&amp;nbsp;For a parallel computing library, the first thing to ensure is that the result is exactly the same as a single thread.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you think my description is not clear enough, please contact me in time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 15:36:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1503216#M34793</guid>
      <dc:creator>xlds1994</dc:creator>
      <dc:date>2023-07-10T15:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1505395#M34824</link>
      <description>&lt;P&gt;As you compare the output results by md5sum hash function, I ques you would like to have bit to bit outputs.&lt;/P&gt;
&lt;P&gt;It is not possible with the current version of MKL for ?gesdd routine.&lt;/P&gt;
&lt;P&gt;MKL doesn’t guarantee that results are identical under normal (non-CNR) mode.&lt;/P&gt;
&lt;P&gt;Please check MKL Developer Guide follow this link: &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-0/reproducibility-conditions.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-0/reproducibility-conditions.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With CNR mode you could obtain the same results from run to run with some conditions and one of such conditions is using the same number of OpenMP threads from run to run.&lt;/P&gt;
&lt;P&gt;Therefore, applying sequential and multithreaded modes You will not obtain exactly the same results from run – to – run.&lt;/P&gt;
&lt;P&gt;-Gennady&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 12:28:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1505395#M34824</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2023-07-17T12:28:30Z</dc:date>
    </item>
    <item>
      <title>Re:Error svd result is different between singlethread and multithreads</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1508414#M34871</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A gentle reminder:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Has the information provided helped? If this resolves your issue, please accept this as a solution. It would help other users with similar issues. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jul 2023 14:54:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Error-svd-result-is-different-between-singlethread-and/m-p/1508414#M34871</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-07-26T14:54:47Z</dc:date>
    </item>
  </channel>
</rss>

