PESTO icon indicating copy to clipboard operation
PESTO copied to clipboard

Amici commands

Open paulstapor opened this issue 9 years ago • 10 comments

In a final version, we should write all examples in a way, that the code from AMICI is not needed as a whole package (mex functions are of course okay), i.e. comment or cut all calls to amiwrap.

paulstapor avatar Oct 05 '16 08:10 paulstapor

I don't see how you could achieve this, you would need to pack multiple mex files. They are operating system, so at least one mex file for windows, mac and linux. And then I don't know how portable they are between matlab versions and version of the operating system. Shipping binaries is difficult, especially since AMICI is not included in PESTO and we can't do any kind of continuous deployment. I would keep the amiwrap dependencies in and add a check for amici with the appropriate error message.

FFroehlich avatar Oct 05 '16 09:10 FFroehlich

I completely agree with @FFroehlich. The main functionality should be covered by AMICI-independent examples. For the other "bonus examples", it's the users responsibility to have AMICI available.

dweindl avatar Oct 05 '16 12:10 dweindl

Done.

paulstapor avatar Nov 23 '16 20:11 paulstapor

Related to this:

I just downloaded PESTO and ran runTestExample.m. That crashes with

Warning: There was a problem with the AMICI toolbox (available at https://github.com/ICB-DCM/AMICI), which is needed to run this example
file. The original error message was: 
> In mainErbBSignaling (line 44)
  In runTestExamples (line 8) 
Undefined function or variable 'amiwrap'.

Error in mainErbBSignaling (line 42)
    amiwrap('erbb_pesto', 'erbb_signaling_pesto_syms', exdir);

Error in runTestExamples (line 8)
mainErbBSignaling;

I think it would be nice to mention in the README that AMICI should be installed and add a check in runTestExample.m whether it is installed.

willigott avatar Jan 04 '18 12:01 willigott

thanks for bringing this up! There was a problem is definitely not sufficiently informative when the whole toolbox is missing.

FFroehlich avatar Jan 05 '18 11:01 FFroehlich

Thanks for looking into this. I installed AMICI but then it still does not run as the symbolic toolbox is missing; as far as I can see, this dependency is neither mentioned for PESTO nor AMICI. So maybe you could add a section to the README called Dependencies listing all required toolboxes!?

willigott avatar Jan 08 '18 11:01 willigott

Thanks for pointing this out. PESTO itself does not depend on AMICI or the symbolic toolbox, as those are only used in a couple of examples. There should be some example that you can run without those dependencies.

Regarding AMICI, this dependency was indeed so far only mentioned at http://icb-dcm.github.io/AMICI/. We will fix this in the future.

FFroehlich avatar Jan 08 '18 11:01 FFroehlich

The PESTO examples you can run without AMICI should be:

  • conversion reaction
  • mRNA transfection
  • enzymatic catalysis
  • some of the RAmPART examples: banana, ring, gauss, mRNA_transfection

For the other examples, since ODE simulation takes a lot of time there and AMICI is simply way faster than the Matlab functions.

PESTO itself will make use of the optimization toolbox, in order to use fmincon. For the symbolic toolbox: There's a trial version which you can download from Mathworks... It lasts 30 days, as far as I know...

paulstapor avatar Jan 08 '18 12:01 paulstapor

Thanks to both of you for your comments.

Do you have a minimal example script where you compare the performance of the SUNDIALS integrators to the default ones in Matlab for a reasonable complex system? The default Matlab integrators are indeed quite slow; using Python's odeint, the speed-up can be more than factor 5 compared to ode23s. Question is how much faster your Sundials implementation would be. If you could point me to either an already existing comparison done by you or a minimal file that just shows the integration of a system using AMICI (so that I can quickly run a comparison myself) I would be very grateful.

willigott avatar Jan 10 '18 10:01 willigott

Hello willigott, sorry, I just see nobody replied to your post so far, so sorry we're so late. Well, there is a comparison of AMICI with MATLAB's ode15s. This is done in the Amici examples. As Amici is basically C++-code, the speed-up is quite substantial: about a factor of 100 for most of the examples. The exact speed-up depends of course on the ODE system. We use Amici for ODE systems of up to a few thousands of state variables, so the largest systems we really work with have about 2000 to 3000 state variables (ODEs) and about 4000 to 5000 free parameters. however, for these large examples, the right hand side usually has the form of a polynomial.

paulstapor avatar Jan 24 '18 15:01 paulstapor