Dealii-adapter: Unable to find the executable elasticity

Hello PreCICE users.
I have recently installed PreCICE adapters for FSI simulation in OpenFOAM v7 in Ubuntu 18.04. I am able to run the CHT tutorial: flow-over-heated-plate (fluid-openfoam and solid-openfoam) accurately. However, I am not able to run the FIS tutorial: perpendicular-flap (fluid-openfoam and solid-dealii).
It is showing:

Unable to find the executable elasticity. Either specify the executable explicitly (-e=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH).

I have built the installation of dealii in the directory: home/subhasis/Softwares/build
and installed the dealii-adapter within the “build” directory. (I don’t know whether it is ok or not)

How can I specify the executable explicitly in “solid-dealii>” file? What and where should I write?
how can I make is discoverable at runtime? In ~/.bashrc ? What should I write at the end?

I tried everything what I can do, but still not able to run the tutorial case.
Your suggestion would be a great help in my work.
Looking forward to getting your response.


Hi @subhasisa.rath,

Should be ok, although it might be rather unusual as you usually want to separate the installations.

Assuming now you have compiled the elasticity executable. Where exactly is it located? If you start-up your simulation, you can simply call the run script and specify the location of the executable, i.e. instead of simply executing you execute -e=/home/subhasis/Softwares/build/elasticity. If you are lazy and have the adapter installation permanently in the same place, you may also want to directly edit the script.

If you run on ubuntu, you can simply add the location of your executable to your PATH variable at the end of your .bashrc. Assuming again that you have the executable located at home/subhasis/Softwares/build add:
export PATH="/home/subhasis/Softwares/build:${PATH}"


Hi, @DavidSCN
Thank you so much for your quick response. It solved my problem partially.
Now, I am able to run the simulation using, -e=/home/subhasis/Softwares/build/elasticity.
However, I am still not able to run it by' command only, by exporting export PATH="/home/subhasis/Softwares/build:${PATH}"` in ~/.bashrc.
What will be your suggestion?

Thanks and regards

After adding something to ~/.bashrc you have to either use a new terminal session or you have to source the file again via the command
source ~/.bashrc

Hi Dear @ajaust
Thanks for your reply.
Yes, I have done the source ~/.bashrc, but getting the same error.

Could you check the following things:

  1. Is the path was exported properly? You can check with echo $PATH and see if it contains the path to your dealii executable. You could also add echo $PATH to the script to see if it pics up the PATH variable properly.
  2. Are you able to run the elasticity solver in the current shell without running the script?

Dear @ajaust
I am able to run the simulation with ./ -e=/home/subhasis/Softwares/dealii-adapter/elasticity
Thus, I have written: export PATH="/home/subhasis/Softwares/dealii-adapter/elasticity:${PATH}" in my system ~/.bashrc

echo $PATH shows:

Yes, adding echo $PATH to the script also shows the same above outcomes.

Yes, it is running perfectly fine without by using /home/subhasis/Softwares/dealii-adapter/elasticity

/home/subhasis/Softwares/dealii-adapter/elasticity — Working
./ -e=/home/subhasis/Softwares/dealii-adapter/elasticity —Working
./ — Not-working

Does it work if you set the path to export PATH="/home/subhasis/Softwares/dealii-adapter/:${PATH}" i.e. you leave out the name of the executable.

@subhasisa.rath you need to export the directory where your OS is supposed to find the executable, not the exectuable itself, i.e.
export PATH="/home/subhasis/Softwares/dealii-adapter:${PATH}"

Ah, @ajaust is too fast for me :smile:

Thanks to @DavidSCN and @ajaust for your valuable comments and suggestions.
Now I am able to run the simulation with ./

Thanks to this PreCICE forum.


1 Like

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