<?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 Intel OneAPI MKL Scalapack call gives segmentation fault in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377292#M33045</link>
    <description>&lt;P&gt;Hi, I am attempting to compile/run a test code using the oneAPI MKL Scalapack build. I am able to run a similar version of the code using native Scalapack (build from netlib using non mkl libraries) and MPICH. For the oneAPI variant, I changed the header files and some data types from int to MKL_INT in order to get it to compile. The BLACS interface works as it does properly assign the processor grid and allocate the local arrays. However, the code returns a segmentation fault during runtime when calling the pdgbtrf subroutine.&lt;/P&gt;
&lt;P&gt;I have attached four files. The &lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;ScalapackExample_PDGBTRF.cpp&lt;/SPAN&gt;&amp;nbsp; and &lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;OutputFromScalapackExample.txt is the code and correct output from the code when running native (non-mkl) ScaLapack. The other two files: &lt;/SPAN&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;ScaLapackSimple.cpp&amp;nbsp; and ErrorLog.txt is the code and its output for the oneAPI version. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;For the oneAPI version, I used only oneAPI tools (libraries and compilers) and compiled using:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;mpiicc ScaLapackSimple.cpp -o ScaLapackSimple -DMKL_ILP64 -qmkl=sequential -L${MKLROOT}/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64 -lpthread -lm -ldl&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;The example code is hard coded to run on 3 processors so I run it using:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;mpirun -np 3 ScaLapackSimple &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;Is there more changes I need to make to use the oneAPI Scalapack build compared to native Scalapack?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Additional information: I am running on Ubuntu 20.04.4 LTS to test this code.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;Thank you in advanced!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Apr 2022 01:39:37 GMT</pubDate>
    <dc:creator>OUKevinM</dc:creator>
    <dc:date>2022-04-15T01:39:37Z</dc:date>
    <item>
      <title>Intel OneAPI MKL Scalapack call gives segmentation fault</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377292#M33045</link>
      <description>&lt;P&gt;Hi, I am attempting to compile/run a test code using the oneAPI MKL Scalapack build. I am able to run a similar version of the code using native Scalapack (build from netlib using non mkl libraries) and MPICH. For the oneAPI variant, I changed the header files and some data types from int to MKL_INT in order to get it to compile. The BLACS interface works as it does properly assign the processor grid and allocate the local arrays. However, the code returns a segmentation fault during runtime when calling the pdgbtrf subroutine.&lt;/P&gt;
&lt;P&gt;I have attached four files. The &lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;ScalapackExample_PDGBTRF.cpp&lt;/SPAN&gt;&amp;nbsp; and &lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;OutputFromScalapackExample.txt is the code and correct output from the code when running native (non-mkl) ScaLapack. The other two files: &lt;/SPAN&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;ScaLapackSimple.cpp&amp;nbsp; and ErrorLog.txt is the code and its output for the oneAPI version. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;For the oneAPI version, I used only oneAPI tools (libraries and compilers) and compiled using:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;mpiicc ScaLapackSimple.cpp -o ScaLapackSimple -DMKL_ILP64 -qmkl=sequential -L${MKLROOT}/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64 -lpthread -lm -ldl&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;The example code is hard coded to run on 3 processors so I run it using:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;mpirun -np 3 ScaLapackSimple &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;Is there more changes I need to make to use the oneAPI Scalapack build compared to native Scalapack?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Additional information: I am running on Ubuntu 20.04.4 LTS to test this code.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation lia-attachment-link lia-link-disabled"&gt;Thank you in advanced!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 01:39:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377292#M33045</guid>
      <dc:creator>OUKevinM</dc:creator>
      <dc:date>2022-04-15T01:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Intel OneAPI MKL Scalapack call gives segmentation fault</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377805#M33046</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please let us know the version of MKL you are using and do you observe the same error when using Intel MKL with MPICH?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please consider using the lp64 instead of ilp64 and try using the below command?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mpiicc ScaLapackSimple.cpp -o ScaLapackSimple -qmkl=sequential -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lpthread -lm -ldl -g&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 11:56:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377805#M33046</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2022-04-18T11:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Intel OneAPI MKL Scalapack call gives segmentation fault</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377822#M33047</link>
      <description>&lt;P&gt;Hi, you are my hero! Using lp64 instead of ilp64 worked like a charm! If you don't mind one more question... what is the difference between the lp64 and ilp64? Do they both handle 64-bit integers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the virtual machine of interest, I have only installed oneAPI to test without any conflicts with other software. I use a separate virutal machine for the native ScaLapack build. Also, I am using version 2022.0.2 for oneAPI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 13:24:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1377822#M33047</guid>
      <dc:creator>OUKevinM</dc:creator>
      <dc:date>2022-04-18T13:24:38Z</dc:date>
    </item>
    <item>
      <title>Re:Intel OneAPI MKL Scalapack call gives segmentation fault</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1378031#M33048</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;I&gt;what is the difference between the lp64 and ilp64?&lt;/I&gt;&lt;/P&gt;&lt;P&gt;The difference between them is integer type length.&lt;/P&gt;&lt;P&gt;The term&amp;nbsp;&lt;B&gt;ILP64&lt;/B&gt;&amp;nbsp;denotes that integer, long, and pointer data entities all occupy&amp;nbsp;&lt;B&gt;8 bytes&lt;/B&gt;&amp;nbsp;whereas in the conventional&amp;nbsp;&lt;B&gt;LP64&lt;/B&gt;&amp;nbsp;model integer entities occupy&amp;nbsp;&lt;B&gt;4 bytes&lt;/B&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;I&gt;Do they both handle 64-bit integers?&lt;/I&gt;&lt;/P&gt;&lt;P&gt;No, the ILP64 interface uses the 64-bit integer type, while LP64 uses the 32-bit integer.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So if you have an application where you are using a large array index that has more than 2^31- 1 elements you could choose ILP64 libraries.&lt;/P&gt;&lt;P&gt;For more details, you can refer to the below link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-linux-developer-guide/top/linking-your-application-with-onemkl/linking-in-detail/linking-with-interface-libraries/using-the-ilp64-interface-vs-lp64-interface.html" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-linux-developer-guide/top/linking-your-application-with-onemkl/linking-in-detail/linking-with-interface-libraries/using-the-ilp64-interface-vs-lp64-interface.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Additionally, you can always take the help of the link line advisor which helps you to find the right set of libraries.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.xto2dm" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.xto2dm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hope this answers your question.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;Using lp64 instead of ilp64 worked like a charm&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Glad to know that it works and thanks for accepting our solution.&lt;/P&gt;&lt;P&gt;If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2022 05:31:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-OneAPI-MKL-Scalapack-call-gives-segmentation-fault/m-p/1378031#M33048</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2022-04-19T05:31:07Z</dc:date>
    </item>
  </channel>
</rss>

