<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Reduction across teams hangs at __kmpc_end_reduce()"
   href="https://llvm.org/bugs/show_bug.cgi?id=30890">30890</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Reduction across teams hangs at __kmpc_end_reduce()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime Library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>grokos@us.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Tested on x86_64 and ppc64le, RHEL.

The following code which involves a reduction across teams when target
offloading is disabled never runs to completion.

#include <omp.h>

int main() {
  int nthreads = 0;

  #pragma omp target teams num_teams(4) map(tofrom: nthreads) \
              if(target:0) reduction(+:nthreads)
  {
    nthreads = omp_get_num_threads();
  }

  return 0;
}

Execution freezes while calling __kmpc_end_reduce(). It seems threads are
spinning forever at a hyper-barrier (__kmp_hyper_barrier_gather()).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>