<?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:OpenMP offload hangs if omp_get_num_threads use... in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1193383#M6944</link>
    <description>&lt;P&gt;Sorry the duplicate happened when the new system was flagging everything as SPAM.&amp;nbsp; I was trying to get around the filter then someone "released" all the various attempts.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jul 2020 23:53:38 GMT</pubDate>
    <dc:creator>CFR</dc:creator>
    <dc:date>2020-07-17T23:53:38Z</dc:date>
    <item>
      <title>OpenMP offload hangs if omp_get_num_threads used inside parallel team?</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1189413#M6890</link>
      <description>&lt;P&gt;Lenovo T570, Ubuntu 18.04.4,&amp;nbsp;icpc (ICC) 2021.1 Beta 20200602&lt;/P&gt;
&lt;P&gt;Given the following example code:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;omp.h&amp;gt;
#include &amp;lt;cstdio&amp;gt;

int
main(int argc, char *argv[])
{

  printf("Devices= %d\n", omp_get_num_devices());
  printf("Initial device %d (is initial %c)\n", omp_get_initial_device(), omp_is_initial_device()?'Y':'N');
  printf("Default device %d\n", omp_get_default_device());

//#pragma omp target parallel
//#pragma omp target parallel for
//#pragma omp target teams
//#pragma omp target teams distribute
//#pragma omp target teams distribute parallel for

  for (int i=0; i&amp;lt;8; i++) 
  {
    printf( "%d Team %d of %d, Thread %d of %d\n", i,
        omp_get_team_num(), omp_get_num_teams(),
        omp_get_thread_num(), omp_get_num_threads());
  }
}
&lt;/LI-CODE&gt;
&lt;P&gt;Compiled as follows:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;icpc -std=c++17 -O3 -o bug1 bug1.cpp -qnextgen -fiopenmp -fopenmp-targets=spir64
&lt;/LI-CODE&gt;
&lt;P&gt;Commenting out any of the pragma lines containing "parallel" and the code will hang when executed.&amp;nbsp; The non-"parallel" pragmas work correctly.&amp;nbsp; The problem seems to be omp_get_num_threads().&amp;nbsp; If you remove that from the print statement then all the pragma lines result in execution that works.&lt;/P&gt;
&lt;P&gt;I'm new to this offloading part of OpenMP but seems to me it should work properly?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 19:43:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1189413#M6890</guid>
      <dc:creator>CFR</dc:creator>
      <dc:date>2020-07-03T19:43:36Z</dc:date>
    </item>
    <item>
      <title>Re:OpenMP offload hangs if omp_get_num_threads use...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1192563#M6933</link>
      <description>&lt;P&gt;Hi Craig,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This thread is a duplicate of &lt;A href="https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/OpenMP-offload-hangs-if-omp-get-num-threads-used-in-target-quot/m-p/1189420#M6891" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/OpenMP-offload-hangs-if-omp-get-num-threads-used-in-target-quot/m-p/1189420#M6891&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Since there is no problem with teams both the threads raised by you are dealing with the same issue.&lt;/P&gt;&lt;P&gt;We are closing this thread. Please follow the above thread for the solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prasanth&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jul 2020 12:44:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1192563#M6933</guid>
      <dc:creator>PrasanthD_intel</dc:creator>
      <dc:date>2020-07-15T12:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re:OpenMP offload hangs if omp_get_num_threads use...</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1193383#M6944</link>
      <description>&lt;P&gt;Sorry the duplicate happened when the new system was flagging everything as SPAM.&amp;nbsp; I was trying to get around the filter then someone "released" all the various attempts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 23:53:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-offload-hangs-if-omp-get-num-threads-used-inside-parallel/m-p/1193383#M6944</guid>
      <dc:creator>CFR</dc:creator>
      <dc:date>2020-07-17T23:53:38Z</dc:date>
    </item>
  </channel>
</rss>

