CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM 1.7 Installation problems (http://www.cfd-online.com/Forums/openfoam-installation/77896-openfoam-1-7-installation-problems.html)

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

to

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

John

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:
Code:

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,
Bruno

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:

OpenFOAM1.6

and

OpenFOAM1.7

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/settings.sh: 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:
Code:

$HOME/OpenFOAM/OpenFOAM-1.6
$HOME/OpenFOAM/OpenFOAM-1.7.0
$HOME/OpenFOAM/ThirdParty-1.6
$HOME/OpenFOAM/ThirdParty-1.7.0

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:
Code:

foamInstall=$HOME/$WM_PROJECT
To:
Code:

foamInstall=$HOME/$WM_PROJECT/OpenFOAM-1.7.0
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:
Code:

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:
Code:

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

shangzung July 7, 2010 10:34

Thank you! It is running now!


All times are GMT -4. The time now is 13:59.