CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFoam 1.7 Installation (https://www.cfd-online.com/Forums/openfoam-installation/77674-openfoam-1-7-installation.html)

robyn June 30, 2010 08:42

OpenFoam 1.7 Installation
 
Hello!

I'm currently trying to reinstall OpenFoam using version 1.7.0 on OpenSuse 11.2.
There were no problems with version 1.6 until I close the terminal window. The pathways to use for example blockMesh are then no longer there. So I hope that version 1.7.0 will no longer have this problem. However, I'm now having problems sourcing bashrc.

After unpacking the files I will go into the $HOME/.bashrc by typing:

vi $HOME/.bashrc

I added the following line:

#export PILOTPORT=/dev/pilot
#export PILOTRATE=115200

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

type esc, then :wq to write and quit the editor.

From there the installation guide asks you to type

.$HOME/.bashrc

into the terminal window (within /etc directory). However, when I do this it states the directory does not exist.

Any ideas would be appreciated!

Cheers

Robyn

wyldckat June 30, 2010 09:18

Greetings Robyn and welcome to the forum!

OK, a little explanation: the dot, in this case, at the beginning of the command line does the same thing as the "source" command. When the dot at the beginning of a command line is the command itself, then a space must be put in between the dot and the rest of the command line ;)

So, what you should have in your $HOME/.bashrc file (in this case, the dot is part of the file name and that this file should be hidden) is this:
Code:

. $HOME/OpenFOAM/OpenFOAM-1.7.0/etc/bashrc
Notice the space between the dot and $HOME! This way the file is properly sourced.

Now, you can either start a new terminal or run this command (anywhere, doesn't need to be in the /etc folder):
Code:

. $HOME/.bashrc
Again, notice the space between the dot and $HOME!

Now, you might ask "what does it mean to source a file?" Well, it means that the file is not to be just executed as a script, but it should be executed as if it were a function that updates your current shell environment! And that's how the OpenFOAM environment gets set-up and ready to go :D

Best regards,
Bruno

robyn June 30, 2010 09:38

Hello Bruno!

Thanks for the words of wisdom and advice. After following you explanation I now find an error for the foamInstallationTest as follows

Executing /home/robyn/OpenFOAM/OpenFOAM-1.7.0/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: linux-4ifd
OS: Linux version 2.6.31.5-0.1-desktop
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/robyn/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/robyn/OpenFOAM/robyn-1.7.0 no no
$WM_THIRD_PARTY_DIR /home/robyn/OpenFOAM/ThirdParty-1.7.0 yes yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /home/robyn/OpenFOAM/OpenFOAM-1.7.0 yes yes yes

$FOAM_APPBIN ...1.7.0/applications/bin/linuxGccDPOpt no yes
$FOAM_SITE_APPBIN ...penFOAM/site/1.7.0/bin/linuxGccDPOpt no no
$FOAM_USER_APPBIN ...1.7.0/applications/bin/linuxGccDPOpt no no
$WM_DIR .../robyn/OpenFOAM/OpenFOAM-1.7.0/wmake yes yes yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN ...OAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt no yes
$FOAM_SITE_LIBBIN ...penFOAM/site/1.7.0/lib/linuxGccDPOpt no no
$FOAM_USER_LIBBIN ...enFOAM/robyn-1.7.0/lib/linuxGccDPOpt no no
$MPI_ARCH_PATH ...7.0/platforms/linuxGcc/openmpi-1.4.1 no yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
/home/robyn/OpenFOAM/OpenFOAM-1.7.0/bin/foamInstallationTest: line 258: [: -lt: unary operator expected
gcc
gzip 1.3.12 /usr/bin/gzip
tar 1.21 /bin/tar
icoFoam
WARNING: Conflicting installations:
OpenFOAM settings : /home/robyn/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/icoFoam
current path :
CRITICAL ERROR

-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.

*** The foam installation contains 1 critical error(s)
*** Review the output for warning messages and consult
*** the installation guide for trouble shooting.

wyldckat June 30, 2010 09:45

Hi Robyn,

Well, OpenFOAM 1.7 only has a prebuilt version for Ubuntu. So I'll have to refer you now to this thread: http://www.cfd-online.com/Forums/ope...-2-11-3-a.html
It has links to instructions on how to build OpenFOAM 1.7 in OpenSUSE 11.2 and 11.3 :)

Best regards,
Bruno

robyn June 30, 2010 09:54

Hello Bruno,

Thanks for the link. I think I might be missing a line in my $HOME/.bashrc file as before there was a test true... at the end of the file I forgot that I deleted. Could this potentially be the problem as the wmake step is not found.

Regards,

Robyn

robyn June 30, 2010 10:15

Thanks Bruno, I will work on it and see where it goes.

Do you know where I could still retrieve a copy of OF 1.6 ? As I was beginning to build my own cases and would not like to be stuck in this position for long.

Regards,

Robyn

wyldckat June 30, 2010 11:20

Hi Robyn,

OpenCFD's repository for OpenFOAM files is this: http://sourceforge.net/projects/foam/files/
You can get from there all OpenFOAM's since 1.1 :D

Best regards,
Bruno


All times are GMT -4. The time now is 00:28.