pmtk3
pmtk3 copied to clipboard
Initialization failure on Mac OS (Lion) and Matlab 2012a
From [email protected] 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
From [email protected] 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.
From [email protected] 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.
From [email protected] 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.
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.