centos7.0 Tesla k80 Caffe installation

Source: Internet
Author: User
Tags bz2 mkdir zip git clone gfortran
centos7.0 Tesla k80 Caffe installation

Official installation steps:

General dependencies

sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel

Remaining dependencies, recent OS

sudo yum install gflags-devel glog-devel lmdb-devel

Remaining dependencies, if not found

# Glog
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/ glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure make
&& make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
CD Gflags-master
mkdir build && CD build
export cxxflags= "-fpic" && cmake: && make Verbos E=1 make
&& make install
# lmdb
git clone https://github.com/LMDB/lmdb
CD lmdb/libraries/ Liblmdb make
&& make install

generally after the above steps, some libraries can not be installed, need to install manually:

Opencv-devel

$ sudo yum-y install cmake pkgconfig gtk2-devel python-devel numpy tbb-devel libpng-devel
$ wget HTTP://SOURCEFORGE.N Et/projects/opencvlibrary/files/opencv-unix/2.4.10/opencv-2.4.10.zip
$ unzip opencv-2.4.10.zip
$ cd opencv-2.4.10
$ mkdir Build
$ cd Build
$ cmake. /-dcmake_build_type=release-dcmake_install_prefix=/usr/local-dbuild_examples=on-dbuild_new_python_support=on- Dinstall_python_examples=on
$ make-j 2
$ sudo make install

Question One

/home/usrname/opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp:120:54:error: ' NppiGraphcutState ' have not been Declared
     typedef nppstatus (*init_func_t) (Nppisize osize, nppigraphcutstate** ppstat
                                                      ^
/home/usrname/ Opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp:135:18:error: ' nppigraphcutstate ' does not name a type
         Operator nppigraphcutstate* ()
                  ^
/home/usrname/opencv-3.0.0/modules/cudalegacy/src/graphcuts.cpp:141:9: Error: ' Nppigraphcutstate ' does not name a type
         nppigraphcutstate* pState;


Solution: Need to modify a source code:

in Graphcuts.cpp will
#if!defined (have_cuda) | | defined (cuda_disabler) 
to
#if! Defined (Have_cuda) | | Defined (Cuda_disabler) | | (cudart_version >= 8000)

Question Two

NVCC fatal   : Unsupported GPU architecture ' compute_11 '  
CMake Error at Cuda_compile_generated_matrix_ operations.cu.o.cmake:206 (message):  
  Error generating  
/home/smie/documents/opencv2.4.11/build/modules/ Core/cmakefiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_gene  

RATED_MATRIX_OPERATIONS.CU.O  
make[2]: * * *  
[Modules/core/cmakefiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_generated_matrix_ OPERATIONS.CU.O] Error 1  
make[1]: * * [Modules/core/cmakefiles/opencv_core.dir/all] Error 2 make[1]: * * * waiting for Unfinished jobs ....  


Use the following command to resolve the

$ cmake-d cmake_build_type=release-d cmake_install_prefix=/usr/local-d Cuda_generation=kepler:

HDF5

Click the Library download address
Currently, the SWMR feature can only is tested on UNIX platforms. The SWMR testing is disabled on Windows.

Please be Aware:on UNIX platforms The HDF5 tests must is run on a local file system or a parallel file system running GPF S or Lustre in order for the SWMR tests to complete properly. For example:

    CD Localfspath
    mkdir build
    CD build
    /path_to_hdf5_source/configure ...
    Make do
    check make
    install

Boost-devel

$ wget-o boost_1_55_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2?r= Http%3a%2f%2fsourceforge.net%2fprojects%2fboost%2ffiles%2fboost%2f1.55.0%2f&ts=1385953406&use_mirror= Softlayer-ams

$ tar jxvf  boost_1_55_0.tar.bz2
$ cd boost_1_55_0
$./bootstrap.sh
$./b2
$ sudo./b2 Install

Glog-devel

$ sudo wget https://codeload.github.com/google/glog/zip/master
$ unzip glog-master.zip
$ cd glog-master
$ ./configure
$ make-j4
$ sudo make install

Protobuf

$ wget-o protobuf.zip https://github.com/google/protobuf/archive/master.zip

$ unzip protobuf.zip
$ cd Protobuf-master
$./autogen.sh
$ make && do check
$ sudo make install

Leveldb-devel

$ sudo git clone https://github.com/google/leveldb.git
$ make
$ sudo cp-r include/leveldb/usr/local/include< c14/>$ sudo cp./out-shared/libleveldb.so/usr/local/lib

Openblas

$ git clone https://github.com/xianyi/OpenBLAS.git
$ cd openblas
$ make Fc=gfortran (if no Gfortran is installed, execute sudo Apt-get install Gfortran) (CentOS is yum install Gcc-gfortran)
$ sudo make prefix=/usr/local/install
$ ln-s/opt/ Openblas/lib/libopenblas.so  /usr/lib/libblas.so.3
$ ln-s/opt/openblas/lib/liblapack.so.3/usr/lib/ Liblapack.so.3

compile caffe after installing dependent libraries

$ sudo cp Makefile.config.example makefile.config
# Adjust Makefile.config (for example, if using Anaconda Python, # O R if CuDNN is desired)
$ sudo make all
$ sudo make test
$ sudo make runtest

If the new version of Caffe will report the following error:/

/usr/bin/ld:cannot Find-lcblas
/usr/bin/ld:cannot Find-latlas.

Workaround:

sudo vim makefile.config

modifies the following code:
BLAS: = Atlas (pre-Modified)
BLAS: = Open  (modified)

blas_include: =/usr/ Local/include/openblas (ADD)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.