<?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 looking at your example - you in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067167#M21973</link>
    <description>&lt;P&gt;looking at your example - you allocate the working arrays at the stack. That's the problem. Pls &amp;nbsp;allocate the working arrays dynamically. there are many ways to do that. you may try to use mkl_malloc ( *, *) routine.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2016 08:47:48 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2016-02-11T08:47:48Z</dc:date>
    <item>
      <title>segfault: adapted code from mkl 11.3.0 example, LLS routine: lapacke_sgels_row.c</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067164#M21970</link>
      <description>the attached code is just simply modified matrix size from original example: size of matrix and how they are initialized.
--the size: M, N and NRHS: 15000 150 1

when build with options from: &lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor" target="_blank"&gt;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor&lt;/A&gt;, as:
 gcc  -DMKL_ILP64 -m64 -I${MKLROOT}/include lapacke_sgels_row.c   -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lpthread -lm

run 
./a.out
Segmentation fault (core dumped)

but it builds and runs ok if change the size: M,N,NRHS  to: 14000 140 1

there is no extra dynamic memory allocation, no out-of bound array/matrix access in the source code. 
Does the sgels routine have any size limit?

--------note:
the mkl build used:
    Major version:           11
    Minor version:           3
   Update version:          0
   Product status:          Product
   Build:                   20150730
   Platform:                Intel(R) 64 architecture
   Processor optimization:  Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) enabled processors

the gcc used:
   gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
  Copyright (C) 2013 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

the MKLROOT and LD_LIBRARY_PATH have been set as default based on installation:
    export MKLROOT=/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl
    export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64</description>
      <pubDate>Tue, 09 Feb 2016 21:41:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067164#M21970</guid>
      <dc:creator>jinming_g_</dc:creator>
      <dc:date>2016-02-09T21:41:07Z</dc:date>
    </item>
    <item>
      <title>note: it doesn't seem due to</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067165#M21971</link>
      <description>note: it doesn't seem due to memory limit of the computer: on one Linux box, run
cat /proc/meminfo
there is still &amp;gt;1GB memory free/available</description>
      <pubDate>Tue, 09 Feb 2016 22:26:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067165#M21971</guid>
      <dc:creator>jinming_g_</dc:creator>
      <dc:date>2016-02-09T22:26:12Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt; Does the sgels routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067166#M21972</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.4px;"&gt;&amp;gt;&amp;gt; Does the sgels routine have any size limit? &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.4px;"&gt;no, sgels doesn't have limit for such tiny case. We will check the case on our side.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 04:07:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067166#M21972</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2016-02-10T04:07:00Z</dc:date>
    </item>
    <item>
      <title>looking at your example - you</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067167#M21973</link>
      <description>&lt;P&gt;looking at your example - you allocate the working arrays at the stack. That's the problem. Pls &amp;nbsp;allocate the working arrays dynamically. there are many ways to do that. you may try to use mkl_malloc ( *, *) routine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 08:47:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067167#M21973</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2016-02-11T08:47:48Z</dc:date>
    </item>
    <item>
      <title>Thanks  Gennady Fedorov!</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067168#M21974</link>
      <description>Thanks  Gennady Fedorov!
yeah, the default stack size isn't enough for such array allocation -- problem solved.</description>
      <pubDate>Thu, 11 Feb 2016 18:29:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/segfault-adapted-code-from-mkl-11-3-0-example-LLS-routine/m-p/1067168#M21974</guid>
      <dc:creator>jinming_g_</dc:creator>
      <dc:date>2016-02-11T18:29:22Z</dc:date>
    </item>
  </channel>
</rss>

