Before we run the simulation, let’s check some very common pitfalls.
The exchange directory
Whilst configuring the inter-participant communication, you specified an exchange directory.
preCICE uses this directory as a common meeting place to coordinate both participants.
It is common practise to use a relative path such as
Please check if this exchange directory points to the same directory from the working directory of every participant in your simulation. If your folder structure doesn’t allow this, simply use a absolute path instead.
Artifacts from previous runs
preCICE creates a folder called
precice-run in this exchange directory.
This may include folders, but shouldn’t include files.
You can check this by using
find in your terminal.
The following command should not return anything:
find precice-run -type f
precice-run folder contains files, simply delete the folder.
Run the simulation manually
Now you are ready to run the simulation.
To do so, open one terminal window for each participant and navigate to their working directories. Then run each solver in each terminal and observe what happens.
Run the simulation using a script
Opening terminals can be very useful in the early stages of prototyping, but can become a bit tedious over time.
You can also run all the entire simulation in single script:
#!/bin/bash # Print executed commands set -e # Group solvers to stop all if one fails set -m ( # Launch solver A cd /path/to/solver/a ./runSolver &> a.log & # Launch solver B cd /path/to/solver/b ./runSolver &> b.log & # Launch solver C cd /path/to/solver/c ./runSolver &> c.log & # Wait for every solver to finish wait )