<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Tasking: assertion failure in kmp_runtime.c"
   href="https://bugs.llvm.org/show_bug.cgi?id=36720">36720</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Tasking: assertion failure in kmp_runtime.c
          </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>All
          </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></table>
      <p>
        <div>
        <pre>Tested on x86_64 and ppc64le, RHEL.

The following code triggers an assertion failure:

#define N 1024
int main()
{
  #pragma omp task
  {
    #pragma omp parallel for
    for (int i=0; i<N; i++)
      (void) 0;
  }

  #pragma omp task
  {
    #pragma omp parallel for
    for(int i=0; i<N; ++i)
      (void) 0;
  }

  #pragma omp taskwait

  return 0;
}

Assertion failure at kmp_runtime.cpp(1715): nthreads > 0.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(1715).

The assertion fails even with OMP_NUM_THREADS=1. If I remove the second task,
everything runs to completion. If I remove the "omp parallel for" directives
from inside the tasks, once again everything runs fine.</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>