make mattest: Error in caffe.run_tests (line 6) caffe.set_mode_cpu();

581 views
Skip to first unread message

ceib...@gmail.com

unread,
Mar 24, 2016, 3:42:51 AM3/24/16
to Caffe Users
hi~
when I make mattest, some error happened:

cd matlab; /usr/local/MATLAB/R2014a/bin/matlab -nodisplay -r 'caffe.run_tests(), exit()'

                            < M A T L A B (R) >
                  Copyright 1984-2014 The MathWorks, Inc.
                    R2014a (8.3.0.532) 64-bit (glnxa64)
                             February 11, 2014

 
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
 
Invalid MEX-file
'/home/xw/caffeBuild/caffe-master/matlab/+caffe/private/caffe_.mexa64':
/home/xw/caffeBuild/caffe-master/matlab/+caffe/private/caffe_.mexa64: undefined
symbol:
_ZN2cv8imencodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayERSt6vectorIhSaIhEERKSB_IiSaIiEE

Error in caffe.set_mode_cpu (line 5)
caffe_('set_mode_cpu');

Error in caffe.run_tests (line 6)
caffe.set_mode_cpu();

And my OS is Ubuntu 15.10, so the version of g++ and gcc is 5.2.1. 
what should I do? 
Thanks~

杨阳

unread,
Mar 31, 2016, 3:09:14 AM3/31/16
to Caffe Users
I also encounter the problem , I suggest the gcc version cause the problem ,but apt-cache search gcc just list the version from 4.8 to gcc5, I try each version in my ubuntu 14.10 ,but no one worked. If you solve the problem , please tell me how to fix it.Thank you.

ceib...@gmail.com於 2016年3月24日星期四 UTC+8下午3時42分51秒寫道:

Ravi Shekhar

unread,
Apr 15, 2016, 9:22:40 AM4/15/16
to Caffe Users

 I am also facing the same problem. My Matlab version is 2015b. I tried to put default version of gcc as gcc-4.7 since Maltab mex support that and explicitly  give gcc version gcc-5 in Makefile configuration for Caffe. 
 
 Anyone able to fix this issue?

Snarcraft Utiha

unread,
May 26, 2017, 5:34:07 AM5/26/17
to Caffe Users
copy caffe\matlab\+caffe\private\Release\caffe_.mexw64 file  and paste into caffe\matlab\+caffe\private\
Reply all
Reply to author
Forward
0 new messages