Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation error #7

Closed
clzhou opened this issue Sep 27, 2016 · 4 comments
Closed

compilation error #7

clzhou opened this issue Sep 27, 2016 · 4 comments

Comments

@clzhou
Copy link

clzhou commented Sep 27, 2016

Hello!

When compiling the specified Caffe version, I got the following errors:
/tmp/mex_9704849759849136_22812/caffe_.o: In functionmx_mat_to_blob(mxArray_tag 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 to mxGPUGetNumberOfElements' caffe_.cpp:(.text+0x1854): undefined reference tomxIsGPUArray'
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
Copy link
Owner

Hello,

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

@clzhou
Copy link
Author

clzhou commented Sep 28, 2016

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
Copy link
Owner

@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
Copy link
Author

clzhou commented Sep 28, 2016

Thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants