CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM 1.7 Installation problems (

shangzung July 7, 2010 05:14

OpenFOAM 1.7 Installation problems
Hello OpenFOAM users,

I have a problem installing OF1.7 on OpenSuse 11.1.
After I unpack the archive of OF1.7 and try to run ./Allwmake I get the following error:

Error: Current directory is not $WM_PROJECT_DIR

Indeed the $WM_PROJECT_DIR is the directory of the installed OF1.6 on this machine. How do I change the WM_PROJECT_DIR to OF1.7?

Thanks in advance

cwang5 July 7, 2010 05:39

I'm guessing that you might have forgotten to change the .bashrc file entry from

. $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc


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


wyldckat July 7, 2010 05:42

Greetings Dennis,

Edit the file ~/.bashrc and change the line you have that sources the 1.6 version to source the 1.7 version. Or you can change to alias, to aid you to use only the environments you need:

startFoam16='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
startFoam170='. $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc'

Now whenever you start a new terminal, run startFoam16 or startFoam170, depending on the OpenFOAM version you want to use :)

Best regards,

shangzung July 7, 2010 06:04

Sorry, but I can not manage to solve the problem with your hints.
In my home/OpenFOAM directory I have two directories:




each of them has a rtc/bashrc file. In the bashrc file of OpenFOAM 1.7 there is no entry with "1.6" at all. So I cannot change it to 1.7 as I guess it already says 1.7. But if I start the file, I get the errors:

simulation@spc-sim:~/OpenFOAM/OpenFOAM-1.7/OpenFOAM-1.7.0/etc> ./bashrc
./bashrc: line 90: /home/simulation/OpenFOAM/OpenFOAM-1.7.0/bin/foamEtcFile: Datei oder Verzeichnis nicht gefunden
./bashrc: line 241: /home/simulation/OpenFOAM/OpenFOAM-1.7.0/bin/foamCleanPath: Datei oder Verzeichnis nicht gefunden
./bashrc: line 244: /home/simulation/OpenFOAM/OpenFOAM-1.7.0/bin/foamCleanPath: Datei oder Verzeichnis nicht gefunden
./bashrc: line 247: /home/simulation/OpenFOAM/OpenFOAM-1.7.0/bin/foamCleanPath: Datei oder Verzeichnis nicht gefunden
./bashrc: line 83: /home/simulation/OpenFOAM/OpenFOAM-1.7.0/etc/ Datei oder Verzeichnis nicht gefunden

wyldckat July 7, 2010 06:17

:eek: that isn't the usual installation method assumed by OpenFOAM's bashrc. The usual method is to have the folder $HOME/OpenFOAM to serve as a basis for all OpenFOAM installations, so it would look something like this:


But if you still want to use your current folder organization, edit the file "~/OpenFOAM/OpenFOAM-1.7/OpenFOAM-1.7.0/etc/bashrc" and change the line that says:


I assume you have already done that for the 1.6 version.

As for the alias in your ~/.bashrc file, then (I guess) should something like this:

startFoam16='. $HOME/OpenFOAM/OpenFOAM-1.6/OpenFOAM-1.6/etc/bashrc'
startFoam170='. $HOME/OpenFOAM/OpenFOAM-1.7/OpenFOAM-1.7.0/etc/bashrc'

Keep in mind that these two alias commands are meant to replace your previously existing line in ~/.bashrc file:

. $HOME/OpenFOAM/OpenFOAM-1.6/OpenFOAM-1.6/etc/bashrc
Best regards,

shangzung July 7, 2010 10:34

Thank you! It is running now!

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