CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Ubuntu AMD64 Installation Troubles (http://www.cfd-online.com/Forums/openfoam-installation/57395-ubuntu-amd64-installation-troubles.html)

mkw87 July 25, 2006 15:48

Hello, I am trying to install
 
Hello, I am trying to install openfoam on a fairly new build of Ubuntu Dapper with a 64 bit kernel. When I run the foamInstallationTest, I run into problems with Conflicting installations of gcc and java, and it says icoFoam is not installed, as shown below:

Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.0.3
WARNING: Conflicting installations:
foam settings: /home/matthew/OpenFOAM/linux/gcc-4.1.0-64/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

java 1.5.0_06
WARNING: Conflicting installations:
foam settings: /home/matthew/OpenFOAM/linux/j2sdk1.4.2_05/bin/java
current path : /usr/bin/java

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

To remedy this, I've found I'm able to edit the bashrc file in the OpenFOAM-1.3 folder, but I want to do this the easiest way possible and by editing one thing to make it work I have to change lots of things (ie: it points to "linux" for $WM_ARCH and not linuxAMD64 for some reason, also the install directory should be: /home/matthew/OpenFOAM/OpenFOAM-1.3/... but it cuts out the OpenFOAM-1.3 for some reason as well).

Any suggestions are greatly appreciated, thanks in advance.

msrinath80 July 25, 2006 16:08

You need to do a export WM_64=
 
You need to do a export WM_64=on or some such in your ~/.bashrc. Read the README.

msrinath80 July 25, 2006 16:26

Plus, your utilities (gcc, jav
 
Plus, your utilities (gcc, java et al.) should be in a folder called linuxAMD64, not linux. Check the README.

mkw87 July 25, 2006 17:35

I have them in a folder titled
 
I have them in a folder titled linuxAMD64, the problem I said was that it was looking in the folder linux. I read the readme but did not find anything about WM_64, but I will check it again. Thanks for the quick response.

msrinath80 July 25, 2006 17:37

Quoting from the README: B.
 
Quoting from the README:

B. Running OpenFOAM in 64 bit mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Those users with an installation of Linux on a 64 bit machine may
install either or both of the 32 bit version of OpenFOAM (linux) or
the 64 bit version of FOAM (linuxAMD64).

In order to set up the user to run in 64 bit mode, the user must set
the environment variable $WM_64 (to anything, e.g. "on") before
sourcing the .OpenFOAM/bashrc (or cshrc) file. Unsetting $WM_64 and
sourcing the bashrc file will set up the user to run in 32 bit
mode. With this set up, the setting of $WM_64 can be used as a switch
between 64 and 32 bit modes.
README lines 175-214/214 (END)

mkw87 July 25, 2006 17:48

Thank you, setting WM_64="on"
 
Thank you, setting WM_64="on" solved that problem, I am just left with the conflicting installations.

When I run the foamInstallationTest I recieve:
Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.0.3
WARNING: Conflicting installations:
foam settings: /home/matthew/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

java 1.5.0_06
WARNING: Conflicting installations:
foam settings: /home/matthew/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java
current path : /usr/bin/java

gzip 1.3.5 /bin/gzip
tar 1.3.5 /bin/tar
icoFoam ...nFOAM-1.3/applications/bin/linuxAMD64Gcc4DPOpt/icoFoam
-------------------------------------------------------------------------------


So it is still not finding the correct directory which should be
~/OpenFOAM/OpenFOAM-1.3/...

When I try to execute FoamX I recieve:
matthew@bandersnatch:/$ FoamX
Cannot find JDK at /home/matthew/OpenFOAM/linuxAMD64/j2sdk1.4.2_05. Please set JAVA_PATH to the
JDK installation directory.

Would the easiest solution be to just export JAVA_PATH=/usr/bin/java and do the same for GCC?

mkw87 July 25, 2006 17:50

Ok, it launched!! I simply ex
 
Ok, it launched!! I simply exported JAVA_PATH to the correct folder in my OpenFOAM installation, and it worked.

Thanks a lot, now to learn how to use this program.

msrinath80 July 25, 2006 17:52

Good luck! Check the Wiki. Do
 
Good luck! Check the Wiki. Do the cavity tutorial from the user guide once or twice until you feel comfortable. Then it's time to think about your problem and hit the forums if you face problems or share your findings http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

mkw87 July 25, 2006 18:20

Ok, it worked before, so I clo
 
Ok, it worked before, so I closed it and exited the terminal, opened a new one, and it required me to re-export the JAVA_PATH. Is there something I can edit so it saves this? I tried putting it in the ~/OpenFOAM/OpenFOAM-1.3/.bashrc file but it did not seem to work (not sure if I should write an entire new section there for "linuxAMD64" or not... Anyways, to make sure it still worked, I re-exported the path manually, and now I have the following problem:

matthew@bandersnatch:~$ FoamX
Starting NameServer with inet:bandersnatch:1234 ...
Starting FoamX Host Browser with inet:bandersnatch:1234 ...
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : FoamXHostBrowser
Date : Jul 25 2006
Time : 19:23:58
Host : bandersnatch
PID : 29817
Root :
Case :
Nprocs : 1
HostBrowser running.....
/home/matthew/OpenFOAM/OpenFOAM-1.3/bin/runFoamXHB: line 127: 29814 Killed nsd -ORBIIOPAddr $myIOP --ior $FOAMX_CONFIG/ns.ref </dev/null


And it fails to launch, any ideas?

mkw87 July 25, 2006 18:23

It magically fixed itself...I
 
It magically fixed itself...I tried various things before posting that, nothing did it. I looked through the bashrc file again, closed without saving, did . ~/.bashrc again, and then tried launching and it worked O.o.

msrinath80 July 25, 2006 18:54

You need to source the .bashrc
 
You need to source the .bashrc in the OpenFOAM distribution from your local bashrc. Sigh, again explained in the readme. P_P

Excerpt from the README:

a) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'),
source the .OpenFOAM-1.3/bashrc file by adding the following line to
the end of your $HOME/.bashrc file:

. $HOME/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc

Then update the environment variables by sourcing the $HOME/.bashrc
file by typing in the terminal:
. $HOME/.bashrc

b) OR, if running tcsh or csh, source the .OpenFOAM-1.3/cshrc file by
adding the following line to the end of your $HOME/.cshrc file:

source $HOME/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/cshrc

The update the environment variables by sourcing the $HOME/.bashrc
file by typing in the terminal:
source $HOME/.cshrc

mkw87 August 27, 2006 09:20

Ok, I'm not sure if a recent
 
Ok, I'm not sure if a recent update to ubuntu broke something or not, but this will no longer launch for me. I have WM_64 set to "on", if I echo it it says it is on, but when I execute FoamX it looks for java in the linux folder, not the linuxAMD64 folder.

Any ideas?

msrinath80 August 27, 2006 19:54

Are you sure you downloaded th
 
Are you sure you downloaded the AMD64 version? Also try resourcing your .bashrc

mkw87 August 28, 2006 07:56

I managed to fix it, not sure
 
I managed to fix it, not sure what went wrong. I deleted and recreated the .bashrc and bashrc in the OpenFOAM directory to fix it.

Thanks though.

mss October 20, 2006 04:41

Dear Matthew, I am trying to
 
Dear Matthew,
I am trying to install OpenFOAM on my computer (Linux Suse 10.1, bash: x86_64) and I
have the same problems as you. I am not expert in Linux, could you please give me some detailed
advise how to solve this problem?

the result of the test is:

-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.1.0
WARNING: Conflicting installations:
foam settings: /home/margst/OpenFOAM/linux/gcc-4.1.0-64/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

java 1.4.2_11
WARNING: Conflicting installations:
foam settings: /home/margst/OpenFOAM/linux/j2sdk1.4.2_05/bin/java
current path : /usr/bin/java

gzip 1.3.5 /usr/bin/gzip
tar 1.3.5 /bin/tar
icoFoam ...M/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/icoFoam
-------------------------------------------------------------------------------

/Rita

mkw87 October 20, 2006 21:21

Open a terminal, and type:
 
Open a terminal, and type:

export WM_64=on

If that takes care of the problem, then that means what you need to do is set the machine to know that it is in 64-bit mode. To make this automatic, add the "export WM_64=on" to the following:

~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc

If this doesn't work, I can't tell you exactly what to do. Using 64-bit anything still leaves things acting sketchy at times. Also, you may be able to use https://wiki.ubuntu.com/HowTo_instal...%28OpenFOAM%29 as a reference. It was written for ubuntu, but the general installation is the same for all distro's, just some of the commands may change.

Hope this helps.

mss October 23, 2006 01:43

Thank you Matthew I will try.
 
Thank you Matthew I will try.

delio141 March 6, 2008 11:05

I have the same problem, and I
 
I have the same problem, and I don't know where do I type the line "export wm_64=on.

wese March 6, 2008 11:28

Hi, I'm not sure, if this hel
 
Hi,
I'm not sure, if this helps (I'm using SuSE 10.2), but I've added the following lines to my .bashrc file (which is located in my home directory [/home/wagner/cwe] ):

export WM_SYS=`uname -i`
if [ $WM_SYS = "x86_64" ] ; then
export WM_64=on
fi

. /home/wagner/cwe/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc
The scripts automatically detects the 64bit enviornment (if you have "uname" installed) and sets the needed variable.
It might be helpfull if you're using a nfs share for your home directory on different machines, where some are 64 and some are 32 bit (so as I do).

Greetings
Christian

wese March 7, 2008 03:45

Hello Délio, I guess that you
 
Hello Délio,
I guess that you've installed all files as described in the manual.
Your folder structure should look like that:

/Path to openfoam root dir/
-linux64/
---gcc...
---java....
---paraview...
-OpenFOAM...
-your username...

When you enter
{print $WM_64}
in your console you should get something like "on" or "1" (or whatever value you gave variable).

If you've set the variable manually you should open a new console so that the OpenFOAM configuration recognizes the value.
After that everything should work.

If you still experience problems add the line I've posted here earlyer to your .bashrc (this file is generally hidden, so you'll have to set "show hidden files" in your KDE (or whatever window manager you user) wo see it and edit it with a text editor).
Please remember that then you'll have to replace:
/home/wagner/cwe/ by /home/delio.

In the end, if it might helps you. Here's my foamInstallationtest:
Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: ligeti
OS: Linux version 2.6.18.2-34-default
User: cwe
User_config: /home/wagner/cwe/.bashrc
Foam_config: /home/wagner/cwe/.OpenFOAM-1.4.1/bashrc sourced correctly.
-------------------------------------------------------------------------------


Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/wagner/cwe/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/wagner/cwe/OpenFOAM/cwe-1.4.1 yes no
$FOAM_JOB_DIR /home/wagner/cwe/OpenFOAM/jobControl yes yes
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /home/wagner/cwe/OpenFOAM/OpenFOAM-1.4.1 yes yes yes

$FOAM_USER_APPBIN ...4.1/applications/bin/linux64GccDPOpt yes yes no
$FOAM_APPBIN ...4.1/applications/bin/linux64GccDPOpt yes yes yes
$WM_DIR ...er/cwe/OpenFOAM/OpenFOAM-1.4.1/wmake yes yes yes
$FOAMX_PATH ...ations/utilities/preProcessing/FoamX yes no yes
$CEI_HOME /usr/local/ensight/CEI no no

$JAVA_PATH ...r/cwe/OpenFOAM/linux64/j2sdk1.4.2_05 yes yes no
$MICO_ARCH_PATH ...ico-2.3.12/platforms/linux64GccDPOpt yes yes 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 ...M/OpenFOAM-1.4.1/lib/linux64GccDPOpt yes yes yes
$FOAM_USER_LIBBIN ...enFOAM/cwe-1.4.1/lib/linux64GccDPOpt yes yes no
$LAM_ARCH_PATH --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.2.1 /home/wagner/cwe/OpenFOAM/linux64/gcc-4.2.1/bin/gcc
java 1.4.2_05 /home/wagner/cwe/OpenFOAM/linux64/j2sdk1.4.2_05/bin/java
gzip 1.3.5 /usr/bin/gzip
tar 1.3.5 /bin/tar
icoFoam ...penFOAM-1.4.1/applications/bin/linux64GccDPOpt/icoFoam
-------------------------------------------------------------------------------


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


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
Pinging_ligeti Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Successful yes
(*) Only one of rsh or ssh is required by the Foam enviroment.

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

Base configuration ok.

Critical systems ok.


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