Hi Rhys,
I am not sure if you mean parallelizing the for loop in this code, but
this would not work, as each iteration is not independent from the next
one. Differential equation solving is intrinsically serial.
I can not either just split the problem into smaller chunks (lets say
100k istead of 1M), because they are coupled, i.e. func can only be
defined for the whole system, not for some of its parts.
Thanks,
Maxime
Le 2012-12-12 16:36, Rhys Ulerich a écrit :
I have not, since it is much simpler to add 6 pragmas to the loops of
rk45_apply to achieve the same goal.
I suspect, from glancing at the first example at
http://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html,
you could achieve parallelization atop stock GSL builds with fewer
than 6 pragmas.
I also suspect that by using OpenMP tasks over the coarser granularity
concept (1 ODE) instead of the parallel-fors over the finer
granularity method (1 step) you may see better overall performance.
- Rhys