[TOC]

概述

概述

文章参考:https://github.com/BVLC/caffe

Caffe开发环境搭建

安装步骤:http://caffe.berkeleyvision.org/installation.html

文章参考:https://blog.csdn.net/qq_45700350/article/details/117323896

文章参考:https://www.cxybb.com/article/qq_40755643/96346453

文章参考:https://blog.csdn.net/smallyang0613/article/details/118752632

更新软件环境

在终端中执行如下命令,将系统内核和基础组件升级至最新版本,否则后续编译会因为组件版本问题遇到不可预料的错误。

1
2
3
4
5
6
7
8
9
10
11
12
# 更新软件仓库缓存
sudo apt-get update

# 更新所有软件包至最新版本
sudo apt-get upgrade -y

# 更新的过程中可能会升级 Linux 内核,执行下述命令删除不再使用的旧内核
sudo apt-get autoremove --purge -y

# 重启
reboot

安装protobuf-3.13.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone https://github.com/protocolbuffers/protobuf.git
# https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make -j 8
sudo make install
sudo ldconfig # refresh shared library cache.
protoc --version

# 卸载
(python36) frewen@freweniubuntu:~/DevTools/caffe-1.0$ which protoc
/usr/local/bin/protoc
(python36) frewen@freweniubuntu:~/DevTools/caffe-1.0$ rm -rf /usr/local/bin/protoc
rm: 无法删除 '/usr/local/bin/protoc': 权限不够
(python36) frewen@freweniubuntu:~/DevTools/caffe-1.0$ sudo rm -rf /usr/local/bin/protoc

安装Caffe框架需要的三方库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 常规依赖
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev
sudo apt-get install libboost-all-dev libhdf5-serial-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

# 安装OpenCV
sudo apt-get install libopencv-dev
# 安装protobuf
sudo apt-get install protobuf-compiler

# BLAS(线性代数库)依赖
sudo apt-get install libatlas-base-dev libopenblas-dev

# 注:以上依赖项可以写在一条命令里,不必分开写
# 这里分开写只是为了提高阅读体验

安装 OpenCV 3

上述依赖项里已经安装了 libopencv-dev,但是安装的是 OpenCV 4。Caffe 框架的 1.0 版本是 2017 年发布的,距离现在已有四年之久,在此期间也没有发布过任何新版本。1.0 版本有部分代码调用的是仅存在于 OpenCV 3 里的 API,无法适用于 OpenCV 4。强行使用 4 的话,在后续的编译过程中会报错,而且这样的错误不能简单通过修改 Makefile.config 配置文件来修正。所以这里我们需要下载 OpenCV 3 的源码,然后在 /usr/local 里再编译一份 OpenCV 3 的库。这个错误折腾了我好几天,重新编译低版本的 OpenCV 是我能想到的最后的解决方案了,没想到成功了。

我们现在根据 OpenCV 官网的教程指示 OpenCV: Installation in Linux 来配置 OpenCV。

1
2
3
4
5
# 安装 OpenCV 3.4.14 的依赖项
sudo apt-get install cmake libgtk2.0-dev pkg-config
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev

​ 因为和 CUDA 一样是源码编译,不是从软件仓库直接安装的,所以同样的,编译完成后我们需要配置环境变量,动态库的搜索目录(LD_LIBRARY_PATH)需要加上刚安装的 OpenCV 3 的库存放目录。

1
2
3
4
5
6
7
8
9
10

# 用文本编辑器打开 /etc/profile 文件,用于编辑环境变量
sudo gedit /etc/profile

# 修改 LD_LIBRARY_PATH 变量,加上 /usr/local/lib 目录
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/cuda-11.4/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

# 回到终端,重启计算机,使得环境变量配置生效
reboot

​ 彩蛋:之前写的在 CentOS 7 上配置 Caffe 的文章里,没有说明要源码安装 OpenCV 3。这是因为 CentOS 7 的软件仓库里,opencv-devel 是 2.4.5 版本,并不是 4 系列。Caffe 框架同时兼容 2 系列和 3 系列的 OpenCV,不兼容 4 系列的。

Ubuntu安装caffe环境

下载源码

1
2
3
4
5
git clone https://github.com/weiliu89/caffe.git
cd caffe
cp Makefile.config.example Makefile.config


opencv configure in Makefile.config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3

# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
ANACONDA_HOME := /home/frewen/DevTools/anaconda3/envs/python36
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python3.6m/ \
$(ANACONDA_HOME)/lib/python3.6/site-packages/numpy/core/include/ \



# We need to be able to find libpythonX.X.so or .dylib.
# PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib

# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

libs configure in Makefile

1
2
3
4
5
6
7
8
9
10
11
12
 # 将:
NVCCFLAGS +=-ccbin=$(CXX) -Xcompiler-fPIC $(COMMON_FLAGS)
# 替换为:
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
# 将:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
# 替换为:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
# 添加:
LIBRARIES += boost_regex boost_atomic boost_thread stdc++
# 按照python修改
PYTHON_LIBRARIES ?= boost_python-py36 python3.6

caffe-makefile-example目录下提供Makefile及Makefile.config的参照版本,请修改其中python路径为您部署机器下的对应路径

修改Makefile

第二个修改位置:

  • ```shell

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

    改为:

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

    LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5

    改为:

    LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

    #添加:
    LIBRARIES += boost_regex boost_atomic boost_thread stdc++

    按照python修改

    PYTHON_LIBRARIES ?= boost_python python2.7

    修改成:

    PYTHON_LIBRARIES ?= boost_python3 python3.6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24




    caffe install

    ```shell
    sudo make clean
    sudo make all -j 8
    sudo make runtest -j 8

    # pycaffe
    cd python
    for req in $(cat requirements.txt); do pip install $req; done
    # 统一使用 protobuf 3.13.0 版本
    pip install protobuf==3.13.0

    sudo gedit ~/.bashrc
    export PYTHONPATH=$PYTHONPATH:/home/frewen/DevTools/caffe-1.0/python:$PYTHONPATH
    source ~/.bashrc

    sudo make pycaffe -j8
    python
    import caffe

使用系统python环境安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!

# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1

# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
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

# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas

# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app

# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
# PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include

# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := /home/frewen/DevTools/anaconda3/envs/python36
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python3.6m/ \
# $(ANACONDA_HOME)/lib/python3.6/site-packages/numpy/core/include/ \

# Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python3 python3.6m
PYTHON_INCLUDE := /usr/include/python3.6m \
/usr/lib/python3.6/dist-packages/numpy/core/include

# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib

# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib

# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib

# NCCL acceleration switch (uncomment to build with NCCL)
# https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
# USE_NCCL := 1

# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1

# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

# enable pretty build (comment to see full commands)
Q ?= @

修改Makefile文件

1
2
3
4
5
6
7
8
9
10
11
# LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
# 改为:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
#添加:
LIBRARIES += boost_regex boost_atomic boost_thread stdc++

# 按照python修改
# PYTHON_LIBRARIES ?= boost_python python2.7
# 修改成:(Ubuntu18.04上按钮)
PYTHON_LIBRARIES ?= boost_python3-py36 python3.6

Ubuntu18安装Caffe环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!

# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1

# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
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

# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas

# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app

# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
# PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := /home/frewen/DevTools/anaconda3/envs/python36
# PYTHON_INCLUDE := /home/frewen/DevTools/anaconda3/include \
# /home/frewen/DevTools/anaconda3/envs/python36/include/python3.6m/ \
# /home/frewen/DevTools/anaconda3/envs/python36/lib/python3.6/site-packages/numpy/core/include/ \


# Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python38 python3.8
PYTHON_INCLUDE := /usr/include/python3.8 \
/usr/lib/python3.8/dist-packages/numpy/core/include

# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := /home/frewen/DevTools/anaconda3/envs/python36/lib

# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib

# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib

# NCCL acceleration switch (uncomment to build with NCCL)
# https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
# USE_NCCL := 1

# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1

# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

# enable pretty build (comment to see full commands)
Q ?= @

1
2
3
4
5
6
7
# LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
# 改为:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial


# 改成
PYTHON_LIBRARIES ?= libboost_python38 python3.8

错误

1
2
3
4
5
6
7
8
9
10
In file included from /usr/include/boost/python/detail/prefix.hpp:13,
from /usr/include/boost/python/args.hpp:8,
from /usr/include/boost/python.hpp:11,
from src/caffe/layer_factory.cpp:4:
/usr/include/boost/python/detail/wrap_python.hpp:57:11: fatal error: pyconfig.h: 没有那个文件或目录
57 | # include <pyconfig.h>
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:584:.build_release/src/caffe/layer_factory.o] 错误 1

错误

1
2
3
4
5
6
7
8
9
10
11
12
(python36) frewen@freweniUbuntu18:~/DevTools/caffe$ sudo make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/syncedmem.cpp
In file included from src/caffe/syncedmem.cpp:1:0:
./include/caffe/common.hpp:4:10: fatal error: boost/shared_ptr.hpp: 没有那个文件或目录
#include <boost/shared_ptr.hpp>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:590: recipe for target '.build_release/src/caffe/syncedmem.o' failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1

解决

1
2
sudo apt-get install libboost-all-dev
sudo apt-get install boost-devel(失败)

错误

1
2
3
4
5
6
7
8
9
10
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/syncedmem.cpp
In file included from src/caffe/syncedmem.cpp:1:0:
./include/caffe/common.hpp:5:10: fatal error: gflags/gflags.h: 没有那个文件或目录
#include <gflags/gflags.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:590: recipe for target '.build_release/src/caffe/syncedmem.o' failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1

解决

1
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

错误

1
2
3
4
5
6
7
8
9
10
11
12
(python36) frewen@freweniUbuntu18:~/DevTools/caffe$ sudo make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/syncedmem.cpp
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from src/caffe/syncedmem.cpp:3:
./include/caffe/util/mkl_alternate.hpp:14:10: fatal error: cblas.h: 没有那个文件或目录
#include <cblas.h>
^~~~~~~~~
compilation terminated.
Makefile:590: recipe for target '.build_release/src/caffe/syncedmem.o' failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1