<?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 in the case   #pragma omp in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956490#M15528</link>
    <description>&lt;P&gt;in the case&amp;nbsp;&amp;nbsp; #pragma omp parallel, h&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ave you use private clauses for input arrays?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2014 05:05:10 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2014-01-14T05:05:10Z</dc:date>
    <item>
      <title>openmp &amp; mkl: getri inside $omp do trouble</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956487#M15525</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I'm using IVF Compiler 11.0.066 and MKL 10.1&lt;/P&gt;

&lt;P&gt;So, I have this subroutine which is called from parallel $omp do cycle. In this subroutine I calculate inverse of a matrix, like this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call getrf(Matrix, ipiv)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; call getri(Matrix, ipiv)&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;everything works great in sequential execution, but when there are more than one thread application crashes at call getri(Matrix, ipiv) with exceptions like "heap corruption" or "access violation"&lt;/P&gt;

&lt;P&gt;when I modify this code like this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call getrf(Matrix, ipiv)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp critical&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; call getri(Matrix, ipiv)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; !$omp end critical&lt;/P&gt;

&lt;P&gt;everything works in parallel execution, but obviously this is a bad solution&lt;/P&gt;

&lt;P&gt;why this is happening and how should I change my code to make it work without $critical section?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2014 13:58:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956487#M15525</guid>
      <dc:creator>teanku</dc:creator>
      <dc:date>2014-01-11T13:58:27Z</dc:date>
    </item>
    <item>
      <title>and the save problem with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956488#M15526</link>
      <description>&lt;P&gt;and the save problem with syevd, which I need to calculate eigenvalues/eigenvectors :(&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 09:55:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956488#M15526</guid>
      <dc:creator>teanku</dc:creator>
      <dc:date>2014-01-13T09:55:30Z</dc:date>
    </item>
    <item>
      <title>Did you try suggestions in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956489#M15527</link>
      <description>&lt;P&gt;Did you try suggestions in references on this subject, including adjustments to shell stacksize and OMP_STACKSIZE, as well as ifort -heap-arrays? &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 19:16:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956489#M15527</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-01-13T19:16:00Z</dc:date>
    </item>
    <item>
      <title>in the case   #pragma omp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956490#M15528</link>
      <description>&lt;P&gt;in the case&amp;nbsp;&amp;nbsp; #pragma omp parallel, h&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ave you use private clauses for input arrays?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 05:05:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956490#M15528</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-01-14T05:05:10Z</dc:date>
    </item>
    <item>
      <title>Quote:Gennady Fedorov (Intel)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956491#M15529</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gennady Fedorov (Intel) wrote:&lt;BR /&gt;&lt;BR /&gt;
	in the case&amp;nbsp;&amp;nbsp; #pragma omp parallel, have you use private clauses for input arrays?&lt;BR /&gt;
	&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;It is my understanding that every local variable in subroutine which being called from parallel section is private anyway, no?&lt;/P&gt;

&lt;P&gt;roughly, my code looks like&lt;/P&gt;

&lt;P&gt;[fortran] $omp parallel default(shared)&amp;amp;&lt;BR /&gt;
	!$omp private(private_vars)&lt;BR /&gt;
	&lt;BR /&gt;
	!$omp do schedule(static,1)&lt;BR /&gt;
	do i=1,10&lt;BR /&gt;
	call work(private_vars,shared_vars)&lt;BR /&gt;
	end do&lt;BR /&gt;
	!$omp end do&lt;BR /&gt;
	!$omp end parallel&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	subroutine work(private_vars, shared_vars)&lt;BR /&gt;
	...&lt;BR /&gt;
	!local variables&lt;BR /&gt;
	real Matrix(n,n)&lt;BR /&gt;
	integer ipiv(n)&lt;BR /&gt;
	&lt;BR /&gt;
	call getrf(Matrix, ipiv)&lt;BR /&gt;
	call getri(Matrix, ipiv)&lt;BR /&gt;
	end subroutine work&lt;BR /&gt;
	&lt;BR /&gt;
	[/fortran]&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 10:04:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956491#M15529</guid>
      <dc:creator>teanku</dc:creator>
      <dc:date>2014-01-14T10:04:31Z</dc:date>
    </item>
    <item>
      <title>I managed to avoid this</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956492#M15530</link>
      <description>&lt;P&gt;I managed to avoid this problem by using FORTRAN77 interface for getrf/getri/syevd&lt;/P&gt;

&lt;P&gt;anyway this is strange when usage of F90/95 interfaces leads to appcrash&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 10:08:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/openmp-mkl-getri-inside-omp-do-trouble/m-p/956492#M15530</guid>
      <dc:creator>teanku</dc:creator>
      <dc:date>2014-01-14T10:08:18Z</dc:date>
    </item>
  </channel>
</rss>

