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

solveLP() does not work because of issue in code #478

Closed
1 task done
pranasag opened this issue Mar 29, 2023 · 6 comments · Fixed by #479
Closed
1 task done

solveLP() does not work because of issue in code #478

pranasag opened this issue Mar 29, 2023 · 6 comments · Fixed by #479
Labels
fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.

Comments

@pranasag
Copy link

Description of the issue:

Calling solveLP(model) gives an error message regardless of the solver used. The issue traces back to optimizeProb.m, solver case for SoPlex:
Line 195, where is a loop with a counter i that is not initialized (as per error message). Putting i = 1; a line above allows the routine to run. Checked with Gurobi as the set solver. Haven't checked SoPlex since RAVEN does not somehow see the present installation.

System information

*** THE RAVEN TOOLBOX ***

Installing from location /Users/pranas/Documents/MATLAB/RAVEN
Checking RAVEN release 2.8.0
You are running the latest RAVEN release
Checking MATLAB release 2019a
Checking system architecture maci64
Set RAVEN in MATLAB path Pass
Save MATLAB path Pass
Make binaries executable Pass

=== Model import and export ===

Add Java paths for Excel format Pass
Checking libSBML version 5.19.0
Checking model import and export
Import Excel format Pass
Export Excel format Pass
Import SBML format Pass
Export SBML format Pass

=== Model solvers ===

Checking for LP solvers
glpk Pass
gurobi Pass
soplex Fail
cobra Pass
Set RAVEN solver gurobi

=== Essential binary executables ===

Checking BLAST+ Pass
Checking DIAMOND Pass
Checking HMMER Pass

=== Compatibility ===

Checking function uniqueness Fail
Duplicate functions in /Users/pranas/[redacted]/Human-GEM/code/GPRs
getGenesFromGrRules.m
Resolve conflicting functions to ensure RAVEN functionality

*** checkInstallation complete ***

I hereby confirm that I have:

@edkerk
Copy link
Member

edkerk commented Mar 29, 2023

Can you please post the error message that you get when you run solveLP(model)? It seems to pass during checkInstallation.

I'm not sure line 195 could make solveLP fail for all solvers. While you correctly identified a bug that can be fixed with i=1 (thanks! Will fix for 2.8.1), this should only throw an error when soplex is set as solver on MATLAB <2020b.

Finally, I've also heard anecdotes of difficulties to get SoPlex to work on unix, while it seems to work smoothly on Windows.

@pranasag
Copy link
Author

Can you please post the error message that you get when you run solveLP(model)? It seems to pass during checkInstallation.

Here you go, I cloned the repo fresh, so line numbers should align:

setRavenSolver('gurobi');
solveLP(model);

Error message:

Error: File: optimizeProb.m Line: 195 Column: 17
"i" previously appeared to be used as a function or command, conflicting with its use here as the name of a variable.
A possible cause of this error is that you forgot to initialize the variable, or you have initialized it implicitly using load or
eval.

Error in solveLP (line 103)
res = optimizeProb(prob,params);


Finally, I've also heard anecdotes of difficulties to get SoPlex to work on unix, while it seems to work smoothly on Windows.

Yes, I've heard some as well. In my case, the soplex binary can be called from the normal terminal, but the system call system('soplex') in MATLAB does not work (zsh:1: command not found: soplex).

edkerk added a commit that referenced this issue Mar 31, 2023
@edkerk
Copy link
Member

edkerk commented Mar 31, 2023

Regarding SoPlex, is there a difference whether you open MATLAB from the Launcher or from the Terminal?

@pranasag
Copy link
Author

pranasag commented Apr 3, 2023

Regarding SoPlex, is there a difference whether you open MATLAB from the Launcher or from the Terminal?

Indeed there is - if MATLAB is launched from the terminal, then all the installed solvers pass the checkInstallation routine.

@edkerk
Copy link
Member

edkerk commented Apr 3, 2023

Ok, then I might have a solution to test.

Meanwhile, #479 should resolve your other issue, could you please test as I do not have access to pre-202b MATLAB?

@pranasag
Copy link
Author

pranasag commented Apr 3, 2023

Ok, then I might have a solution to test.

Meanwhile, #479 should resolve your other issue, could you please test as I do not have access to pre-202b MATLAB?

Seems to work, no error messages this time

@edkerk edkerk added the fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch. label Apr 3, 2023
@edkerk edkerk mentioned this issue May 17, 2023
4 tasks
@edkerk edkerk closed this as completed May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants