[llvm-bugs] [Bug 40893] New: Size doesn't match for '_openmp_teams_reductions_buffer_$_' in '/tmp/error-f2f528.cubin'

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 27 13:46:09 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40893

            Bug ID: 40893
           Summary: Size doesn't match for
                    '_openmp_teams_reductions_buffer_$_' in
                    '/tmp/error-f2f528.cubin'
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: csdaley at lbl.gov
                CC: llvm-bugs at lists.llvm.org

Created attachment 21520
  --> https://bugs.llvm.org/attachment.cgi?id=21520&action=edit
Program to demonstrate the Clang link error

Hello all,

I am trying to run the SPEC-ACCEL OpenMP test-suite with the LLVM/Clang
compiler (using LLVM/Clang versions from today, 27 Feb 2019). I am using Intel
Skylake CPUs and NVIDIA Volta GPUs. I find that the LLVM/Clang compiler gives
the wrong numerical results for the test problem 557.pcsp when using OpenMP
target offload. In order to understand where results first differ, I created a
new function containing an OpenMP reduction to check numerical results after
each kernel (file rhs_sum.c and function compute_rhs_sum). However, adding this
new object file causes Clang to fail at link time with the error "nvlink error 
 : Size doesn't match for '_openmp_teams_reductions_buffer_$_' in
'/tmp/error-2b1332.cubin', first specified in '/tmp/rhs_sum-db73c4.cubin'".

I have attached the smallest reproducible test problem. It is 78 lines of code
spread over 4 source files. It has 2 kernels with OpenMP teams reductions in
different source files.

$ make clean && make
rm -f *.o *.ptx *.cub pcsp
clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -c sp.c -o sp.o
clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -c rhs_sum.c -o rhs_sum.o
clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -c error.c -o error.o
clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda sp.o rhs_sum.o error.o -lm
-o pcsp
nvlink error   : Size doesn't match for '_openmp_teams_reductions_buffer_$_' in
'/tmp/error-2178d1.cubin', first specified in '/tmp/rhs_sum-928af9.cubin'
clang-9: error: nvlink command failed with exit code 255 (use -v to see
invocation)
Makefile:6: recipe for target 'pcsp' failed
make: *** [pcsp] Error 255

This seems like a regression because the application successfully links when
using LLVM/Clang from 24th Jan 2019.

One interesting observation is that the application successfully links when
moving the two functions containing OpenMP teams reductions into the same
source file.


Thanks,
Chris

-- 
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/20190227/3be4c7a2/attachment.html>


More information about the llvm-bugs mailing list