yusuketomoto / chainer-fast-neuralstyle

Chainer implementation of "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
MIT License
803 stars 226 forks source link

LC_RPATH @executable_path error or libnvrtc-builtins.dylib error #107

Open vibber opened 6 years ago

vibber commented 6 years ago

When trying to run with gnu support I get two errors.

dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libcublas.9.2.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libcufft.9.2.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libcurand.9.2.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libcusparse.9.2.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libcusolver.9.2.dylib being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/ in /Developer/NVIDIA/CUDA-9.2/lib/libnvToolsExt.1.dylib being ignored in restricted program because of @executable_path

and the script aborts with this

cupy.cuda.compiler.CompileException: nvrtc: error: failed to open libnvrtc-builtins.dylib

I am on Mac OSX 10.13. I have tried compiling CUDA samples and that works

monabf commented 6 years ago

@vibber were you able to solve that issue? I am also working with Mac OSX 10.13, have installed the NVIDIA and CUDA 9.2 drivers and the CUDA samples work, but when I try to use it I get CompileException: nvrtc: error: failed to open libnvrtc-builtins.dylib. Make sure that libnvrtc-builtins.dylib is installed correctly.

vibber commented 6 years ago

No I never resolved this and had to abort.

stoictraveler commented 6 years ago

Hey guys,

Met the same problem with theano after installing cuda 9.2 on OSX. This helped me out

sudo ln -s /usr/local/cuda-9.2/lib/libnvrtc-builtins.dylib /usr/local/lib

No idea why nvrtc cannot find it as I have cuda-9.2 in my DYLD_LIBRARY_PATH.

Hope this helps you out as well.

michaelschar commented 5 years ago

Hey guys,

Met the same problem with theano after installing cuda 9.2 on OSX. This helped me out

sudo ln -s /usr/local/cuda-9.2/lib/libnvrtc-builtins.dylib /usr/local/lib

No idea why nvrtc cannot find it as I have cuda-9.2 in my DYLD_LIBRARY_PATH.

Hope this helps you out as well.

Same approach fixed the identical issue for me using this with my conda setup: ln -s /usr/local/cuda/lib/libnvrtc-builtins.dylib /Users/michaelschar/gpi_stack/envs/gpi/lib

cloudXia777 commented 4 years ago

I solved this issue just now. Give the solution:

  1. export CUDA_PATH=/usr/local/cuda-9.0
  2. export LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH
  3. source /etc/profile refer: 1. https://docs.chainer.org/en/stable/install.html 【FAQ】
  4. https://docs-cupy.chainer.org/en/latest/install.html#cupy-always-raises-cupy-cuda-compiler-compileexception 【FAQ】