{{lastupdated_at}} by {{lastupdated_by}} h1. GObservation h2. 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. h3. 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. !50obs-1.png! 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. !50obs-2.png! Here the line is smoothest but after 10 threads performance does not evolute a lot. An other test with 20 observations. !20obs-1.png! !20obs-2.png!