<?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 segfault when using heevr from lapack95 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-when-using-heevr-from-lapack95/m-p/1121612#M25003</link>
    <description>&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;'m trying to use the heevr routine from lapack95 in fortran, but I'm getting segfault. I'm using the&amp;nbsp;parallel studio xe 2016 composer edition for fortran update3. Here is a sample code, which shows the problem:&lt;/P&gt;

&lt;PRE class="brush:;" style="line-height: 19.51px; font-size: 13px;"&gt;program test
use lapack95
implicit none

integer, parameter:: dp=kind(0.d0)

complex(dp), allocatable :: A(:,:)
real(dp), allocatable :: w(:)
integer :: n

n=20
allocate(A(n,n))
allocate(w(n))
A(:,:) = 0_dp

call heevr(A,w)

end program&lt;/PRE&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;I use the following command to compile:&amp;nbsp;&lt;/P&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;ifort test.f90 -heap-arrays &amp;nbsp;-check all -warn all -g -traceback -I${MKLROOT}/include/intel64/lp64 -I${MKLROOT}/include &amp;nbsp;${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl -o test.x&lt;/P&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;It complies fine, but when I run it a segmentation fault occurs:&lt;/P&gt;

&lt;PRE class="brush:;" style="line-height: 19.51px; font-size: 13px;"&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
test.x             0000000000C404E6  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown
test.x             0000000000C3FBEF  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown
&lt;/PRE&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;The segmentation fault does not occur if n&amp;lt;11 or if I use heevd instead of heevr. The stack size is set to unlimited.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Jul 2016 07:41:08 GMT</pubDate>
    <dc:creator>jakub_z_</dc:creator>
    <dc:date>2016-07-10T07:41:08Z</dc:date>
    <item>
      <title>segfault when using heevr from lapack95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-when-using-heevr-from-lapack95/m-p/1121612#M25003</link>
      <description>&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;'m trying to use the heevr routine from lapack95 in fortran, but I'm getting segfault. I'm using the&amp;nbsp;parallel studio xe 2016 composer edition for fortran update3. Here is a sample code, which shows the problem:&lt;/P&gt;

&lt;PRE class="brush:;" style="line-height: 19.51px; font-size: 13px;"&gt;program test
use lapack95
implicit none

integer, parameter:: dp=kind(0.d0)

complex(dp), allocatable :: A(:,:)
real(dp), allocatable :: w(:)
integer :: n

n=20
allocate(A(n,n))
allocate(w(n))
A(:,:) = 0_dp

call heevr(A,w)

end program&lt;/PRE&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;I use the following command to compile:&amp;nbsp;&lt;/P&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;ifort test.f90 -heap-arrays &amp;nbsp;-check all -warn all -g -traceback -I${MKLROOT}/include/intel64/lp64 -I${MKLROOT}/include &amp;nbsp;${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl -o test.x&lt;/P&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;It complies fine, but when I run it a segmentation fault occurs:&lt;/P&gt;

&lt;PRE class="brush:;" style="line-height: 19.51px; font-size: 13px;"&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
test.x             0000000000C404E6  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown
test.x             0000000000C3FBEF  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown
&lt;/PRE&gt;

&lt;P style="line-height: 19.51px; font-size: 13px;"&gt;The segmentation fault does not occur if n&amp;lt;11 or if I use heevd instead of heevr. The stack size is set to unlimited.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2016 07:41:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-when-using-heevr-from-lapack95/m-p/1121612#M25003</guid>
      <dc:creator>jakub_z_</dc:creator>
      <dc:date>2016-07-10T07:41:08Z</dc:date>
    </item>
  </channel>
</rss>

