jiawenhao2015 / randomforest-matlab

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

Matlab (randomly) crash after a number of runs #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, 

I'm running random forest algorithm on a Linux machine (64-bit) (a cluster) 
with Matlab 2012b, 32 Go of RAM. 

I ran the random forest algorithm 20 times with a different subset of features 
at each iteration. Totally, let's say I run the algorithm around 2280 times (20 
runs * 114 features, at each iteration I add/remove one feature) . I repeat 
that for different dataset. Each dataset is a matrix of 1000*114 , 700*114 or 
300*114 doubles. The number of trees is fixed to 600. (The final goal is to 
select the best subset of features based on the relevance measure returned by 
RF and the OOB error)

At the beginning everything seems fine, the compilation is going fine, I 
started to have the first outputs.. 

For the same dataset, sometimes Matlab finish all the process without any 
problem. However, sometimes Matlab crash RANDOMLY.I cannot tell at which moment 
exactly Matlab crash.

The first lines of the errors are:

*** glibc detected *** ../matlab/wheezy/R2012b/bin/glnxa64/MATLAB: free(): 
invalid next size (normal): 0x0000000005858a70 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x76a16)[0x7f84585eaa16]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f84585ef7bc]
../MATLAB/RandomForest/RF_Class_C/mexClassRF_train.mexa64(+0x4d45)[0x7f8437796d4
5]
../MATLAB/RandomForest/RF_Class_C/mexClassRF_train.mexa64(mexFunction+0xcf9)[0x7
f84377939e9]
../matlab/wheezy/R2012b/bin/glnxa64/libmex.so(mexRunMexFile+0x5a)[0x7f845112d69a
]
../matlab/wheezy/R2012b/bin/glnxa64/libmex.so(+0x174e9)[0x7f84511294e9]
../matlab/wheezy/R2012b/bin/glnxa64/libmex.so(+0x1833c)[0x7f845112a33c]
../matlab/wheezy/R2012b/bin/glnxa64/libmwm_dispatcher.so(_ZN8Mfh_file11dispatch_
fhEiPP11mxArray_tagiS2_+0x21b)[0x7f845a0f3a4b]
../matlab/wheezy/R2012b/bin/glnxa64/libmwm_interpreter.so(+0x415206)[0x7f8459b74
206]
../matlab/wheezy/R2012b/bin/glnxa64/libmwm_interpreter.so(+0x41597a)[0x7f8459b74
97a]

Knowing that I have the same error using a windows machine (64-bit) with Matlab 
2013a, 8 Go of Ram.

Can you please provide any help,
Thank you in advance,
Best regards,
Nesrine

Original issue reported on code.google.com by nesrine....@gmail.com on 16 Mar 2015 at 10:17

Attachments:

GoogleCodeExporter commented 8 years ago
Hello Nesrine

try out the code from the repository instead of the download. the code in the 
repository has a fix that should prevent crashes on multiple iterations.

let me know if you still have any questions.

Original comment by abhirana on 16 Mar 2015 at 5:32

GoogleCodeExporter commented 8 years ago
Hello, 

Thank you for your answer. I tried out the code from the repository and I 
conducted several tests. But I still have an issue.. Apparently it's not 
exactly the same error (please find attached the text that illustrate the new 
error), but the result is the same; Matlab crashes after a number of runs..

Best regards,
Nesrine

Original comment by nesrine....@gmail.com on 24 Mar 2015 at 5:44

Attachments:

GoogleCodeExporter commented 8 years ago
hi nesrine

i think i'll have to debug the code. is it possible for you to get me a small 
sample of the dataset & code that will cause it to crash? my email is abhirana 
(at) gmail.com

Original comment by abhirana on 25 Mar 2015 at 2:54

GoogleCodeExporter commented 8 years ago
Hi Abhirana!

First of all, thank you very much for your work on this matlab RF port. I use 
it regularly, however the random crashes, as described above, are really 
annoying, especially in situations where the RF is used in cross validation 
loops. There, thousands of trainings and testings occur easily.This crashes 
also occur in the current version (svn 64).
I wrote a short example where you can replicate this crashes. This example 
crashes after approximately 5000 to 10000 loops. Tested on a Win7 (64bit, 16 Gb 
ram) and on an Ubuntu 14.04 (64bit, 8 Gb ram) system.
Please find all the files attached (also the crash dumps) and please let me 
know if you need further information.

Best regards,
David

Original comment by david.st...@gmail.com on 7 Jul 2015 at 4:14

Attachments:

GoogleCodeExporter commented 8 years ago
@david

thanks a lot. this will be really helpful in finding a solution. i'll get back 
to you in a day or two.

Original comment by abhirana on 7 Jul 2015 at 4:20