Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.49 KB

File metadata and controls

62 lines (39 loc) · 1.49 KB

Predator-Prey model based on https://mc-stan.org/users/documentation/case-studies/lotka-volterra-predator-prey.html

Build

Edit/Add cmdstan/make/local

TORSTEN_MPI = 1                                         # flag on torsten's MPI solvers
CXXFLAGS += -isystem /usr/local/include                 # path to MPI library's headers

Build in cmdstan

make ../example-models/lotka_volterra_ode_group_model/lv_group

Run

mpiexec -n 2 lv_group sample data file=lv_group.data.R

Results

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