Updated about 12 years ago by Anonymous

GObservation

Parallelization

See OpenMP page for configuration of parallelization options.

In the GObersation class, OpenMP is used to parallelize the eval method in the optimizer part (GObersation::optimizer::eval). Loop iterations are split and dealt to the differents threads. Each thread has their own variable to avoid conflict with shared variable ( as m_value, m_npred or m_gradient ), this working variables are store temporarily in vectors which are loop over at the end of iterations to update shared variables.

Performance

In this first test, fitting was executed on real data with 50 observations.
The computer used for this test is Kepler, a server with 48 cores.

Parallelization performance, 50 observations (with iterations number)

We can notice in this chart some irregularities with computation time caused by the number of iterations which is not constant ( between 23 and 34).
The algorithm is not very stable and stop condition of fitting is very precise ( 1e-6). With round-off error, number of iterations can change with number of thread and depend of the execution order.

To delete dependence on number of iterations, the next chart divide the time by it.

Parallelization performance, 50 observations

Here the line is smoothest but after 10 threads performance does not evolute a lot.

An other test with 20 observations.

50obs-1.png - Parallelization performance, 50 observations (with iterations number) (30 KB) Anonymous, 08/22/2012 10:22 AM

50obs-2.png - Parallelization performance, 50 observations (27.4 KB) Anonymous, 08/22/2012 10:22 AM

20obs-1.png (29.7 KB) Anonymous, 08/22/2012 10:22 AM

20obs-2.png (26.5 KB) Anonymous, 08/22/2012 10:22 AM

50obs-1 50obs-2 20obs-1 20obs-2

Also available in: PDF HTML TXT