[llvm-dev] "cannot find libdevice for sm_"

157 views
Skip to first unread message

Jost, Gabriele (ARC-TNC)[Supersmith] via llvm-dev

unread,
Aug 24, 2020, 4:58:21 PM8/24/20
to llvm...@lists.llvm.org

Hello,

I have installed clang12 with OpenMP target-offload on a cluster of v100 nodes using cuda 10.1 and gcc 8.2.

When I try to test it:

clang  -c -I../common -O3 -g -fopenmp -fopenmp-targets=nvptx64-nvida-cuda -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_70 -mcmodel=medium -DCRPL_COMP=0 ft.c

clang-12: error: cannot find libdevice for sm_

 

with a blank architecture.

 

I have the openmp target bc libraries

lrwxrwxrwx 1 gjost scicon       19 Aug 21 14:39 libRemarks.so -> libRemarks.so.12git

-rw-r--r-- 1 gjost scicon    69656 Aug 21 14:52 libomptarget-nvptx-sm_35.bc

-rw-r--r-- 1 gjost scicon    69196 Aug 21 14:52 libomptarget-nvptx-sm_70.bc

-rw-r--r-- 1 gjost scicon    69608 Aug 21 14:52 libomptarget-nvptx-sm_60.bc

lrwxrwxrwx 1 gjost scicon        9 Aug 21 15:07 libgomp.so -> libomp.so

lrwxrwxrwx 1 gjost scicon        9 Aug 21 15:07 libiomp5.so -> libomp.so

 

The only place in the llvm code where I see a message like this is here:

 

grep "cannot find libdevice for sm_" llvm-project/clang/test/Driver/cuda-detect.cu

// MISSINGLIBDEVICE: error: cannot find libdevice for sm_20.

pfe25.gjost 69> grep MISSINGLIBDEVICE llvm-project/clang/test/Driver/cuda-detect.cu

// RUN:   | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE

// RUN:   | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE

// MISSINGLIBDEVICE: error: cannot find libdevice for sm_20.

 

 

Have you seen this behavior before? Maybe clang12/cuda/10.1 and gcc8.2 is a bad combo?

Thanks in advance and greetings,

 

 

Gabriele Jost

 

************************************************************************

Gabriele Jost       NASA Ames Research Center

Email: Gabrie...@nasa.gov    Mail Stop 258-6

Work Phone: (650) 604-0468     Bldg. 258, Rm. 232-4

Scientific & HPC Application        P.O. Box 1

Development/Optimization         Moffett Field, CA 94035-0001

************************************************************************

Alexey.Bataev via llvm-dev

unread,
Aug 25, 2020, 11:09:37 AM8/25/20
to Jost, Gabriele (ARC-TNC)[Supersmith], llvm...@lists.llvm.org

Hi Jost, most probably the compiler cannot correctly find CUDA installation or cannot detect its version correctly. Check, if your CUDA installation directiry has version.txt file.

-------------
Best regards,
Alexey Bataev
24.08.2020 4:58 PM, Jost, Gabriele (ARC-TNC)[Supersmith] via llvm-dev пишет:
signature.asc
Reply all
Reply to author
Forward
0 new messages