Hi Pedro,

In my experience the design of GSL is very amenable to parallelism, and I
would be quite surprised if it was causing problems.

However, it's pretty common to scale up a program to n threads and get less
than a factor of n speed up.  It depends a lot on what the code is doing and
what kind of hardware you've got.  There are also some issues related to
OpenMP threading itself.  A quick guess is that maybe some of your equations
solve much faster than others, so you might want to add "schedule(dynamic)"
to the pragma before your loop.

Regards,
Brian

On Thu, Oct 6, 2011 at 9:00 AM, <[email protected]> wrote:
>
> Date: Wed, 5 Oct 2011 18:20:38 -0700
> From: Pedro Gardete <[email protected]>
>
> Hi,
>
> I need to go through many systems of equations, which I'm using
> the gsl_multiroot_fsolver_hybrid method to solve for. The systems solve
> fine, but when I put them inside an OpenMP loop (each thread solves one
> system at a time and stores the result) the performance invariably comes
> down for each thread as I add more. Should this be expected given that the
> threads are independent (ie, don't wait for each other)?
>
> Thanks,
> Pedro
>
_______________________________________________
Help-gsl mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to