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.
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}"
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?
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
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.
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
@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}"