[llvm-bugs] [Bug 42395] New: Incorrect linking of device code

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 25 14:42:16 PDT 2019


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

            Bug ID: 42395
           Summary: Incorrect linking of device code
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xw111luoye at gmail.com
                CC: llvm-bugs at lists.llvm.org

I got the following error at runtime.

Target CUDA RTL --> Load data from image 0x00000000006ce450
Target CUDA RTL --> CUDA module successfully loaded!
Target CUDA RTL --> Loading
'__omp_offloading_805_19e264f__ZN11qmcplusplus17einspline_spo_ompIdE10evaluate_vERKNS_11ParticleSetEi_l218'
(Failed)
Libomptarget --> Unable to generate entries table for device id 0.
Libomptarget --> Failed to init globals on device 0
Libomptarget --> Failed to get device 0 ready

The issue is related to static linking. Target offload regions are compiled and
archived as static libraries. Then *.a are then linked together to create an
executable. Such an executable ran well in the past but no more. If I link
manually all the object files. The executable can run correctly.

The build and run recipe
https://github.com/QMCPACK/miniqmc/tree/OMP_offload
mkdir build_clang_offload; cd build_clang_offload
cmake -DCMAKE_CXX_COMPILER="clang++" -DQMC_MPI=0 -DENABLE_OFFLOAD=1 ..
make -j24 miniqmc
./bin/miniqmc

-- 
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/20190625/3a93a2a0/attachment.html>


More information about the llvm-bugs mailing list