-
Notifications
You must be signed in to change notification settings - Fork 28
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
. Make sure to run arLink()
(or manually call arSetParallelThreads(1)
) to make sure the multi-threading is disabled correctly.
-
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 theC:\Windows\
folder:pthreadGC2.dll
andpthreadVC2.dll
. The files can be found in the code subfolderarFramework3\pthreads-w32_2.9.1\dll\
for your convenience. ThearCheck.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
.
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).
- Installation and system requirements
- Setting up models
- First steps
- Advanced events and pre-equilibration
- Computation of integration-based prediction bands
- How is the architecture of the code and the most important commands?
- What are the most important fields of the global variable ar?
- What are the most important functions?
- Optimization algorithms available in the d2d-framework
- Objective function, likelhood and chi-square in the d2d framework
- How to set up priors?
- How to set up steady state constraints?
- How do I restart the solver upon a step input?
- How to deal with integrator tolerances?
- How to implement a bolus injection?
- How to implement washing and an injection?
- How to implement a moment ODE model?
- How to run PLE calculations on a Cluster?