From: Rainer M. <ra...@tb...> - 2007-05-10 21:55:46
|
Hi Everyone, Great news: as recently several people started to use SOSlib on supercomputing clusters, we were motivated to go into the code again and optimize. Christoph and me went through Andrew Finney's old code for online compilation of the right-hand side functions passed to CVODES (including command-line calls etc.). So I just managed to get the same code running under Linux using the Tiny C Compiler as a library and the very cool TCC online compilation: tcc_compile_string(TCCState *s, char *sourceCode); So far it works only for the one bottle-neck function that evaluates ODEs (and not e.g. for jacobi evaluation or sensitivity stuff). But that already brings significant performance gains! E.g. for the example model MAPK.xml, integrating to time 100000 in 1000 steps: without compilation: 2.13 seconds with tcc compilation: 0.53 seconds A strange effect is that at higher error tolerances and long integration times the results start to differ. We need to check where the different round-offs etc. are made. At lower tolerances the results are exactly the same. The new code is in CVS now. Linking to TCC is optional, so everything else should still work as before. Caveat: TCC so far only works on 32-bit architecture, and thus all libraries (sundials, xerces/expat, libsbml and soslib) must also be compiled and run on 32-bit machines. So we can only hope that TCC will soon be available for x86_64, otherwise we could still implement command-line calls, like for the Windows version (where back then tcc didn't work as a library). (TCC can be run on 64-bit but only with -m32 options and asfaik it's not possible to have a mixed architecture code in on tool). TCC is available from http://fabrice.bellard.free.fr/tcc/ However, I used Robert Landley's fork because I couldn't compile the original, and he seems to be the only one still working on it: http://landley.net/code/tinycc It should work with both ... in principle. So if that all works (with all rhs functions), I think there are not much more possibilities to get faster, i.e. to make better use of SUNDIALS from arbitrary ODE models. We can only include the usual reaction network analysis, i.e. mass conservation analysis, to get rid of unnecessary ODEs etc. However, I guess, that won't bring very much gain, because the lost equation is similar to a still existing one which still needs to be solved by CVODES. Maybe "fast reaction analysis" would have some potential? So, I think we are close to becoming as fast as possible. Well, there'd probably still be possibilities with model-specific "preconditioning" and such stuff about which I don't know much. Feel free to propose your ideas :) Rainer |