Opt icon indicating copy to clipboard operation
Opt copied to clipboard

llvm: No such file or directory

Open HongweiXie opened this issue 7 years ago • 7 comments

Environment: Ubuntu 16.04 CUDA 9.1

when make example image_warping I got a compile error.

arch sm_30 -O3 -g -std=c++11 -Isrc -Isrc/cutil/inc -I../../API/release/include -I../../../terra/include -I/usr/local/cuda/include -I../external/mLib/include -I../external -I../external/OpenMesh/include src/WarpingSolver.cu -c -o build/WarpingSolver.o arch: invalid option -- 'O' Try 'arch --help' for more information. ../shared/make_template.inc:38: recipe for target 'build/WarpingSolver.o' failed make: [build/WarpingSolver.o] Error 1 (ignored) clang++ build/CUDAWarpingSolver.o build/mLibSource.o build/main.o build/WarpingSolver.o ../../API/release/lib/libOptDev.a -o image_warping -std=c++11 -L../../API/release/lib -L/usr/local/cuda/lib64 -lcudart -L../../../terra/lib -lterra -ldl -Wl,-rpath,/usr/local/cuda/lib64 -pthread clang: error: no such file or directory: 'build/WarpingSolver.o' ../shared/make_template.inc:42: recipe for target 'image_warping' failed make: *** [image_warping] Error 1

Then I solve this problem manually :
nvcc -arch sm_30 -O3 -g -std=c++11 -Isrc -Isrc/cutil/inc -I../../API/release/include -I../../../terra/include -I/usr/local/cuda/include -I../external/mLib/include -I../external -I../external/OpenMesh/include src/WarpingSolver.cu -c -o build/WarpingSolver.o

and make success. but when I run ./image_warping

I got this error: width 512, height 512 numActivePixels: 101406 llvm: No such file or directory

any suggestions?

HongweiXie avatar Dec 30 '17 07:12 HongweiXie

Do any of the terra cuda tests work on your machine?

Mx7f avatar Jan 08 '18 23:01 Mx7f

Hi @Mx7f,

In my case, cuda tests like cudahello.t work:

=================
= FAILING tests
=================
sgemm.t
avxhadd.t
=================

510 tests passed. 2 tests failed.

but ./image_warping exits with "llvm: No such file or directory". The problem arises during Opt_NewState call:

Thread 1 "minimal" hit Breakpoint 1, terra_reporterror (T=0x40007c18, 
    fmt=0x20f1c81 "llvm: %s\n") at src/terra.cpp:66
66	src/terra.cpp: No such file or directory.
(gdb) bt
#0  terra_reporterror (T=0x40007c18, fmt=0x20f1c81 "llvm: %s\n")
    at src/terra.cpp:66
#1  0x000000000056ab91 in terra_linkllvmimpl (L=0x40000378)
    at src/tcompiler.cpp:2927
#2  0x00000000005661c6 in lj_BC_FUNCC ()
#3  0x000000000053ca78 in lj_cf_package_require ()
#4  0x00000000005661c6 in lj_BC_FUNCC ()
#5  0x000000000053ca78 in lj_cf_package_require ()
#6  0x00000000005661c6 in lj_BC_FUNCC ()
#7  0x0000000000547140 in lua_pcall ()
#8  0x000000000042a88a in Opt_NewState ()
#9  0x0000000000429dee in solveLaplacian (width=width@entry=512, 
    height=height@entry=512, unknown=0x7fffed500000, target=0x7fffed400000)
    at main.cpp:16
#10 0x000000000040ea5a in main () at main.cpp:59
  • note: to compile I changed clang to gcc

dmitrii-marin avatar Jan 19 '18 20:01 dmitrii-marin

OK, playing with gdb I found that terra_linkllvmimpl referes to "/usr/local/cuda/nvvm/libdevice/libdevice.compute_30.10.bc", which is absent in Cuda-9. After installation of cuda-8 the 'minimal' test runs

dmitrii-marin avatar Jan 22 '18 20:01 dmitrii-marin

I just ran into this with CUDA 9 as well. Any ideas about how would I go about making a fix for Opt to support CUDA 9? Related: any plans for using CMake?

Algomorph avatar Jul 05 '18 14:07 Algomorph

We will need to update to a new version of terra to support CUDA 9 without a complicated build process. We should create binaries for terra; the last release was before CUDA 9 support: https://github.com/zdevito/terra/releases. If anyone wants to do that, I will happily offer support, otherwise I will take a stab at it in the near future.

I will happily accept CMake contributions, but don't plan to move to it myself in the near future.

Mx7f avatar Aug 08 '18 18:08 Mx7f

A me-too here. I've tried several configurations, all on Ubuntu 16.04 (I had to add -ccbin to the makefile for all of these to compile)

  • CUDA-9.0 / GCC 5.4
  • CUDA-9.0 / CLANG 3.8.0
  • CUDA-8.0 / GCC 5.4
  • CUDA-8.0 / CLANG 3.8.0 (ERROR - CLANG too recent)
  • CUDA-7.5 / GCC 5.4

Each gives the runtime error "llvm: No such file or directory" when executing ./image_warping. It feels like I'm missing a package rather than a build configuration issue? @supremus, are you sure it was CUDA-8.0 that fixed things for you, or did you perhaps install something that provides the binary llvm?

As an alternative, does anyone know of a docker image or similar that could be used?

Thanks!

stevenlovegrove avatar Dec 22 '18 02:12 stevenlovegrove

niessner/Opt#143 and a new terra may solve this problem

tangweiyill avatar May 23 '19 14:05 tangweiyill