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>run.sh” file? What and where should I write?
or
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.

Thanks
Subhasis

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 run.sh you execute run.sh -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 run.sh 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}"

Regards,
David

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

Thanks and regards
Subhasis

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 run.sh 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 run.sh script?

Dear @ajaust
I am able to run the simulation with ./run.sh -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:
/home/subhasis/Softwares/dealii-adapter/elasticity:/opt/ThirdParty-7/platforms/linux64Gcc/gperftools-svn/bin:/opt/paraviewopenfoam56/bin:/home/subhasis/OpenFOAM/subhasis-7/platforms/linux64GccDPInt32Opt/bin:/opt/site/7/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam7/bin:/opt/openfoam7/wmake:/home/subhasis/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/ParaView-5.9/bin/

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

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

Overall:
/home/subhasis/Softwares/dealii-adapter/elasticity — Working
./run.sh -e=/home/subhasis/Softwares/dealii-adapter/elasticity —Working
./run.sh — 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 ./run.sh.

Thanks to this PreCICE forum.

Regards
Subhasis

1 Like

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