probml / pmtk3

Probabilistic Modeling Toolkit for Matlab/Octave.
MIT License
1.55k stars 797 forks source link

Initialization failure on Mac OS (Lion) and Matlab 2012a #46

Open ido opened 10 years ago

ido commented 10 years ago

From alexandr...@gmail.com on September 16, 2012 00:39:17

What steps will reproduce the problem? Run the initialization What is the expected output? What do you see instead? Matlab crashes gives this error message:

Process: MATLAB [3801] Path: /Applications/MATLAB_R2012a.app/Contents/MacOS/StartMATLAB Identifier: com.mathworks.matlab Version: R2012a 7.14.0 Code Type: X86-64 (Native) Parent Process: launchd [134]

Date/Time: 2012-09-16 00:31:51.371 -0400 OS Version: Mac OS X 10.7.4 (11E53) Report Version: 9

Interval Since Last Report: 79014 sec Crashes Since Last Report: 4 Per-App Interval Since Last Report: 575374 sec Per-App Crashes Since Last Report: 4 Anonymous UUID: 6BFC8F52-6A0E-496B-9C3C-652CC662D37A

Crashed Thread: 3

Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information: objc[3801]: garbage collection is OFF

Dyld Error Message: Symbol not found: __gfortran_allocate64_array Referenced from: /Users/USER/Documents/*/glmnetMex.mexmaci64 Expected in: /Applications/MATLAB_R2012a.app/sys/os/maci64/libgfortran.3.dylib What version / revision of the product are you using? On what operating system? Jan11 2012, version 3

Mac OS Lion (10.7.4) Please provide any additional information below. The problem seems to appear at the last step of the initialization "Compile mex"

Original issue: http://code.google.com/p/pmtk3/issues/detail?id=46

ido commented 10 years ago

From ed...@socialflow.com on September 17, 2012 20:10:00

Same problem here

ido commented 10 years ago

From vonphoms...@gmail.com on October 04, 2012 09:24:24

Seems to have the same problem. In my case it failed at glmnet(x,y). So I block out the entired %write glmnetInstalled.m part. For now I'm able to run testPmtk3 to completion.

ido commented 10 years ago

From t...@vollmer.ws on December 10, 2012 18:00:49

I appear to have the same problem as well. Mac OS 10.8.2. The dump shows a similar problem.

ido commented 10 years ago

From ankgu...@gmail.com on January 09, 2013 14:20:38

Same problem.

ido commented 10 years ago

From bonn...@gmail.com on January 20, 2013 17:51:48

I also met this problem.

ido commented 10 years ago

From PuBoBi.C...@gmail.com on February 12, 2013 10:02:06

same problem

ido commented 10 years ago

From sandro.r...@gmail.com on February 14, 2013 15:36:44

same problem

ido commented 10 years ago

From ddel...@gmail.com on February 26, 2013 08:31:45

There is a try-catch statement after line "% /usr/local/lib/libgfortran.2.dylib is missing", but the catch statement fails to catch the error, as the error crashes Matlab.

Solution: we know that glmnet() is failing on Mac, so the catch block should be executed. Replace that try-catch-end block with one line:

installed=false;

And then run initPmtk3 again.

I do not recommend following the solution in comment #2, as the function glmnetInstalled.m will not be created if you comment that block of code completely.

weaselj commented 10 years ago

Updating the glmnet-matlab toolbox solved this for me, just replace the pmtksupportCopy/glmnet_matlab directory with the latest version from here: http://www.stanford.edu/~hastie/glmnet_matlab/

This would also require changing the call to glmnetPredict in cvglmnetMulticlass.m line 55 to: predmat = glmnetPredict(glmnet_object, x, options.lambda, type); and in line 61 to: predmat(which,:) = glmnetPredict(cvfit,x(which,:),options.lambda, type); As the order of parameters for this function has changed.