Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

trouble getting many tests to pass

Terry
2012-03-08
2013-10-31
  • Terry
    Terry
    2012-03-08

    I'm using win 7 64bit. On my home pc, I can get all tests to pass, but on my work pc, many tests will not pass. I am not supposed to do work on the home PC. Here's the list not passing:
    testC13Fitting
    testFBA
    testFVA
    testGDLS
    testGrowthExpMatch
    testOptKnock
    testSolvers
    testTissueModel

    I have no clue what is going on. I've spent days tring to get it to work. Is it some kind of permissions issues? I'm using Matlab R2011a and cobra 2.0.4 for both. The only difference is Gurobi 4.6.0 for home pc and 4.6.1 for work pc, but that does not look to be the problem.

    Every test gives a different error. Examples:
    >> testOptKnock

    tend =

        0.2020

    ??? Reference to non-existent field 'rxnList'.

    Error in ==> testOptKnock at 65

    testOptKnockSol(model,optKnockSol.targetRxn,optKnockSol.rxnList);

    >> testFBA

    *** Test basic FBA calculations ***

    ** Optimal solution

    ** Optimal minimum 1-norm solution **
    Test failed for Optimal minimum 1-norm solution for f values
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    Error in ==> testFBA at 50
        if abs(model.c'*solution.x - solution.f)>tol

    For the optknock test, I noticed that optKnockSol is created after the following line:
    = OptKnock(model,selectedRxns,options,constrOpt,previousSolution,0,'optknocksol');

    but will not have 'rxnList' in it like it is supposed to. Thanks. Any help would be much appreciated.

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-03-08

    My first guess would be that there's a problem with your gurobi_mex interface on your work machine.  Try running the following gurobi_mex tests from matlab:

    test_gurobi_mex_LP
    test_gurobi_mex_MIP
    test_gurobi_mex_QP
    test_gurobi_mex_MIQP

    If gurobi_mex is fine then could you run the following commands for the cobra toolbox and posting the output?

    changeCobraSolver
    testFBA
    load Ec_iJR904.mat
    optimizeCbModel(model)

    This is approximately what should happen:

    >> changeCobraSolver
    The solvers defined are:

    CBTLPSOLVER =

    gurobi

    CBT_MILP_SOLVER =

    gurobi

    CBT_QP_SOLVER =

    gurobi

    CBT_MIQP_SOLVER =

    gurobi

    ans =

         0

    >> testFBA

    *** Test basic FBA calculations ***

    ** Optimal solution

    ** Optimal minimum 1-norm solution **
    Test succeeded for Optimal minimum 1-norm solution for f values
    Test succeeded for Optimal minimum 1-norm solution for c*x values

    ** Optimal solution on fructose **
    Test succeeded for Optimal solution on Fructose for f values
    Test succeeded for Optimal solution on Fructose for c*x values

    ** Optimal anaerobic solution **
    Test succeeded for Optimal anaerobic solution for f values
    Test succeeded for Optimal anaerobic solution for c*x values

    ** Optimal ethanol secretion rate solution **
    Test succeeded for Optimal ethanol secretion rate solution for f values
    Test succeeded for Optimal ethanol secretion rate solution for c*x values

    ans =

         1

    >> load Ec_iJR904.mat
    >> optimizeCbModel(model)

    ans =

               x:
               f: 0.9219
               y:
               w:
            stat: 1
        origStat: 2
          solver: 'gurobi'
            time: 0.0252

     
  • Terry
    Terry
    2012-03-08

    The gurobi tests look fine. Here's the output you asked for (there was an error):

    >> changeCobraSolver
    testFBA
    load Ec_iJR904.mat
    optimizeCbModel(model)
    The solvers defined are:

    CBTLPSOLVER =

    gurobi

    CBT_MILP_SOLVER =

    gurobi

    CBT_QP_SOLVER =

    gurobi

    CBT_MIQP_SOLVER =

    gurobi

    ans =

         0

    *** Test basic FBA calculations ***

    ** Optimal solution

    ** Optimal minimum 1-norm solution **
    Test failed for Optimal minimum 1-norm solution for f values
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    Error in ==> testFBA at 50
        if abs(model.c'*solution.x - solution.f)>tol

     
  • Terry
    Terry
    2012-03-08

    so The error above was only for testFBA.  The rest worked:

    load Ec_iJR904.mat
    >> optimizeCbModel(model)

    ans =

               f: 0
               x:
            stat: -1
        origStat:
          solver: 'gurobi'
            time: 0.0150

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-03-08

    Basically, it looks like the gurobi_mex that's being called isn't working correctly.  Perhaps you've got a new and old version of gurobi_mex in your path?  Or the gurobi_mex that you're using is compiled against a different version of gurobi or matlab; did you compile the 64-bit gurobi mex or download it?  What's your version of gurobi_mex?

    If it's none of the above then can you post the output to the following commands:

    which gurobi_mex
    test_gurobi_mex_LP
    path
    ls 

     
  • Terry
    Terry
    2012-03-08

    I downloaded gurobi mex from:
    http://www.caam.rice.edu/~wy1/gurobi_mex/download_request.html

    and then to compile, I used:
    mex -O -largeArrayDims -I"C:\Gurobi461\win64\include" "C:\Program Files\MATLAB\R2011a\toolbox\installed\gurobi_mex_v1.61\gurobi_mex.c" "C:\Gurobi461\win64\lib\gurobi46.lib" "C:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libut.lib"

    Here are the command results:

    Gurobi Mex Version 1.61. Gurobi Library Version 4.6.1.
    Optimize a model with 3 rows, 3 columns and 8 nonzeros
    Presolve time: 0.00s
    Presolved: 3 rows, 3 columns, 8 nonzeros

    Iteration    Objective       Primal Inf.    Dual Inf.      Time
           0   -1.5000000e+31   4.500000e+30   1.500000e+01      0s
           2   -7.8000000e+01   0.000000e+00   0.000000e+00      0s

    Solved in 2 iterations and 0.02 seconds
    Optimal objective -7.800000000e+01
    Solution:
         0    15     3

    Optimal obj value:
       -78

    Exit flag:
         2

    Optimization info:
        IterCount: 2
          Runtime: 0.0312
         ErrorMsg:
         Versions:

    Reduce costs:
         1     0     0

    Lagrange multiplers:
             0   -1.5000   -0.5000

    Constraint slacks:
        12     0     0

    >> path

    MATLABPATH

    C:\Users\najdt0\Documents\MATLAB
    C:\Program Files\MATLAB\R2011a\toolbox\installed\gurobi_mex_v1.61
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\unit
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\reconstruction\mass_balance\basicphysicochemicaldata
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\solvers
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testgdls
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\accessmodel\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\raterule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\speciesconcentrationrule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\maps
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testfba
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\algebraicrule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\design
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\fluxomics
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\rule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\reconstruction\mass_balance
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\reconstruction\mass_balance
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\m2html\templates\frame
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\rfba
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\event
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\functiondefinition
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\parameter
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\external
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\glpkmex
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testgrowthexpmatch
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\sampling
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\buildmps
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\docs\structure
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\speciesreference
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\fluxomics\obsolete
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\tools
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\m2html\templates
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\rfba
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\gapfilling\kegg
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\reconstruction\mass_balance\basicphysicochemicaldata
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\tools
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testsbml
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\solvers
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\maps\tools
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\modifierspeciesreference
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\gapfilling
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\simulation\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testoptknock
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\convenience\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testrobustnessanalysis
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\maps\tools
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\io
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\fluxomics\c13solver
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\localparameter
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testmodelmanipulation
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\reaction
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testc13fitting
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\reconstruction
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\m2html
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\speciestype
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testdeletionstudy
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\docs\structure-functions
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testtissuemodel
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\gapfilling\growthexpmatch
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\model
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\validate_matlab_sbml_structures\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\compartmenttype
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\design
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\compartment
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\accessmodel
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\reconstruction
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testsampling
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\convenience
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\trigger
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testmaps
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testsolvers\testnlpscripts
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\external\m2html
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\constraint
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testsolvers
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testpfba
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\parameterrule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\maps
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\assignmentrule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\test
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\structfieldnames
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\simulation
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testelementalbalance
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\initialassignment
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\delay
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\unitdefinition
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testfva
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\gapfilling
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\sampling
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\kineticlaw
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\species
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\io
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\m2html\templates\blue
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\test\test-data
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\eventassignment
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\compartmentvolumerule
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testmoma
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\priority
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\gapfilling\kegg
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\external\buildmps
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\fluxomics\c13solver
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\docs
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\matlab_sbml_structure_functions\stoichiometrymath
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\fluxomics
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\external\toolboxes\sbmltoolbox-4.0.1\toolbox\validate_matlab_sbml_structures
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\docs\cobra\gapfilling\growthexpmatch
    C:\Program Files\MATLAB\R2011a\toolbox\installed\cobra\testing\testbuildmps
    C:\Program Files\SBML\libSBML-5.1.0b0-libxml2-x64\bindings\matlab\matlab
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\general
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\ops
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\lang
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\elmat
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\randfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\elfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\specfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\matfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\datafun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\polyfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\funfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\sparfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\scribe
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\graph2d
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\graph3d
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\specgraph
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\graphics
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\uitools
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\strfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\imagesci
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\iofun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\audiovideo
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\timefun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\datatypes
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\verctrl
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\codetools
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\helptools
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\winfun
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\winfun\net
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\demos
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\timeseries
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\hds
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\guide
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\plottools
    C:\Program Files\MATLAB\R2011a\toolbox\local
    C:\Program Files\MATLAB\R2011a\toolbox\matlab\datamanager
    C:\Program Files\MATLAB\R2011a\toolbox\shared\simulink
    C:\Program Files\MATLAB\R2011a\toolbox\shared\instrument
    C:\Program Files\MATLAB\R2011a\toolbox\shared\asynciolib
    C:\Program Files\MATLAB\R2011a\toolbox\shared\comparisons
    C:\Program Files\MATLAB\R2011a\toolbox\shared\controllib\general
    C:\Program Files\MATLAB\R2011a\toolbox\shared\controllib\graphics
    C:\Program Files\MATLAB\R2011a\toolbox\shared\eml\eml
    C:\Program Files\MATLAB\R2011a\toolbox\shared\testmeaslib\general
    C:\Program Files\MATLAB\R2011a\toolbox\shared\testmeaslib\graphics
    >> ls

    .                        java                     test_gurobi_mex_MIP.log 
    ..                       license.txt              test_gurobi_mex_MIP.mps 
    appdata                  notebook                 toolbox                 
    bin                      patents.txt              trademarks.txt          
    etc                      resources                uninstall               
    extern                   sys                     
    help                     test_gurobi_mex_LP.log  
    ja                       test_gurobi_mex_LP.mps  

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-03-08

    Didn't see your output for which gurobi_mex.

    You might want to try glpkmex to determine if it's a gurobi issue or more general issue.
    Install glpkmex from here: https://sourceforge.net/projects/glpkmex/
    Make sure it works:  glpktest1
    Change cobra solver: changeCobraSolver('glpk','LP')
    Run testFBA again: testFBA
    and changeCbSolver to glpk and see if it has a similar problem.

     
  • Terry
    Terry
    2012-03-09

    After I ran the testFBA, I did not get an error:

    >> testFBA

    *** Test basic FBA calculations ***

    ** Optimal solution

    ** Optimal minimum 1-norm solution **
    Test succeeded for Optimal minimum 1-norm solution for f values
    Test succeeded for Optimal minimum 1-norm solution for c*x values

    ** Optimal solution on fructose **
    Test succeeded for Optimal solution on Fructose for f values
    Test succeeded for Optimal solution on Fructose for c*x values

    ** Optimal anaerobic solution **
    Test succeeded for Optimal anaerobic solution for f values
    Test succeeded for Optimal anaerobic solution for c*x values

    ** Optimal ethanol secretion rate solution **
    Test succeeded for Optimal ethanol secretion rate solution for f values
    Test succeeded for Optimal ethanol secretion rate solution for c*x values

    ans =

         1

    I'm not not how to do what you last mentioned "changeCbSolver to glpk and see if it has a similar problem".
    I'm a little new to matlab and COBRA toolbox

     
  • Terry
    Terry
    2012-03-09

    Oh and forgot to add what you asked for earlier:

    >> which gurobi_mex
    C:\Program Files\MATLAB\R2011a\toolbox\installed\gurobi_mex_v1.61\gurobi_mex.mexw64

    I also tried to get a "gurobi_mex.mexw64" file online that was compiled using the same version of OS, matlab and Gurobi and I still got the same issue. This is baffling.

    and by the way, I was thinking we met before, but now I remember;  you gave us an online talk at the center for biorenewable chemical a couple of years ago!  Thanks so much for the help with this problem.

     
  • Terry
    Terry
    2012-03-09

    a little update:

    I ran:  test_gurobi_mex_CS

    and I got the following error:

    Gurobi Mex Version 1.61. Gurobi Library Version 4.6.1.
    GUROBI ERROR: Model too large for current Gurobi license
    Index exceeds matrix dimensions.

    Error in test_gurobi_mex_CS (line 59)
        x = sol(1:n);

    Could that be the problem? I have a free commercial evaluation of Gurobi

     
  • Daniel Hyduke
    Daniel Hyduke
    2012-03-09

    That's probably it.  If you're just getting started, I'd recommend using glpkmex as it works great for the most common functions (e.g., simulating growth, gene deletion, flux variability).  If your research requires things beyond glpk's capabilities then you'll eventually want to invest in something like gurobi or tomlab.

     
  • Terry
    Terry
    2012-03-13

    Thanks for narrowing it down to the solver Daniel. I got an unrestricted evaluation from the people at Gurobi and the tests are now working!
    I’m wondering if “testC13Fitting” is supposed to work with Gurobi. That’s the only one not working right now (I pasted the error at the bottom). I’m actually trying to figure out if TomLab is the better choice. From what I understand, all you need is “TOMLAB Base Module”, “TOMLAB /CPLEX MEX” and “TOMLAB /SNOPT” to run all the tests. All these together are half the price of the Gurobi license (commercial). Our metabolomics group is getting ready to do a lot of measurements of metabolite concentrations and C13 flux, so I’m looking into software to help them with the analysis. It looks like I will need most of the tests in COBRA for that.

    >> testC13Fitting
    ommitting reactions due to FVA

    ans =

        'EX_lacL'
        'EX_no2'
        'EX_no3'
        'ASNS2'
        'LLACD2'
        'LLACD3'
        'NO3R1'
        'NO3R2'
        'NO2t2r'
        'NO3t7'
        'NTRIR2x'
        'EX_co2_r'

    Undefined function 'dataset' for input arguments of type 'cell'.

    Error in generateIsotopomerSolver (line 76)
    isotopomer = dataset(Isotopomer_Info);

    Error in testC13Fitting (line 16)
    generateIsotopomerSolver(model, 'xglcDe', expdata, 'true');

     
  • Brady Cress
    Brady Cress
    2012-04-04

    I don't mean to hijack this thread from the OP, but I am having problems passing my tests as well. I tried test_gurobi_mex_LP and received:

    ??? Invalid MEX-file 'C:\Users\Brady\Documents\RPI
    Research\Optimization\cobra\gurobi_mex_v1.61\gurobi_mex.mexw32': The specified module
    could not be found.

    Error in ==> test_gurobi_mex_LP at 36
    = gurobi_mex(c,objtype,A,b,contypes,lb,ub,vtypes,opts);

    I am running Vista 32-bit, so I am not sure why it says the mex file is invalid.  Any ideas?

     
  • Brady Cress
    Brady Cress
    2012-04-04

    My apologies…I didn't finish the installation of gurobi_mex.  However, when I run compile_mex, I get a similar error:

    To build gurobi_mex.mexw32, we are calling:
    mex -O -I"C:\gurobi461\win32\include" "C:\Users\Brady\Documents\RPI Research\Optimization\cobra\gurobi_mex_v1.61\gurobi_mex.c" "C:\gurobi461\win32\lib\gurobi46.lib" "C:\Users\Brady\Documents\RPI Research\Optimization\cobra\gurobi_mex_v1.61\libut\libut_win32.lib"
    Writing library for gurobi_mex.mexw32
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBcbget@16'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_utIsInterruptPending'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_utSetInterruptPending'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBterminate@4'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBversion@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBloadenv@8'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetintparam@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetdblparam@16'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetstrparam@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBloadmodel@80'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBaddsos@28'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBupdatemodel@4'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBaddqpterms@20'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetdblattrarray@20'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetdblattrelement@20'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBwrite@8'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBgeterrormsg@4'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBsetcallbackfunc@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBoptimize@4'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBgetintattr@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBgetdblattrarray@20'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBgetdblattr@12'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBfreemodel@4'
    c:\users\brady\appdata\local\temp\mex_nd~1\gurobi_mex.obj .text: undefined reference to '_GRBfreeenv@4'

      C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Link of 'gurobi_mex.mexw32' failed.

    ??? Error using ==> mex at 208
    Unable to complete successfully.

    Error in ==> compile_mex at 90
    eval(cmpl_cmd);

    Once again, a problem with gurobi_mex.mexw32

     
    • chao ye
      chao ye
      2013-10-31

      Dear Brady Cress
      Have you solved the problem? I also met this problem, and I need your help.
      Thank you.