# Parallel Computing MCMC chains

**URL:** <https://forum.dynare.org/t/parallel-computing-mcmc-chains/25137>\
**Category:** Installation and Setup\
**Created:** [9 February 2024 16:14 UTC](https://forum.dynare.org/t/parallel-computing-mcmc-chains/25137 "2024-02-09T16:14:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mat1339](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/f9ae1b/32.png) [@mat1339](https://forum.dynare.org/u/mat1339)\
**Post date:** [9 February 2024 16:14 UTC](https://forum.dynare.org/t/parallel-computing-mcmc-chains/25137/1 "2024-02-09T16:14:16Z")

</div>

Dear all,

I tried to run two MCMC chains in parallel with Dynare 6.0 on a silicon mac. The output of `parallel_test` seems to be fine:

 ![parallel_test](https://forum.dynare.org/uploads/default/original/3X/6/5/6562baf2ae974c9736e3c52668065f787cd52bdc.png)

When I change the command to `parallel`, I somehow receive an error message that the connection is refused.

 ![error](https://forum.dynare.org/uploads/default/original/3X/8/b/8bdf2031b787867495276f34b30664dbf24a80cf.png)

Any help would be highly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 February 2024 18:17 UTC](https://forum.dynare.org/t/parallel-computing-mcmc-chains/25137/2 "2024-02-09T18:17:10Z")

</div>

@wmutschl is the one to ask.

---

<div class="post-metadata">

**Author:** ![wmutschl](https://forum.dynare.org/user_avatar/forum.dynare.org/wmutschl/32/18464_2.png) [@wmutschl](https://forum.dynare.org/u/wmutschl)\
**Post date:** [13 February 2024 10:04 UTC](https://forum.dynare.org/t/parallel-computing-mcmc-chains/25137/3 "2024-02-13T10:04:59Z")

</div>

If you have not set up SSH keys on your system, you should do this and add this key to the file `.ssh/authorized_keys`. Feel free to follow [this guide](https://mutschler.dev/apple/macos-post-install/#ssh-keys)

In general there is something not working with your SSH settings/keys. Could you run the following

1. in Terminal.app:

```auto
ssh localhost

```

1. in MATLAB’s command window:

```auto
system('ssh localhost')

```

and paste the output. Ideally, you are going to be asked to accept the connection (which you should do) and simply connect to your mac via SSH (which we require for parallel estimation). You can then exit the SSH session to your system by typing “exit”. If both work fine, then please re-run the MCMC estimation.
