CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   environment variables- CAE Linux (https://www.cfd-online.com/Forums/openfoam-installation/99864-environment-variables-cae-linux.html)

kal April 13, 2012 17:42

environment variables- CAE Linux
 
For OpenFOAM on CAE Linux platform, how do I configure the environment?

e.g. adding the following line to $HOME/.bashrc does not work

. $HOME/OpenFOAM/OpenFOAM-2.0.1/etc/bashrc

I tried changing the path to opt/openfoam201/etc/bashrc,
but then sourcing by

. $HOME/.bashrc

does not do anything.

I would really appreciate any help on this.

wyldckat April 14, 2012 06:46

Greetings kal and welcome to the forum!

Edit your "$HOME/.bashrc" file and add this line (or modify the line you added to this):
Code:

. /opt/openfoam201/etc/bashrc
edit: I forgot to mention that you can also execute this line directly on the terminal window.

Good luck!
Bruno

kal April 15, 2012 11:05

Thanks for your reply! I tried to put the line you suggested in the bashrc file, save, and execute . $HOME/.bashrc.
However, when I run foamInstallationTest, I still get the error that the OpenFOAM environment is not configured. This is how it looks like:



neha@neha:~$ gedit ~/.bashrc
neha@neha:~$ . $HOME/.bashrc
neha@neha:~$ foamInstallationTest
Executing /opt/openfoam201/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------

FATAL ERROR: OpenFOAM environment not configured.

Please refer to the installation section of the README file:
<OpenFOAM installation dir>/OpenFOAM-2.0.1/README
to source the OpenFOAM environment.



Please let me know if you can figure out what the error is from this.
Thanks again!

wyldckat April 15, 2012 16:52

Hi kal,

The script foamInstallationTest was designed for source builds only and will not work for the Deb and RPM packages. In CAE Linux, it used a Deb package, so that is why it doesn't work.

The standard test is to run:
Code:

icoFoam -help
If it shows the help instructions for icoFoam, then it's working. You can see this information here: http://www.openfoam.org/download/ubuntu.php - section "User Configuration".

Best regards,
Bruno

kal April 16, 2012 11:06

OK.. Thanks for your help Bruno!


All times are GMT -4. The time now is 08:14.