Closed mattfidler closed 6 years ago
I'm also curious what you think @richfitz since you were working on a liblsoda R package.
By the way my code/package where the routines are found is:
https://github.com/nlmixrdevelopment/RxODE/tree/a00c3d4adb6b913fb06201bc9087b48ae445654e
And the liblsoda implementation(s) are found in
I ran again changing the order and the timing is similar; I forgot to account for compile time:
v | 17 | Test Parallel/Multi-subject Solve (dop853) [22.2 s]
v | 17 | Test Parallel/Multi-subject Solve (liblsoda) [7.6 s]
v | 17 | Test Parallel/Multi-subject Solve (lsoda) [7.0 s]
It is a bit slower, but not much. It probably has to do with memory allocation, which I can try to fix.
Thank you for the awesome package.
I have implemented the liblsoda in R for the RxODE package to take advantage of it's OpenMP threaded capabilities;
RxODE translates an ODE mini-language to C code, compiles the C code and runs the routines through one of 3 ODE solvers:
The same problem run in a single thread (compared to some running 2 threads and 1 threads) took approximately 2x as long in libslsoda as the original LSODA. Is this expected on the move from FORTAN to C?
Still, the OpenMP make the overall the threaded liblsoda faster than single threaded LSODA in certain problems, but the gains are not as much as I expected since the solver itself seems a bit slower.
Here are the results of my test and its timing:
Is this known/expected?