LoginSignup
3
2

More than 5 years have passed since last update.

Ubuntu 16.04+Tensorflow 環境で起きるSegmentation faultを解決する

Posted at

Ubuntu 16.04 でディープラーニング環境を整えて開発していて、「ソフトウェアの更新」をかけたらアップデート中の項目に「nvidia 367」とあってあやしげな雰囲気、、
と思っていたら再起動すると以下のようにcudnnが見つからずセグメンテーションフォールトが。。

I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:102] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: 
I tensorflow/stream_executor/cuda/cuda_dnn.cc:2259] Unable to load cuDNN DSO
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:925] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties: 
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:02:00.0
Total memory: 7.92GiB
Free memory: 7.81GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:572] creating context when one is currently active; existing: 0x34500e0
Segmentation fault (コアダンプ)

色々試してみた結果、

CUDA_VISIBLE_DEVICES=1

といった感じで指定しないといけなくなってしまったようです…いままでは特に指定せずとも動いていたのですが…
使用するGPUを.bashrcで指定してあげることで動きました。筆者の環境ではGT 610とGTX 1080を2枚挿ししていたこともあって必要になったというのもあるのでしょう。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2