Action #262

Feature #226: Parallelize maximum likelihood computation

Create test program for code parallelization

Added by Knödlseder Jürgen over 12 years ago. Updated over 12 years ago.

Status:ClosedStart date:06/16/2012
Priority:NormalDue date:
Assigned To:-% Done:

100%

Category:-Estimated time:35.00 hours
Target version:Stage Jean-Baptiste Cayrou
Duration:

Description

Code parallelization should be tested first by a standalone test program. This program should be written in C++, elaborating the best possible implementation of code parallelization. It should be checked whether one can generate a generic C++ class that handles code parallelization.

The test program needs to include a Python interface, so that we can test also code parallelization from within Python (verifying that the GIL does not pose any problem).

Note that we can have several test programs to test several strategies.


Recurrence

No recurrence.


Related issues

Blocks GammaLib - Action #263: Validate the test program Closed 06/16/2012

History

#1 Updated by Knödlseder Jürgen over 12 years ago

  • Description updated (diff)
  • Estimated time set to 70.00
  • Remaining (hours) set to 70.0

#2 Updated by Knödlseder Jürgen over 12 years ago

  • Estimated time changed from 70.00 to 35.00
  • Remaining (hours) changed from 70.0 to 35.0

#3 Updated by Anonymous over 12 years ago

  • Status changed from New to In Progress

#4 Updated by Anonymous over 12 years ago

  • Status changed from In Progress to Resolved

#5 Updated by Anonymous over 12 years ago

  • % Done changed from 0 to 100

I tested OpenMP with some code :

#pragma omp for
for(int i=0;i<m_nb_iter;i++)
{
  for(int j=0;i<NB_ITERATIONS_WAIT;i++); // A loop to simulate calculation time
  #pragma omp atomic
  m_value++
}

I create a python module to test if the multi-threading works with the GIL and it works well.

Without OpenMP : 9 sec
With OpenMP : < 1 sec

To disable it do not write the option "-fopenmp”

To set the number of thread : set the environement variable OMP_NUM_THREADS

#6 Updated by Anonymous over 12 years ago

  • Status changed from Resolved to Closed
  • Remaining (hours) changed from 35.0 to 0.0

#7 Updated by Knödlseder Jürgen over 12 years ago

  • Target version deleted (Stage Jean-Baptiste Cayrou)

#8 Updated by Knödlseder Jürgen over 12 years ago

  • Target version set to Stage Jean-Baptiste Cayrou

Also available in: Atom PDF