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

Hal Finkel hfinkel at anl.gov
Tue Jul 14 10:24:33 PDT 2015


----- Original Message -----
> From: "Jonathan L Peyton" <jonathan.l.peyton at intel.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "John Mellor-Crummey" <johnmc at rice.edu>, openmp-dev at dcs-maillist2.engr.illinois.edu
> Sent: Tuesday, July 14, 2015 12:15:11 PM
> Subject: RE: [Openmp-dev] Another bug in LLVM OpenMP runtime when compiled in	debug mode and exercised using the GNU
> API
> 
> 
> 
> 
> Hal,
> 
> 
> 
> Sorry to bother you again, but do you know who to contact about
> adding openmp as a product to the llvm bugzilla site?
> 

Not a bother. I believe you e-mail llvm-admin at cs.uiuc.edu (or maybe you just file a bug report)?

 -Hal

> 
> 
> -- Johnny
> 
> 
> 
> 
> 
> From: openmp-dev-bounces at cs.uiuc.edu
> [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of John
> Mellor-Crummey
> Sent: Tuesday, July 14, 2015 11:34 AM
> To: openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: [Openmp-dev] 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
> _task_team == parent_team->t.t_task_team[master_th-> 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 phone: 713-348-5179
> 
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the Openmp-dev mailing list