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

Glmnet Mex dependency on old version of libgfortran - Ubuntu #73

Closed
taraeicher opened this issue Apr 5, 2024 · 8 comments
Closed

Glmnet Mex dependency on old version of libgfortran - Ubuntu #73

taraeicher opened this issue Apr 5, 2024 · 8 comments

Comments

@taraeicher
Copy link

I am trying to run Singe_Example.m on an Ubuntu machine. However, I am getting the following error from glmnetMex.mexa64. I unfortunately cannot install libgfortran3 on my machine as it is deprecated. Is there any workaround for this?

In SINGE (line 20)
In SINGE_Example (line 16)
In run (line 112)

randomizer =

  737892

Invalid MEX-file '/home/ubuntu/SINGE/SINGE/glmnet-matlab/glmnetMex.mexa64':
libgfortran.so.3: cannot open shared object file: No such file or directory

Error in glmnetControl (line 79)
ivals.pmin, ivals.exmx, ivals.prec, ivals.mxit] = glmnetMex();

Error in glmnet (line 329)
inparms = glmnetControl();

Error in iLasso_for_SINGE (line 111)
fit = glmnet(Am, bm, params.family, opt);

Error in run_iLasso_row (line 27)
[metric] = iLasso_for_SINGE(m, outs, lambda,p1,dT,std_dev,params);

Error in SINGE_GLG_Test (line 79)
[for_metric] = run_iLasso_row(m,outs,params,irow);

Error in SINGE (line 20)
SINGE_GLG_Test(Data,'--outdir',outdir,args{:})

Error in SINGE_Example (line 16)
SINGE(data,gene_list,outdir,hyperparameter_file);

Error in run (line 112)
evalin('caller', strcat(scriptStem, ';'));

@agitter
Copy link
Member

agitter commented Apr 5, 2024

Based on the MATLAB glmnet download and revision history pages, it does not seem to be maintained. That limits what we can do to fix this within the SINGE source.

Is Docker an option for you? I expect our Docker image will run in a newer Ubuntu system.

@taraeicher
Copy link
Author

taraeicher commented Apr 19, 2024

Thank you for your response @agitter . I will try the Docker image and will follow up.

@taraeicher
Copy link
Author

taraeicher commented Apr 23, 2024

@agitter I have installed Docker and pulled the image, but there seems to be a problem with the command in the README. When I run docker run -v $(pwd):/SINGE -w /SINGE agitter/singe:0.4.0 standalone data1/X_SCODE_data.mat data1/gene_list.mat Output default_hyperparameters.txt, I get the error Unable to read file 'data1/gene_list.mat'. No such file or directory. This happens even when I use the full path to gene_list.mat.

Shall I write this up as a separate issue?

@agitter
Copy link
Member

agitter commented Apr 23, 2024

We can discuss the Docker issue here. I don't see a way to resolve the root cause of the dependency issue without help from the MATLAB glmnet team, and they do not seem active.

When I first tried running the Docker image I ran into the same error you did. This indicates that the Docker volume mount failed. I'm currently on Windows running in the Git for Windows, so I needed to use workarounds (docker-archive/toolbox#673 (comment)) to fix the file paths. Those should not be necessay with Ubuntu. The final command that worked for me is

winpty docker run -v /$(pwd)://SINGE -w //SINGE agitter/singe:0.5.1 standalone data1/X_SCODE_data.mat data1/gene_list.mat Output default_hyperparameters.txt

The next thing to try would be running the container interactively with -it to see if the volume mounting worked. For me I ran

winpty docker run -it -v /$(pwd)://SINGE -w //SINGE --entrypoint "//bin/bash" agitter/singe:0.5.1

but on Ubuntu you should not need the winpty or the // to escape absolute paths. If that doesn't work, we can see what might be going wrong on your system.

Note that I'm also using the latest version of the Docker image, 0.5.1.

@taraeicher
Copy link
Author

The first command did not work for me even after upgrading to 0.5.1, but the second command (running the container iteratively) appears to have worked:
(base) root@a44f5f7ea678:/SINGE#

@agitter
Copy link
Member

agitter commented Apr 25, 2024

If the second interactive command works, that suggests the image works correctly but path mounting is the problem. After you launch the container interactively can you see any mounted files? I see

(base) root@ef1d6d7c09fc:/SINGE# ls
LICENSE          TempMat_35.mat        data1                        glmnet_matlab.zip               run_SINGE_GLG_Test.sh
NEWS.md          TempMat_55.mat        data2                        readme_SINGE_Aggregate.txt      run_SINGE_GLG_Test_mac.sh
Output           TempMat_64.mat        data3                        readme_SINGE_Aggregate_mac.txt  scripts
README.md        USAGE.md              data_bifurcated              readme_SINGE_GLG_Test.txt       tests
SINGE.sh         code                  default_hyperparameters.txt  readme_SINGE_GLG_Test_mac.txt   winpty.exe.stackdump
SINGE_Example.m  compile_SINGE.sh      docker                       run_SINGE_Aggregate.sh
TempMat_15.mat   compile_SINGE_mac.sh  glmnet_matlab                run_SINGE_Aggregate_mac.sh

(base) root@ef1d6d7c09fc:/SINGE# ls data1/
README.md  X_BranchTest.mat  X_SCODE_data.mat  X_regix_test.mat  gene_list.mat

Are you running the command from the root of this GitHub repository, the SINGE directory? The command expects that data1/ is a subdirectory of the working directory where you run the command from.

@taraeicher
Copy link
Author

Thank you for your help! It looks like it was just an issue with the working directory. After changing the working directory, I was able to see the mounted files and to run the command without any errors.

@agitter
Copy link
Member

agitter commented Apr 26, 2024

Excellent, I'm glad that is working. Let us know if you have problems running the Docker container with your own 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

2 participants