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
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
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
More specifically change the Makefile: Caffe Master Makefile line 519
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
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 ExchangeGet Started with GPU Coder についてさらに検索

質問済み:

2016 年 7 月 11 日

コメント済み:

2017 年 8 月 4 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by