# MATLAB-bindings example

**URL:** <https://precice.discourse.group/t/matlab-bindings-example/2566>\
**Category:** Official adapters and tutorials\
**Tags:** fsi, matlab\
**Created:** [July 20, 2025, 3:43am UTC](https://precice.discourse.group/t/matlab-bindings-example/2566 "2025-07-20T03:43:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jian1](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@Jian1](https://precice.discourse.group/u/Jian1)\
**Post date:** [July 20, 2025, 3:43am UTC](https://precice.discourse.group/t/matlab-bindings-example/2566/1 "2025-07-20T03:43:41Z")

</div>

Hello everyone, I am running the official matlab-bindings example `solverdummy` from `matlab-bindings/examples/solverdummy` in the `develop` branch of preCICE [matlab-bindings/examples/solverdummy at master · precice/matlab-bindings](https://github.com/precice/matlab-bindings/tree/master/examples/solverdummy). I found that if I split `solverdummy` into two `.m` files, `solverone` and `solvertwo`, and place them in the same folder, the preCICE coupling works correctly, as shown below.

 ![34b7cd8eef32d34e77e160c1a016571](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/c/c5af860f15f7406debbfe0bf508136fe009cfd2f.png)  
However, when I place the two solvers in separate subfolders as shown in the screenshot below, both solvers get stuck at the stage “Setting up primary communication to coupling partner/s” during runtime.  
 ![45104b8f22dc5e58786430aec9babd2](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/7/73f029e61f503d316469b5cfbfbc8a5eabe69e86.png)

At this point, the following subfiles are generated inside the two folders:  
 ![835264b18860c4aa8b95be4ec144b92](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/7/77bb1c5873c7ae6ec529c169ea933a38ab7a0caf.png)

I have modified the path to `precice-config.xml` inside the solvers to ensure it can be correctly located, for example:

```
configFileName = '../precice-config.xml';

```

I am confused because in normal preCICE fluid-structure interaction tutorials, such as the ‘perpendicular-flap’ example, the fluid and solid solvers are placed in separate folders like `fluid-openfoam` and `solid-calculix`, and the coupling works fine.

Could anyone help explain why my matlab solvers in separate subfolders get stuck at the communication setup, while in other tutorials the separated folders work without issues?

---

<div class="post-metadata">

**Author:** ![Jian1](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@Jian1](https://precice.discourse.group/u/Jian1)\
**Post date:** [July 20, 2025, 4:12am UTC](https://precice.discourse.group/t/matlab-bindings-example/2566/3 "2025-07-20T04:12:29Z")

</div>

I have solved it from this topic: [Help! The participants are not finding each other! - Using preCICE - preCICE Forum on Discourse](https://precice.discourse.group/t/help-the-participants-are-not-finding-each-other/646/4)  
Thanks a lot for the contribution from the developer!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [July 24, 2025, 7:31am UTC](https://precice.discourse.group/t/matlab-bindings-example/2566/4 "2025-07-24T07:31:11Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
