Clone wiki

D2D Software / Parallelization

Parallelization

Computation time is often the bottle neck for modeling applications. Especially when parameteres are estimated it is important the single estimation runs converge as quick as possible. This allows a interactive workflow when the ideal structure of a model is known jet.

In the parameter estimation the model has to be evaluated many times. Often, a single model evaluation requires serveral numerical solutions of the ODE systems. Since these evaluation are all independent this is the ideal level for applying parallel computing without communication overhead between parallel ODE solver calls.

The Data 2 Dynamics software package applies parallelization based on multi-threading using the pthread package. The number of threads that are executed in parallel can be set by the function arSetParallelThreads(n) where the default for n is the number of cores of machine time two. Multi-threaded calculations can entirely be switched off by setting the flag ar.config.useParallel = false.

  • For Unix type operating system, for instance Linux or Mac OS X, the pthread package is usally installed an can be used mmediately.

  • On Windows systems the pthread-w32 package can be installed. Two addition .dll files need to be placed in the C:\Windows\ folder: pthreadGC2.dll and pthreadVC2.dll. The files can be found in the code subfolder arFramework3\pthreads-w32_2.9.1\dll\ for your convenience. The arCheck.m function will notify you when these files are not available and will disable multi-threading.

We use the example application Epo induced JAK2/STAT5 signaling model in CFU-E cells that contains 24 different experimental conditions as demonstation and 500 randonly drawn, via Latin Hypercube Sampling, sets of parameters. The 24 different experimental conditions correspond to 24 different variants of the original ODE system that have to be numerically simulated for one evaluation of the complete model, using a maximum of 24 independent threads.

The figure below shows the statistics of computation acceleration on a 12 core machine if the number of thread is increased up to 24, compare to sequential computation on the same machine. This figure can be reproduces using the function arCheckParallelSpeedUp.

Alt text

The figure indicates that acceleration scales as excepted with increasing number of threads. After using as many cores as available on this machine (dashed horizontal line) the acceleration can not increase much.

Please note that some threads, i.e. some experimental conditions, can be computationally more demanding that others. This can lead to an overall decrease of acceleration compared to the theoretical possible acceleration (red line).

Updated