Re: Vector Runge-Kutta ODE solver with compilation?
- To: mathgroup at smc.vnet.net
- Subject: [mg116809] Re: Vector Runge-Kutta ODE solver with compilation?
- From: DmitryG <einschlag at gmail.com>
- Date: Tue, 1 Mar 2011 05:21:15 -0500 (EST)
- References: <firstname.lastname@example.org>
On 28 Feb., 05:54, Daniel Lichtblau <d... at wolfram.com> wrote: > > > > Any help? > > > > Dmitry > > > Another major problem: If in the code above one removes > > CompilationTarget->"C", it is working well until NN becomes larger > > then ~1000. For larger NN, say NN00, compilation breaks because of > > lack of memory on my laptop. One can see how fast the memory is > > getting consumed during compilation. This seems to be a deficiency of > > the current version of the Mathematica compiler that probably makes it > > inappropriate for solving larger problems where compilation is really > > needed. And there seems to be an even bigger problem with using > > external C compiler. > > > Dmitry > > This is an unusual claim to make. The implication is something along the lines "Surely my usage is flawless, so all problems must be the fault of the underlying software." > > I code a fair amount in both Mathematica and C, and that sort of claim is one I would rarely make with either. > > Daniel Lichtblau > Wolfram Research Hi Daniel, I am posting a working code and you can quickly run it with and without compilation in C, to see the problem. I do not claim that my code is flawless. It is straightforward but maybe you could suggest how to eliminate the bottleneck in compilation in C. I would be very grateful if you do. Currently I cannot use this option for my problems. Compilation with Mathematica's own compiler works fine up to NN=1200 on my standard laptop and I am considering using other computers with more memory. BTW, Mathematica 7 on my (older) workstation also has Compile implemented but it is working much slower than Mathematica 8 on my laptop. This is to say that I see the progress and I hope that compilation will be improved in future releases of Mathematica. Best, Dmitry