<?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 There is advice at: in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036299#M20431</link>
    <description>&lt;P&gt;There is advice at:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/computing-2d-and-3d-trigonometric-transforms-using-the-1d-transform-in-intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/articles/computing-2d-and-3d-trigonometric-transforms-using-the-1d-transform-in-intel-mkl&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2014 16:00:54 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2014-10-27T16:00:54Z</dc:date>
    <item>
      <title>wrong result when using openmp with DCT</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036298#M20430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to use openmp with DCT transform to speedup the performance. The program works fine when I set omp_num_threads=1, when I set it to &amp;gt;1, I can see the CPU load is doubled but the result is wrong. Below is the code snippet. Could anyone help me out?&lt;/P&gt;

&lt;P&gt;======================================================================&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;! prepare for DCTs
call d_init_trig_transform(nx-1,MKL_COSINE_TRANSFORM,ipar,dpar,ir)
call d_commit_trig_transform(alpha(:,1),handle,ipar,dpar,ir)

! forward transform
!$OMP PARALLEL DO
do i = 1,ny,1
    call d_forward_trig_transform(alpha(:,i),handle,ipar,dpar,ir)              
end do
!$OMP END PARALLEL DO

! SOME PROCESSING IN FREQUENCY DOMAIN

! inverse transform
!$OMP PARALLEL DO
do i = 1,ny,1
    call d_backward_trig_transform(alpha(:,i),handle,ipar,dpar,ir)
end do
!$OMP END PARALLEL DO

! clean up transform
call free_trig_transform(handle,ipar,ir)&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 15:44:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036298#M20430</guid>
      <dc:creator>Bo_Q_</dc:creator>
      <dc:date>2014-10-27T15:44:28Z</dc:date>
    </item>
    <item>
      <title>There is advice at:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036299#M20431</link>
      <description>&lt;P&gt;There is advice at:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/computing-2d-and-3d-trigonometric-transforms-using-the-1d-transform-in-intel-mkl" target="_blank"&gt;https://software.intel.com/en-us/articles/computing-2d-and-3d-trigonometric-transforms-using-the-1d-transform-in-intel-mkl&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 16:00:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036299#M20431</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-10-27T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Thanks!</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036300#M20432</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;After reading the document, it seems like I have to set&amp;nbsp;ipar(9) = nthread (I also tried &lt;SPAN style="font-size: 13.3333330154419px; line-height: 13.0080003738403px;"&gt;ipar(10) = nthread considering I am using Fortran&lt;/SPAN&gt;). But the problem stays the same.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Very interestingly, the same program works fine on a i5-3210m cpu but have the aforementioned problem on a W3680 and a E5-2680 cpu.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Bo&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 16:39:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036300#M20432</guid>
      <dc:creator>Bo_Q_</dc:creator>
      <dc:date>2014-10-27T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Bo, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036301#M20433</link>
      <description>&lt;P&gt;Bo,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;We had the similar problem in the past but we don't see such problem with the latest versions. What MKL version you are using? Could you get us the comprehensive test to check the problem on our side?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 18:40:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036301#M20433</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-10-28T18:40:28Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036302#M20434</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have MKL version 11.0. The Intel software manager in Windows tells me I have the latest version of MKL. The code I have is a pretty complex 3D simulation code. Let me stripping down the unnecessary parts and send the code back to you.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Bo&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 18:59:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036302#M20434</guid>
      <dc:creator>Bo_Q_</dc:creator>
      <dc:date>2014-10-28T18:59:49Z</dc:date>
    </item>
    <item>
      <title>Hi Bo.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036303#M20435</link>
      <description>&lt;P&gt;Hi Bo.&lt;/P&gt;

&lt;P&gt;I would recommend you evaluate one of the latest updated 11.1 ( update 4) or the latest version 11.2 to check if the problem still exists on your side. in the case if you will see the problem with these latest versions, then, please give us the standalone test for further investigating.&lt;/P&gt;

&lt;P&gt;--Gennady&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2014 06:36:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/wrong-result-when-using-openmp-with-DCT/m-p/1036303#M20435</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-10-29T06:36:36Z</dc:date>
    </item>
  </channel>
</rss>

