CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

1.7.x Environment Variables on Linux 10.04

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2010, 12:52
Default 1.7.x Environment Variables on Linux 10.04
  #1
New Member
 
Daniel Hertenstein
Join Date: Jun 2010
Posts: 2
Rep Power: 0
rasma is on a distinguished road
I grabbed OpenFOAM-1.7.x and the ThirdParty sources and have them in the $HOME/OpenFOAM directory. I am on the step of setting the environment variables. I have followed the directions on the OpenFOAM site exactly and added

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

to the bottom of the .bashrc file. However, when running

. $HOME/.bashrc

I get the following set of errors:

bash: /opt/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.7.x/etc/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-1.7.x/etc/apps/paraview3/bashrc: No such file or directory
bash: /opt/OpenFOAM-1.7.x/etc/apps/ensight/bashrc: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory

which makes me think that .bashrc thinks that OpenFOAM is in the opt directory. But simply typing in $HOME/OpenFOAM/OpenFOAM-1.7.x/etc takes me to the correct path. Any ideas on why this would be occurring? Thanks in advance!
rasma is offline   Reply With Quote

Old   July 1, 2010, 14:28
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Daniel and welcome to the forum!

You apparently were lucky enough to get the git repository right in the middle of some updates
The developers now are supporting two types of releases, and one of them (the Ubuntu/Debian releases) use the /opt folder, so you got them right when they were updating that version :P

So, right now, you've two options:
  1. either update your git clone:
    Code:
    cd $HOME/OpenFOAM/OpenFOAM-1.7.x
    git pull
    Because I've just cloned it myself and is fixed!
  2. or change the $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc file. This is how it should look like, in the user settings part:
    Code:
    ################################################################################
    # USER EDITABLE PART. Note changes made here may be lost with the next upgrade
    #
    # either set $FOAM_INST_DIR before sourcing this file or set
    #    $foamInstall below to where OpenFOAM is installed
    #
    # Location of the OpenFOAM installation
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    foamInstall=$HOME/$WM_PROJECT
    # foamInstall=~$WM_PROJECT
    # foamInstall=/usr/local/$WM_PROJECT
    # foamInstall=/opt/$WM_PROJECT
    #
    # END OF (NORMAL) USER EDITABLE PART
    ################################################################
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 1, 2010, 14:53
Default
  #3
New Member
 
Daniel Hertenstein
Join Date: Jun 2010
Posts: 2
Rep Power: 0
rasma is on a distinguished road
Bruno,

I grabbed the files again and no more problem. Thanks a lot!
rasma is offline   Reply With Quote

Old   July 2, 2010, 03:20
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I guess "Linux 10.04" is Ubuntu, not exactly the only Linux-based operating system. ;-)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 2, 2010, 18:52
Default Similar problem
  #5
New Member
 
Timothy Vandenbussche
Join Date: Jul 2010
Posts: 2
Rep Power: 0
timothy is on a distinguished road
Hello all,

I have a virtual machine with Ubuntu 10.4.
I installed Openfoam170 with apt-get.
I changed my bashrc according to the instructions.

Files arrived in /opt

I now seem to have the following problem:
foamInstallationTest returns
FATAL ERROR: OpenFOAM environment not configured.

I notice the following environment variables:
echo $FOAM_RUN
/home/timothy/OpenFOAM/timothy-1.7.0/run
echo $FOAM_INST_DIR
/opt

So I'm not able to do the examples of the tutorial.
I guess something is wrong in the environment. Or should I make another directory in my home-directory?

Thanks for helping.
timothy is offline   Reply With Quote

Old   July 2, 2010, 19:44
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Timothy and welcome to the forum!

Interesting...
Quote:
Originally Posted by timothy
I now seem to have the following problem:
foamInstallationTest returns
FATAL ERROR: OpenFOAM environment not configured.
OK, 4 things:
  1. foamInstallationTest is useless in the Ubuntu/Debian package:
    Quote:
    Originally Posted by henry View Post
    The foamInstallationTest script is for the source-build installation as described in the README.org file, not for the Debian pack installation.
  2. What version of Ubuntu are you running: i686 or x86_64?
  3. What version of OpenFOAM 1.7 Debian package did you install? i686 or x86_64?
  4. Does the folder /opt/openfoam170 exist and does it contain anything?
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 2, 2010, 20:06
Default
  #7
New Member
 
Timothy Vandenbussche
Join Date: Jul 2010
Posts: 2
Rep Power: 0
timothy is on a distinguished road
ok, point 1 I don'tmind. If the rest would work...

2.
ubuntu-10.04-desktop-i386.iso
on a virtual machine

3. I just used apt-get for installation, like is said on http://www.openfoam.com/download/ubuntu.php
so i just typed
apt-get install openfoam170

4. Yes all the files seem to be present in /opt/openfoam170

But I notice at least two problems:

$FOAM_RUN points to the wrong directory

And if I start with the tutorial: if I call then Blockmesh in
/opt/openfoam170/tutorials/incrompressible/icoFoam/cavity/

it gives FATAL ERROR Failed writing polymesh.
(can this be related to the environment settings?)
timothy is offline   Reply With Quote

Old   July 2, 2010, 20:28
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by timothy View Post
But I notice at least two problems:

$FOAM_RUN points to the wrong directory

And if I start with the tutorial: if I call then Blockmesh in
/opt/openfoam170/tutorials/incrompressible/icoFoam/cavity/

it gives FATAL ERROR Failed writing polymesh.
(can this be related to the environment settings?)
Oh... right... they forgot about putting one last line at the end of the installation guide: Click --> here <-- to start learning how to use OpenFOAM. Or open the file: /opt/openfoam170/doc/Guides-a4/UserGuide.pdf

Because $FOAM_RUN doesn't point to the wrong folder, it points to a folder which should be located in your personal user folder! And in the user guide it starts off with:
Code:
mkdir -p $FOAM_RUN 
cp -r $FOAM_TUTORIALS $FOAM_RUN
This will create your own copy of tutorials so you can mess around with them without damaging the original copy and having to reinstall the whole thing again!


This quick and easy installation of OpenFOAM in Ubuntu is designed to be a system wide installation and to be a plug-and-play like application.
The folder /opt/openfoam170 is a system/protected folder which is meant to be accessed only as source of the things you can use! It's not meant to be used directly inside it! You can use the applications and libraries in it, and copy stuff from it, but you aren't meant to change it!

Except maybe when updating the OpenFOAM installation, which should be available every month. When that time comes, they should post some more info about it, but probably Ubuntu will automatically warn you that there is a new version available to install

Best regards and good luck!
Bruno
__________________

Last edited by wyldckat; July 2, 2010 at 20:32. Reason: Added address to the local user guide
wyldckat is offline   Reply With Quote

Old   July 29, 2010, 15:38
Default
  #9
Senior Member
 
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18
openfoam_user is on a distinguished road
Hi Bruno,

today I have updated my OpenFOAM-1.7.x version.

Since then I get the following error message when I run a case in parallel. To run a case in parallel I use the following command:
/shared/OpenFOAM/ThirdParty-1.7.x/platforms/linux64Gcc/openmpi-1.4.1/bin/mpirun -np 12 -hostfile machines /shared/OpenFOAM/OpenFOAM-1.7.x/bin/foamExec simpleFoam -parallel | tee

log.simpleFoam/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 90: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamEtcFile: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 241: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 244: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 247: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/bin/foamCleanPath: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory
/shared/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc: line 83: /home/sanchi/OpenFOAM/OpenFOAM-1.7.x/etc/settings.sh: No such file or directory

In serial it runs well.

Do you have any idea ?

Regards,

Stephane.
openfoam_user is offline   Reply With Quote

Old   July 30, 2010, 05:43
Default
  #10
Senior Member
 
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18
openfoam_user is on a distinguished road
Now my problem is solved. The foamInstall directory was not set correctly.

foamInstall=$HOME/$WM_PROJECT

Stephane.
openfoam_user is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Set Environment Variables' for Fluent 12 DarrenC Fluent UDF and Scheme Programming 2 May 25, 2011 16:51
Gentoo Environment Variables scottneh OpenFOAM Installation 1 September 20, 2009 13:21
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
How to set environment variables kanishka OpenFOAM Installation 1 September 4, 2005 11:15
environment variables version 3.2 F.K. Siemens 15 June 28, 2004 13:41


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