[Openmp-dev] Another bug in LLVM OpenMP runtime when compiled in debug mode and exercised using the GNU API

Churbanov, Andrey Andrey.Churbanov at intel.com
Wed Jul 15 09:09:47 PDT 2015


John,

We are working on the delivering of the fix to LLVM repository
(this bug had been fixed in our private development area some time ago).

Should be done soon.

Thanks,
Andrey

From: John Mellor-Crummey [mailto:johnmc at rice.edu]
Sent: Tuesday, July 14, 2015 7:34 PM
To: openmp-dev at dcs-maillist2.engr.illinois.edu
Cc: Cownie, James H; Churbanov, Andrey
Subject: Another bug in LLVM OpenMP runtime when compiled in debug mode and exercised using the GNU API


Yesterday, I posted an OpenMP fatal assertion when compiled in debug mode. Here is another. As I stated yesterday, I would file this bug with bugzilla, but I can’t figure out where the OpenMP bugs should go. If someone could enlighten me, I’d be grateful.

Compiling the code below with g++ and linking it to the LLVM OpenMP runtime compiled in debug mode produces a fatal error.

The program:

#include <inttypes.h>
#include <stdio.h>
#include <omp.h>

#define NTHREADS 8
#define NBOUND 40

uint64_t result[NBOUND];

uint64_t fib(int n)
{
  if (n < 2) return n;
  else return fib(n-1) + fib(n-2);
}

void testparallel()
{
#pragma omp parallel num_threads(NTHREADS)
  {
#pragma omp for
    for(int i = 0; i < NBOUND; i++)  result[i] = fib(40);
  }
}

void teststatic()
{
#pragma omp parallel for schedule(static)
  for(int i = 0; i < NBOUND; i++) result[i] += fib(40);
}

int main(int argc, char **argv)
{
  int i;

  testparallel();
  teststatic();

  for(i=0;i< NBOUND;i++) printf("%lld ", result[i]);
  printf("\n");
}

The error:

Assertion failure at kmp_runtime.c(2089): master_th->th.th<http://th.th>_task_team == parent_team->t.t_task_team[master_th->th.th<http://th.th>_task_state].
OMP: Error #13: Assertion failure at kmp_runtime.c(2089).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.

This assertion triggers on both the PPC64 and Intel64 architectures on which I tested it.

When the runtime is not compiled in debug mode, the program runs successfully to completion and produces the same answer as the sequential code.

While the assertion triggers when executing teststatic(), removing the prior call to testparallel() makes the assertion disappear.
--
John Mellor-Crummey         Professor
Dept of Computer Science    Rice University
email: johnmc at rice.edu<mailto:johnmc at rice.edu>      phone: 713-348-5179


--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20150715/6b133346/attachment.html>


More information about the Openmp-dev mailing list