CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Env variable not set (http://www.cfd-online.com/Forums/openfoam-installation/57695-env-variable-not-set.html)

gruber2 December 28, 2005 05:08

I want to install OpenFOAM-1.2
 
I want to install OpenFOAM-1.2 on my Ubuntu 5.10 -Breezy Batcher-
So i download the Files:
OpenFOAM-1.2.General.gtgz
OpenFOAM-1.2.linuxGcc4Opt.gtgz
and safe it in my home Directory.
I unpack it and they are stored in the OpenFOAM-1.2 Directory.
I modified my .bashrc-File and sourced it as described.
But when i am runnig the InstallationTest i always get the Error that the "env variable not set":

ggruber@nx6110:~/OpenFOAM/OpenFOAM-1.2/bin$ ./foamInstallationTest
Executing ./foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: nx6110
OS: Linux version 2.6.12-9-386
User: ggruber
User_config: /home/ggruber/.bashrc
FATAL ERROR: /home/ggruber/.OpenFOAM-1.1/bashrc does not appear to be sourced from:
/home/ggruber/.bashrc

You need the following at the end of your /home/ggruber/.bashrc file:
. /home/ggruber/OpenFOAM/OpenFOAM-1.1/.OpenFOAM-1.1/bashrc
or equivalent depending on the location of the OpenFOAM installation.


FATAL ERROR Foam install directory not set.

Set correct path to installation 'WM_PROJECT_INST_DIR' in /home/ggruber/.foam2.3/bashrc
-------------------------------------------------------------------------------


Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR --------- env variable not set --------- yes
$WM_PROJECT_USER_DIR --------- env variable not set --------- no
$FOAM_JOB_DIR --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR --------- env variable not set --------- yes

$FOAM_USER_APPBIN --------- env variable not set --------- no
$FOAM_APPBIN --------- env variable not set --------- yes
$WM_DIR --------- env variable not set --------- yes
$FOAMX_PATH --------- env variable not set --------- yes
$CEI_HOME --------- env variable not set --------- no

$JAVA_PATH --------- env variable not set --------- no
$MICO_ARCH_PATH --------- env variable not set --------- yes
$LAM_ARCH_PATH --------- env variable not set --------- yes
$MPICH_ARCH_PATH --------- env variable not set --------- no
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN --------- env variable not set --------- yes
$FOAM_USER_LIBBIN --------- env variable not set --------- no
$LAM_ARCH_PATH --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc *** not installed ***
CRITICAL ERROR

java 1.4.2
libgcj)
WARNING: Conflicting installations:
foam settings: /bin/java
current path : /usr/bin/java

gzip 1.3.5 /bin/gzip
tar 1.3.5 /bin/tar
icoFoam *** not installed ***
CRITICAL ERROR

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


Checking file/directory permissions...
-------------------------------------------------------------------------------
File/directory Set Reqd Crit
-------------------------------------------------------------------------------


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
Pinging_nx6110 Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Unsuccessful_connection_refused* yes
FATAL ERROR: No remote shell available.
Foam1.1 enviroment requires either ssh and/or rsh.
Contact your system administrator.


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

The system test has evoked 2 fatal error(s).

The foam installation contains 2 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

Who can help ?

gruber2 December 29, 2005 09:39

I set some variables manual in
 
I set some variables manual in a terminal.
That works.

example:
export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=1.2
export WM_PROJECT_LANGUAGE=c++
export WM_PROJECT_INST_DIR=$HOME/$WM_PROJECT
exportWM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION

.
.
Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/ggruber/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/ggruber/OpenFOAM/ggruber-1.2 yes no
$FOAM_JOB_DIR --------- env variable not set --------- yes
-------------------------------------------------------------------------------
.
.

gruber2 December 29, 2005 10:37

Now i add "echo bashrc sourced
 
Now i add "echo bashrc sourced" at the end of the $HOME/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/bashrc File.
Every time i source my $HOME/.bashrc File or start a new Terminal i get the massage "bashrc sourced".
But why are the variables not set ???

hjasak December 29, 2005 11:27

Not sure - are you doung somet
 
Not sure - are you doung something special with your shells? Try opening a new tcsh and doing


source ~/.OpenFOAM-1.2/cshrc

by hand. Then check that the variables are there. An equivalent for bash should work too; if I were you, I'd try the "other" shell, i.e. the one I'm not using all the time.

Hrv

gruber2 December 29, 2005 11:29

Yes, i've got it ! To add "$H
 
Yes, i've got it !
To add "$HOME/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/bashrc" in the "$HOME/.bashrc" file is not enouth.
You have to add "source $HOME/OpenFOAM/OpenFOAM-1.2/.OpenFOAM-1.2/bashrc"

mattijs December 30, 2005 05:27

Indeed. Read a bit (man bash)
 
Indeed. Read a bit (man bash) about the difference between executing a shell script from another shell script or sourcing ('source', '.') it.


All times are GMT -4. The time now is 07:30.