albanie / mcnSSD

A matconvnet implementation of the Single Shot Detector
MIT License
36 stars 23 forks source link

vl_nnmultiboxdetector.cpp does not pass mex compilation #3

Open itschner opened 7 years ago

itschner commented 7 years ago

Thank you for providing this port. What compiler is your mex setup designed to use?

Mine is Microsoft Visual C++ 2013 pro, Matlab 2015a, Cuda 8.0, which runs fine until mex reaches vl_nnmultiboxdetector.cpp (on the vl_contrib('compile', 'mcnSSD', 'contribUrl', 'github.com/albanie/matconvnet-contrib-test/') ; compile step)

Mex error returns (partial output): vl_compilenn: MEX CC: -outdir C:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnSSD\matlab\mex.build C:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnSSD\matlab\src\vl_nnmultiboxdetector.cpp -c -DNDEBUG -DENABLE_DOUBLE -DSSSE3 -IC:\Users\kc0tw\Dropbox\ClutterDetection\matconvnet-contrib\matconvnet-contrib\matlab\src -largeArrayDims CXXFLAGS=$CXXFLAGS CXXOPTIMFLAGS=$CXXOPTIMFLAGS Building with 'Microsoft Visual C++ 2013 Professional'. Error using mex vl_nnmultiboxdetector.cpp c:\users\kc0tw\dropbox\clutterdetection\matconvnet-contrib\matconvnet-contrib\contrib\mcnssd\matlab\src\vl_nnmultiboxdetector.cu(79) : warning C4305: 'initializing' : truncation from 'double' to 'float'

Which results in Matlab error: Error in vl_compilenn>mex_compile (line 544) mex(mopts{:}) ;

Error in vl_compilenn (line 500) mex_compile(opts, srcs{i}, objfile, [flags.cc, flags.mexcc]) ;

Error in compile_mcnSSD (line 15) vl_compilenn(opts{:}, varargin{:}, 'preCompileFn', @preCompileFn,'verbose',1) ;

Error in vl_contrib>module_compile (line 210) handle(varargin{:});

Error in vl_contrib (line 93) module_compile(module, varargin{:});

I'm guessing this will have to do with the mex compiler version.

albanie commented 7 years ago

Hi @itschner, sorry for the slow response. Unfortunately I haven't tested compilation with the Visual Studio compiler. I will try to get my hands on one to fix the issue (I tested with Matlab 2016a, GNU C++, cuda 7.5).