<?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 Compiling with O3 giving segmentation fault in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Compiling-with-O3-giving-segmentation-fault/m-p/1070235#M5278</link>
    <description>&lt;P&gt;I am getting a segmentation fault while executing a MPI+OpneMP program compiled with O3 flag. Sample program structure is given below&lt;/P&gt;

&lt;P&gt;int main()&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;//MPI init&lt;/P&gt;

&lt;P&gt;if(rank == 0)&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Master();&lt;/P&gt;

&lt;P&gt;else&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Worker();&lt;/P&gt;

&lt;P&gt;printf("\n Finalize MPI");&lt;/P&gt;

&lt;P&gt;//MPI finalize&lt;/P&gt;

&lt;P&gt;return 0;&lt;/P&gt;

&lt;P&gt;}//End of main&lt;/P&gt;

&lt;P&gt;void Master()&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;//Some computations&lt;/P&gt;

&lt;P&gt;printf("\n Exiting master");&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;void Worker()&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;{&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;//Some computations&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;printf("\n Exiting worker");&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;when i execute this program compiled with O3, i am getting a segmentation fault after execution of last statement of master/worker function (printf in this case) and before "finalize mpi" printf statement in main.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;But when i try to execute the same program compiled with O3 and traceback flag, i am not getting any sort of error.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am using a mpiicpc for compilation of the program. Both 2015 and 2016 compiler version has been used for compilation but the same problem comes.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Please help me to resolve this problem.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Regards,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Ashutosh S. Londhe&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 06:38:04 GMT</pubDate>
    <dc:creator>Londhe__Ashutosh</dc:creator>
    <dc:date>2017-03-30T06:38:04Z</dc:date>
    <item>
      <title>Compiling with O3 giving segmentation fault</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Compiling-with-O3-giving-segmentation-fault/m-p/1070235#M5278</link>
      <description>&lt;P&gt;I am getting a segmentation fault while executing a MPI+OpneMP program compiled with O3 flag. Sample program structure is given below&lt;/P&gt;

&lt;P&gt;int main()&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;//MPI init&lt;/P&gt;

&lt;P&gt;if(rank == 0)&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Master();&lt;/P&gt;

&lt;P&gt;else&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Worker();&lt;/P&gt;

&lt;P&gt;printf("\n Finalize MPI");&lt;/P&gt;

&lt;P&gt;//MPI finalize&lt;/P&gt;

&lt;P&gt;return 0;&lt;/P&gt;

&lt;P&gt;}//End of main&lt;/P&gt;

&lt;P&gt;void Master()&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;//Some computations&lt;/P&gt;

&lt;P&gt;printf("\n Exiting master");&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;void Worker()&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;{&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;//Some computations&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;printf("\n Exiting worker");&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;when i execute this program compiled with O3, i am getting a segmentation fault after execution of last statement of master/worker function (printf in this case) and before "finalize mpi" printf statement in main.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;But when i try to execute the same program compiled with O3 and traceback flag, i am not getting any sort of error.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am using a mpiicpc for compilation of the program. Both 2015 and 2016 compiler version has been used for compilation but the same problem comes.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Please help me to resolve this problem.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Regards,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Ashutosh S. Londhe&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 06:38:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Compiling-with-O3-giving-segmentation-fault/m-p/1070235#M5278</guid>
      <dc:creator>Londhe__Ashutosh</dc:creator>
      <dc:date>2017-03-30T06:38:04Z</dc:date>
    </item>
  </channel>
</rss>

