<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 --- - Target teams: assertion failure in kmp_runtime.c"
   href="https://llvm.org/bugs/show_bug.cgi?id=30889">30889</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Target teams: 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>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 with target offloading disabled triggers an assertion
failure:

int main() {
  #pragma omp target teams num_teams(2) if(target:0)
  {
    (void) 0;
  }
  return 0;
}

Assertion failure at kmp_runtime.c(2292): master_th->th.th_task_team ==
team->t.t_task_team[master_th->th.th_task_state].
OMP: Error #13: Assertion failure at kmp_runtime.c(2292).

If I set num_teams(1) then the program runs to completion, with 2 teams or more
the assertion trips. If I comment out the assertion or use libomp in release
mode, the program runs fine no matter how many teams we have.

The same assertion is found in various places throughout kmp_runtime.c, in one
instance (line 2051) the assertion has been patched out with a comment saying
that the assertion is known to trap although the runtime operates correctly.</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>