Predator-Prey model based on https://mc-stan.org/users/documentation/case-studies/lotka-volterra-predator-prey.html
TORSTEN_MPI = 1 # flag on torsten's MPI solvers
CXXFLAGS += -isystem /usr/local/include # path to MPI library's headers
make ../example-models/lotka_volterra_ode_group_model/lv_group
mpiexec -n 2 lv_group sample data file=lv_group.data.R
Three binaries are built and used to run:
- sequential run using Stan's
rk45
integrator. - sequential run using Torsten's
rk45
integrator. - MPI run using Torsten's
rk45
group integrator(with 2, 4, 8 processes, respectively).
The wall time of sequential runs and MPI runs(in seconds) with ODE group size 16.
run | wall time(s) |
---|---|
Sequential stan | 2135 |
sequential pmx | 2570 |
MPI pmx (nproc=1) | 2107 |
MPI pmx (nproc=2) | 1187 |
MPI pmx (nproc=4) | 715 |
MPI pmx (nproc=8) | 467 |