<?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:Segmentation Fault in poisson solver (mixing C &amp;amp; C++ Problem) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1519610#M35017</link>
    <description>&lt;P&gt;I added -DMKL_ILP64 in the compile flag and it works&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 07:30:59 GMT</pubDate>
    <dc:creator>zudol0104</dc:creator>
    <dc:date>2023-09-01T07:30:59Z</dc:date>
    <item>
      <title>Segmentation Fault in poisson solver (mixing C &amp; C++ Problem)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1515974#M34968</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I'm trying to embed MKL's Poisson solver in my own C++ code. I even succeeded in building &amp;amp; running the example included in the MKL Library, but the problem is that when I try to use it in my C++ code, I get a Segmentation Fault.&lt;BR /&gt;My code consists of 3 files.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - d_Helmholtz_3D_c.h&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - d_Helmholtz_3D_c.c&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - main.cc&lt;/P&gt;&lt;P&gt;Where , "d_Helmholtz_3D_c.c " is a slight modification of the example file.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;int main() -&amp;gt; void poisson()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"d_Helmholtz_3D_c.h" is as follows&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;#ifndef __D_HELMHOLTZ_3D_C_HH&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#define __D_HELMHOLTZ_3D_C_HH&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;void poisson();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"main.cc" is as follows&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;#include &amp;lt;iostream&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;extern "C" {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#include "d_Helmholtz_3D_c.h"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;int main() {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;using std::cout;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;using std::endl;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;cout &amp;lt;&amp;lt; "Main" &amp;lt;&amp;lt; endl;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;poisson();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;return 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CMakeLists.txt is as follows&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;cmake_minimum_required (VERSION 3.16.2)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;enable_testing()&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;set(CMAKE_C_COMPILER icc)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set(CMAKE_CXX_COMPILER icpc)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;project (oneMKL_Example)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set(MKL_ROOT /my/dir/intel-oneAPI/mkl/latest/)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;list(APPEND CMAKE_MODULE_PATH "MKL_ROOT/lib/cmake")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;find_package(MKL CONFIG REQUIRED)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;add_executable(myapp main.cc)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;target_link_libraries(myapp PUBLIC poisson)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;add_library(poisson d_Helmholtz_3D_c.c)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;# add_executable(myapp d_Helmholtz_3D_c.c)&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;target_compile_options(myapp PUBLIC $&amp;lt;TARGET_PROPERTY:MKL::MKL,INTERFACE_COMPILE_OPTIONS&amp;gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;target_include_directories(myapp PUBLIC $&amp;lt;TARGET_PROPERTY:MKL::MKL,INTERFACE_INCLUDE_DIRECTORIES&amp;gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;target_link_libraries(myapp PUBLIC $&amp;lt;LINK_ONLY:MKL::MKL&amp;gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The mkl version checked with mkl_get_version() is as follows.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Major version: 2021&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Minor version: 0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Update version: 2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Product status: Product&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Build: 20210312&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Platform: Intel(R) 64 architecture&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Processor optimization: Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why on earth would a segmentation fault occur?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 08:05:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1515974#M34968</guid>
      <dc:creator>zudol0104</dc:creator>
      <dc:date>2023-08-21T08:05:20Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation Fault in poisson solver (mixing C &amp; C++ Problem)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1516909#M34989</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for sharing the detailed steps. It is always recommended to use the latest version of oneMKL. Hence, could you please try the latest oneMKL (2023.2), and let us know if the issue persists? We are looking into your issue. We will get back to you soon with an update.&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;BR /&gt;</description>
      <pubDate>Wed, 23 Aug 2023 17:32:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1516909#M34989</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-08-23T17:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault in poisson solver (mixing C &amp; C++ Problem)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1519008#M35005</link>
      <description>&lt;P&gt;Hi June,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We could see a segmentation fault occurring at the "d_commit_Helmholtz_3D" step of the d_Helmholtz_3D_c.c file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please add the -DMKL_ILP64 in the compile flag and let us know if the issue persists?&lt;/SPAN&gt;&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>Wed, 06 Sep 2023 03:40:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1519008#M35005</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-09-06T03:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation Fault in poisson solver (mixing C &amp; C++ Problem)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1519610#M35017</link>
      <description>&lt;P&gt;I added -DMKL_ILP64 in the compile flag and it works&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 07:30:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1519610#M35017</guid>
      <dc:creator>zudol0104</dc:creator>
      <dc:date>2023-09-01T07:30:59Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation Fault in poisson solver (mixing C &amp; C++ Problem)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1520223#M35033</link>
      <description>&lt;P&gt;Hi June,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It’s great to know that the issue has been resolved, in case you run into any other issues please feel free to create a new thread.&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;BR /&gt;</description>
      <pubDate>Mon, 04 Sep 2023 10:10:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-Fault-in-poisson-solver-mixing-C-amp-C-Problem/m-p/1520223#M35033</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2023-09-04T10:10:18Z</dc:date>
    </item>
  </channel>
</rss>

