Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
mpi_sample.1.csv
mpi_sample.16.csv
mpi_sample.2.csv
mpi_sample.4.csv
mpi_sample.8.csv
pmx_sample.csv
readme.md
readme.org
sho.qsub
sho_group.data.R
sho_group.stan
sho_loop.stan
sho_mpi.qsub
sho_pmx.qsub
sho_pmx_loop.stan
sho_simu_group.data.R
sho_simu_group.stan
stan_sample.csv

readme.md

Description

Parameter inference for the harmonic oscillator ODE using Torsten's ODE group integrator pmx_integrate_ode_group_rk45.

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/harmonic_oscillator_ode_group_model/sho_group

Run

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

Results

Three binaries are built and used to run:

  • sequential run using Stan's bdf integrator.
  • sequential run using Torsten's bdf integrator.
  • MPI run using Torsten's bdf group integrator(with 1, 2, 4, 8, 16 processes, respectively).

The wall time of sequential runs and MPI runs(in seconds) with ODE group size 4

run wall time(s)
Sequential stan 39
sequential pmx 33
MPI pmx (nproc=1) 34
MPI pmx (nproc=2) 18
MPI pmx (nproc=4) 10

The wall time of sequential runs and MPI runs(in seconds) with ODE group size 20

run wall time(s)
Sequential stan 891
sequential pmx 319
MPI pmx (nproc=1) 476
MPI pmx (nproc=2) 251
MPI pmx (nproc=4) 136
MPI pmx (nproc=8) 90
MPI pmx (nproc=16) 97
You can’t perform that action at this time.