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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to