cannot find -lmwgpu!
이전 댓글 표시
While compiling a mex file with GPU support, I am getting the following error
Error using mex
/usr/bin/ld: cannot find -lmwgpu
collect2: error: ld returned 1 exit status
Any idea how to resolve this issue.
댓글 수: 3
Joss Knight
2016년 7월 13일
More information needed. What version of MATLAB do you have, and what are you entering at the command line to get this error.
Michael Teresi
2016년 11월 1일
I also have this error.
MATLAB 2016b
Ubuntu 14.04 (4.4.0)
Full call:
user@host:~/caffe$ make matcaffe
MEX matlab/+caffe/private/caffe_.cpp
Building with 'g++'.
/usr/bin/ld: cannot find -lmwgpu
collect2: error: ld returned 1 exit status
make: *** [matlab/+caffe/private/caffe_.mexa64] Error 255
This occurs when adding an include and a link for Matlab (abbreviated):
MATLAB_INCLUDE := -I$(MATLAB_DIR)/toolbox/distcomp/gpu/extern/include
MATLAB_LIBS := -lmwgpu
CXXFLAGS="\$$CXXFLAGS $(MATLAB_CXXFLAGS) -I$(MATLAB_DIR)/toolbox/distcomp/gpu/extern/include"\
CXXLIBS="\$$CXXLIBS $(STATIC_LINK_COMMAND) $(LDFLAGS) -lmwgpu" -output $@
(I inherited this Makefile from another colleague)
ziteng Liu
2017년 8월 4일
Hi, have you solved this problem? I have the same error when I use mexcuda function as follow:
mexcuda mexGPUExample.cu
Then I get
Building with 'nvcc'.
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
Error using mex
/usr/bin/ld: cannot find -lmwgpu
collect2: error: ld returned 1 exit status
Error in mexcuda (line 157)
[varargout{1:nargout}] = mex(mexArguments{:});
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!