Problems encountered when installing caffe GPU version on ubuntu 16.04

1 The gcc version is too high

Install cuda

sudo apt-get install nvidia-cuda-toolkit
cuda is version 7.5.18, restart after installation, enter nivdia-smi in the terminal, if there is a result, the driver and cuda are installed successfully.
 But cuda only supports gcc5.0 and below, even if opencv is successfully compiled with cmake, gpu still cannot be called

Need to forcibly cancel the gcc version check of cuda
comment out the gcc version check in host_config.h, if the version is greater than 5, an error will be returned

//#if __GNUC__ > 5
//#error -- unsupported GNU version! gcc versions later than 5 are not supported!
//#endif /* __GNUC__ > 5 */

Installed through nvidia-cuda-toolkit, host_config.h is under /usr/include/, if it is installed through the run file of cuda, an error will be prompted due to the gcc version check, and host_config.h in the corresponding location must be modified.


2 There is no cuda folder under usr/local/

ln -sf /usr/lib/nvidia-cuda-toolkit /usr/local/cuda


3  Error when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60'

In the Makefile.example, try commenting out the *_60 and *_61 lines (for compatibility with CUDA < 8.0).

CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
        -gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_52,code=sm_52 \
        #-gencode arch=compute_60,code=sm_60 \
        #-gencode arch=compute_61,code=sm_61 \
        #-gencode arch=compute_61,code=compute_61


4 error /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope while building caffe

vim the Makefile and changing the line

NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

into

NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

For me this was on line 415





Intelligent Recommendation

Ubuntu 16.04 caffe compilation encountered problems record

To understand image recognition ssd, useGitHub - weiliu89/caffe at ssdCompile, use wmware virtual machine ubuntu16.04 version, when run make runtest -j8, error (90 vs. 0) and (35 vs. 0) CUDA driver ve...

The process of installing GPU version of Pytorch on Ubuntu 16.04

Ubuntu16.04installationGPUVersionPytorchProcess time:2018-03-22 Disclaimer: This article is self-practice. If there is any problem with the operation according to this article, I am not responsible. 1...

Ubuntu 16.04 Installing GPU Version DLIB (CUDA9)

verify: Note 1: E: Error, Pkgproblemresolver :: Resolve generated Breaks, this may be caused by helod packages. Solve: As shown above, use the source code to compile and install BOOST Note 2: Cuda Was...

Summary of problems encountered in installing tensorflow on Ubuntu 16.04

Main reference for the installation processTensorFlow Chinese Community: Installation based on VirtualEnv: 1. First install the necessary Python virtual environment: 2.Next, create a brand new virtual...

Problems encountered when installing the latest version of mysql database under Ubuntu.

sudo apt-get install mysql-server sudo apt install mysql-client sudo apt install libmysqlclient-dev service mysql restart mysql -uroot -p xxx This problem occurred when we installed and entered the My...

More Recommendation

Teach you to configure GPU version of Caffe under Ubuntu 16.04 (1)

Teach you to configure GPU version of Caffe under Ubuntu 16.04 (1)   After half a month, I finally finished it. I have repeatedly configured it several times. I mainly forgot the solution when I ...

Teach you to configure GPU version of Caffe under Ubuntu 16.04 (2)

    The previous blog explained in more detail the configuration of some environments related to GPU. The following explains the installation of caffe's python environment and its dependenci...

Install Caffe under Ubuntu 16.04 (GPU version GTX970)

Update instructions on August 6, 2018: Not long after the last installation was successful, the graphics card driver was inexplicably invalid, there was no solution, and the system was simply reinstal...

Caffe installation (Ubuntu 16.04 GPU version) and getting started

Reference link: Caffe official website Caffe tutorial The full name of Caffe is Convolutional Architecture for Fast Feature Embedding.The main advantages are as follows: (1) Easy to get started, the n...

Install the relevant software of Caffe-GPU version under Ubuntu 16.04

Software provided As the title, I mainly recommend to everyone to install Caffe software on Ubuntu. All the required software is basically here, and it can be installed successfully by using these sof...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top