[llvm-bugs] [Bug 30890] Reduction across teams hangs at __kmpc_end_reduce()
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 1 10:32:19 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=30890
grokos at us.ibm.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #3 from grokos at us.ibm.com ---
I re-checked today with the same code posted when I first reported the bug and
the problem persists.
Running the simple program:
#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;
}
threads spin forever. This is the backtrace from gdb when execution hangs:
#0 0x00003fffb7b4e6f0 in __pthread_cond_wait (cond=0x1005cd80,
mutex=0x1005ce00) at pthread_cond_wait.c:187
#1 0x00003fffb7cbab4c in __kmp_suspend_template<kmp_flag_64> (th_gtid=0,
flag=0x3fffffffe890)
at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/z_Linux_util.cpp:1479
#2 0x00003fffb7cba748 in __kmp_suspend_64 (th_gtid=0, flag=0x3fffffffe890) at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/z_Linux_util.cpp:1530
#3 0x00003fffb7c89d04 in kmp_flag_64::suspend (this=0x3fffffffe890, th_gtid=0)
at /localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_wait_release.h:629
#4 0x00003fffb7c8871c in __kmp_wait_template<kmp_flag_64>
(this_thr=0x1005c800, flag=0x3fffffffe890, final_spin=0, itt_sync_obj=0x0)
at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_wait_release.h:387
#5 0x00003fffb7c89898 in kmp_flag_64::wait (this=0x3fffffffe890,
this_thr=0x1005c800, final_spin=0, itt_sync_obj=0x0)
at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_wait_release.h:640
#6 0x00003fffb7c823dc in __kmp_hyper_barrier_gather (bt=bs_reduction_barrier,
this_thr=0x1005c800, gtid=0, tid=0,
reduce=0x10000d00 <.omp.reduction.reduction_func>, itt_sync_obj=0x0) at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_barrier.cpp:541
#7 0x00003fffb7c81504 in __kmp_barrier (bt=bs_reduction_barrier, gtid=0,
is_split=1, reduce_size=8, reduce_data=0x3fffffffec40,
reduce=0x10000d00 <.omp.reduction.reduction_func>) at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_barrier.cpp:1320
#8 0x00003fffb7c3a3fc in __kmpc_reduce (loc=0x1001fb08, global_tid=0,
num_vars=1, reduce_size=8, reduce_data=0x3fffffffec40,
reduce_func=0x10000d00 <.omp.reduction.reduction_func>, lck=0x100200c0
<.gomp_critical_user_.reduction.var>)
at
/localhd/grokos/llvm/src/projects/openmp/runtime/src/kmp_csupport.cpp:3529
#9 0x0000000010000c24 in .omp_outlined. ()
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171201/36fd5f10/attachment.html>
More information about the llvm-bugs
mailing list