# MPI + cmdstan

**URL:** <https://discourse.mc-stan.org/t/mpi-cmdstan/4136>\
**Category:** Developers\
**Created:** [May 8, 2018, 8:14pm UTC](https://discourse.mc-stan.org/t/mpi-cmdstan/4136 "2018-05-08T20:14:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)\
**Post date:** [May 8, 2018, 8:14pm UTC](https://discourse.mc-stan.org/t/mpi-cmdstan/4136/1 "2018-05-08T20:14:50Z")

</div>

Hi!

As we are closing in on the MPI story I started a branch for cmdstan which initializes the MPI cluster resource, see the branch feature/issue-616-mpi in the cmdstan repo.

What I have done so far is to

- make things work wrt to the makefiles. So if STAN\_MPI=true is put in the make/local the respective Stan binary will be linked and build correctly
- enhanced the main from cmdstan such that the MPI cluster is initialized and a startup message is displayed

Comments on that branch would be helpful. I have never contributed code to cmdstan so I have likely missed some conventions. I am not yet sure on tests / doc. If there are thoughts, that would be great. Even more appreciated would be coding help on this, of course.

… but if you use this branch and couple it with the MPI PR in stan-math then you get a fully working MPI enabled Stan …

Best,  
Sebastian
