Hello,
I realize that my answer never reached the list, so here it is once again.
Jochen Küpper a écrit :
Hi Maxime,
I would like to know if there is any plan in adding OpenMP support to
GSL ?
I had looked into this myself before with limited success.
Most importantly, however, I just didn't find time to get serious
about it...
OpenMP is the easiest way of parallelizing any code and require
almost no work. I have myself modified the Runge-Kutta-Felhberg (4,5)
algorithm to take profit of my Core 2 Duo CPU. In the attached file,
I simply added a couple of #pragma that tells the compiler to split
the loop in many threads. If these pragma are not understood, it does
not break the compilation. If they are, you can get a speedup that is
close to the number of CPUs you have in many cases.
What speed-up (in wall time) are you really seeing from these
modifications?
How complex/expensive is your function evaluation?
I've done some tests a long time ago. From what I remember, my function
was taking 75% of the running time, and the integration with RKF45 was
taking about 25%. With the OpenMP version of the RKF45 that I attached
to my first email, I obtained a gain of about 10% in running time with 2
CPUs. This means that RKF45 was running almost twice as fast with 2
cpus. I emphasize that this change was _really_ easy to make.
I don't know if you guys use unit testing to test GSL, but if you do,
adding OpenMP support could be very easy (since I believe that
whatever change you make to a code must be tested against unit tests).
Greetings,
Jochen
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl