Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATLAB crashing during uf_glmfit when glmnet method is used #60

Open
anikokusztor opened this issue Nov 19, 2018 · 5 comments
Open

MATLAB crashing during uf_glmfit when glmnet method is used #60

anikokusztor opened this issue Nov 19, 2018 · 5 comments

Comments

@anikokusztor
Copy link

MATLAB version: R2017b

I have encounter a fatal error when running uf_glmfit with glmnet method.
E.g.
EEG= uf_glmfit(EEG,'method','glmnet');

The error message referred to Access Violation, and the error was detected when a MEX file was running:
Stack Trace (from fault):
[1] **\MATLAB\unfold-master\lib\glmnet_matlab\glmnetMex.mexw64+00006620 MEXFUNCTION+00002524

@behinger correctly suggested that the problem may originate from a compiler error and provided the following link (https://web.stanford.edu/~hastie/glmnet_matlab/win64compile.html) to recompile the glmnet toolbox.

I have found an alternative solution by downloading a MATLAB add-on named MATLAB Support for MinGW-w64 C/C++ Compiler.
https://se.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler

After installing the add-on, the error no longer occurred and the model fitting worked well.

@olafdimigen
Copy link
Member

Encountered the same issue as Aniko. Her solution via the MATLAB add-in worked fine for me.

@behinger
Copy link
Member

behinger commented Jan 4, 2021

can you upload/replace the resulting mex-file?

@olafdimigen
Copy link
Member

Have to correct myself: Aniko's solution did not work for me (oversaw crash message caused by the MEX file).
Can't get glmnet to run on Matlab 2020a, Win10 yet, can't recompile with the Matlab MinGW compiler ("No supported compiler found")

@behinger
Copy link
Member

behinger commented Jan 4, 2021

I was wondering myself, because afaik glmnet is in Fortran not c/c++

@behinger behinger reopened this Jan 4, 2021
@olafdimigen
Copy link
Member

olafdimigen commented Jan 5, 2021

I have re-compiled glmnet for Windows 64bit with the Intel Fortran compiler on Win10, Matlab 2020a, commit 75d540f to development branch. The resulting MEX file produced reasonable-looking glmnet results with real data. We should test whether this still works with Win-7 and/or run test on simulated data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants