kk1995 / randomforest-matlab

Automatically exported from code.google.com/p/randomforest-matlab
0 stars 0 forks source link

invalid precompiled mex files #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am running Matlab version 7.1.0.246 (R14) Service pack 3 on a 64 bit machine, 
however the Matlab is installed in C:\Program Files (x86) which indicates that 
it is a 32 bit installation. I have downloaded the precompliled files and when 
I run the tutorial_RegRF.m I get the following error:

Setting to defaults 500 trees and mtry=3
??? Invalid MEX-file 
'C:\Users\Igor\Projects\Windows-Precompiled-RF_MexStandalone-v0.02-\RF_MexStanda
lone-v0.02-precompiled\randomforest-matlab\RF_Reg_C\mexRF_train.mexw32': The 
specified procedure could not be found.

.

Error in ==> regRF_train at 283
    [ldau,rdau,nodestatus,nrnodes,upper,avnode,...

I have checked that my machine has Microsoft visual C++ 2005 redistributable 
installed in the Control Panel. 

My version of Matlab is quiet old. 

Do you think compiling the files myself will solve the issue? 

Thank you in advance. 

Original issue reported on code.google.com by Rodiono...@gmail.com on 17 Apr 2012 at 4:05

GoogleCodeExporter commented 8 years ago
Hi

i think there is some issue with the mex files. maybe its looking for the 32bit 
redistributable or something that is 32 bit but not present on the 64 bit 
machine

compiling the files on your own may solve the issue, but i am not sure if you 
can get visual studio compiling 32 bit binaries on a 64bit machine.

you will have to install either visual studio or visual express c++ and then 
run mex -setup on the command prompt, that should find the newly installed 
compiler and once that is done, use the compile_windows script (download the 
source version of the package and don't use the precompiled version)

Original comment by abhirana on 17 Apr 2012 at 6:53

GoogleCodeExporter commented 8 years ago
Hi,

Thank you very much for a fast reply. I have managed to get it to work. 

I have checked a list of the supported compilers by my old version of Matlab 
with "mex -setup" function. Then I installed one the compilers (Borland C/C++ 
(free command line tools) version 5.5) and run the compile_window script from 
the source version. The functions seem to be working perfectly.

For completion sake I would like to mention that I have done this on another 
machine which is 32-bit, although everything I mentioned should still work on a 
64-bit machine.

Thank you so much for your code as it will aid me greatly in my research. 

Original comment by Rodiono...@gmail.com on 17 Apr 2012 at 10:30

GoogleCodeExporter commented 8 years ago
great. good to hear it works for you. do tell if you run into any issues

also if you are training and testing thousands of time, you might run into this 
issue http://code.google.com/p/randomforest-matlab/issues/detail?id=21
the svn code fixes that

Original comment by abhirana on 18 Apr 2012 at 6:07

GoogleCodeExporter commented 8 years ago
ok as I mentioned before I have compiled the regression random forest files and 
they work. However I tried to compile the classification random files by 
running the compile_window.m file from the classification folders and get the 
following error:

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland 
Fatal: Illegal option: win32 

  C:\PROGRAM FILES\MATLAB71\BIN\MEX.PL: Error: Link of 'mexClassRF_train.mexw32' failed. 

??? Error using ==> mex
Unable to complete successfully

Do you think using another compiler will do the trick? Here is the list of 
compilers my Matlab version supports:

[1] Borland C++Builder version 6.0 
[2] Borland C++Builder version 5.0 
[3] Borland C++Builder version 4.0 
[4] Borland C++Builder version 3.0 
[5] Borland C/C++ version 5.2 
[6] Borland C/C++ version 5.0 
[7] Borland C/C++ (free command line tools) version 5.5 
[8] Digital Visual Fortran version 6.0 
[9] Digital Visual Fortran version 5.0 
[10] Lcc C version 2.4.1 
[11] Microsoft Visual C/C++ version 7.0 
[12] Microsoft Visual C/C++ version 7.1 
[13] Microsoft Visual C/C++ version 6.0 
[14] Microsoft Visual C/C++ version 5.0 
[15] Open WATCOM C/C++ version 1.3 
[16] WATCOM C/C++ version 11 
[17] WATCOM C/C++ version 10.6 

Thanks in advance for your help.

Original comment by Rodiono...@gmail.com on 18 Apr 2012 at 9:52

GoogleCodeExporter commented 8 years ago
Hi

yup the visual c/c++ version should work fine
you could probably install the visual c++ express and its free 
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-ex
press

i think the borland compiler is borking the inputs somehow, i dont use win32 
anywhere in my code except in the path to a file

do tell if you still run into issue

Original comment by abhirana on 19 Apr 2012 at 12:57