cannot find -lmwgpu!
Mostrar comentarios más antiguos
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 comentarios
Joss Knight
el 13 de Jul. de 2016
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
el 1 de Nov. de 2016
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
el 4 de Ag. de 2017
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{:});
Respuestas (0)
Categorías
Más información sobre Get Started with GPU Coder en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!