[PYTHON] Resolve a Segmentation fault that occurs in Ubuntu 16.04+ Tensorflow environment

I was developing with a deep learning environment on Ubuntu 16.04, and when I applied "Software Update", the item being updated was "nvidia 367", which made me feel suspicious. When I restarted, cudnn was not found and a segmentation fault occurred as shown below. ..

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 (Core dump)

As a result of trying various things

CUDA_VISIBLE_DEVICES=1

It seems that I had to specify it like this ... Until now, it worked without specifying it ... It worked by specifying the GPU to use in .bashrc. In my environment, I had two GT 610 and GTX 1080 inserted, so I think it was necessary.

Recommended Posts

Resolve a Segmentation fault that occurs in Ubuntu 16.04+ Tensorflow environment
Ubuntu18.04.05 Creating a python virtual environment in LTS
Building a TensorFlow environment that uses GPU on Windows 10
[Ubuntu 18.04] Tensorflow 2.0.0-GPU environment construction
Collaborate in a remote environment
A story that stumbled when using pip in a proxy environment
Ubuntu14.04 + GPU + TensorFlow environment construction
Solve the problem of missing libcudart in Ubuntu 16.04 + CUDA 8.0 + Tensorflow environment
Building a Python environment on Ubuntu
install tensorflow in anaconda + python3.5 environment
UnicodeDecodeError occurs in pip (Windows environment)
[Pyenv] Building a python environment with ubuntu 16.04
Install Django in a pipenv virtual environment
Use tensorflow in an environment without root
Build a Tensorflow environment with Raspberry Pi [2020]
I built a TensorFlow environment on windows10
Creating a virtual environment in an Anaconda environment
Introduction to docker Create ubuntu environment in ubuntu
Install CaboCha in a non-Anaconda environment (Win)
I started Node.js in a virtual environment
Use WebDAV in a Portable Docker environment