zhangliliang / RPN_BF

RPN+BF
Other
203 stars 76 forks source link

compilation error #7

Closed clzhou closed 7 years ago

clzhou commented 7 years ago

Hello!

When compiling the specified Caffe version, I got the following errors: /tmp/mex_9704849759849136_22812/caffe_.o: In functionmx_mat_to_blob(mxArraytag const, caffe::Blob, WhichMemory)': caffe.cpp:(.text+0x1674): undefined reference to mxIsGPUArray' caffe_.cpp:(.text+0x167d): undefined reference tomxInitGPU' caffe.cpp:(.text+0x1685): undefined reference to `mxGPUCreateFromMxArray' caffe.cpp:(.text+0x1690): undefined reference tomxGPUGetDataReadOnly' caffe_.cpp:(.text+0x16a3): undefined reference tomxGPUGetNumberOfElements' caffe.cpp:(.text+0x1854): undefined reference to`mxIsGPUArray' caffe.cpp:(.text+0x1860): undefined reference to mxGPUDestroyGPUArray' /tmp/mex_9704849759849136_22812/caffe_.o: In functionblob_set_data(int, mxArray_tag, int, mxArray_tag const)': caffe_.cpp:(.text+0x18f8): undefined reference to mxIsGPUArray' collect2: error: ld returned 1 exit status

Do you have any idea on how to fix them? Thanks.

zhangliliang commented 7 years ago

Hello,

Could you compile the official caffe branch on your computer? And what's the environment on your computer?

clzhou commented 7 years ago

I just installed your caffe branch successfully on Ubuntu 14.04 + Matlab 2014a. The compilation of matlab APIs failed on Ubuntu 16.04 + Matlab 2014b where I have compiled the official caffe successfully. I guess it may be something related to the use of mxGPUArray in the caffe_.cpp. To compile it, I have to explicitly add the following include directory to the Makefile.config: /usr/local/MATLAB/R2014b/toolbox/distcomp/gpu/extern/include. Otherwise, the compiler cannot find gpu/mxGPUArray.h. Then, the above errors occurred. Do you know which library should be linked against in order to use APIs like mxInitGPU?

zhangliliang commented 7 years ago

@clzhou

I am sorry that I have not check out this repo on Ubuntu 16.04. And currently I have no idea for fixing this issue.

clzhou commented 7 years ago

Thanks anyway.