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

icoFoam: command not found

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 29, 2010, 12:58
Default icoFoam: command not found
  #1
New Member
 
Romain
Join Date: Jun 2010
Location: Lyon
Posts: 28
Rep Power: 7
nakor is on a distinguished road
Hello,
I have a problem with my installation of openFoam.
I follow the instructions from http://www.openfoam.com/download/ubuntu.php

So in the part User configuration, I open the .bashrc file by using
Code:
 gedit ~/bashrc
And I put "/opt/openfoam170/etc/bashrc " at the bottom of the file (which is empty, is that all right ?). And I save the file.

But when I try
Code:
 icoFoam -help
I have the following error message, "icoFoam: command not found".

Do you know what the problem is ? I am quite sure that the path to my OpenFOAM directory is right, but, I am not sure that I am using the right bashrc file..

Thanks;
nakor is offline   Reply With Quote

Old   June 29, 2010, 13:30
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings nakor and welcome to the forum!

OK, you missed two dots in the setup process:
  1. .bashrc has a dot before it:
    Code:
    gedit ~/.bashrc
  2. Sourcing OpenFOAM's bashrc file also needs a dot, but with a space between the path and the dot:
    Code:
    . /opt/openfoam170/etc/bashrc
Now open a new terminal and voilá, you are ready to foam!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 29, 2010, 13:37
Default
  #3
New Member
 
Romain
Join Date: Jun 2010
Location: Lyon
Posts: 28
Rep Power: 7
nakor is on a distinguished road
oh my bad. everything is working with both dot.
Thanks for your help.
nakor is offline   Reply With Quote

Old   July 1, 2010, 17:13
Default icoFoam: command not found - continued
  #4
New Member
 
Nigel
Join Date: Jul 2010
Posts: 3
Rep Power: 7
SilentRunner is on a distinguished road
I'm also having the same problem. However, I've followed the instructions to the letter (including dots etc), but I still get "Command not found".
I'm not only new to OpenFoam but also Ubuntu (both just installed) so you can't be more newbee than me!
I've got through the installation and editted the bashrc file. I notice that this file was not empty when I opened it (from home/nigel).

Any step-by-step "idiots guide" would be extremely helpful.
Thanks!
usmanabdullah likes this.
SilentRunner is offline   Reply With Quote

Old   July 2, 2010, 03:57
Default
  #5
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
Hi Nigel,

~/.bashrc is supposed to have some stuff in it, so that's ok. Did you add the correct line in ~/.basrc? (with a dot and a space as well)

Code:
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
(or 1.7 or whatever version you use of course ...)
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   July 2, 2010, 17:19
Default icoFoam: command not found - continued
  #6
New Member
 
Nigel
Join Date: Jul 2010
Posts: 3
Rep Power: 7
SilentRunner is on a distinguished road
gwierink.
Thanks for your help. Yes I added in each of the following separately and tested them separately (with dots/spaces):

. $HOME/OpenFOAM/OpenFOAM-1.7/etc/bashrc
. $HOME/OpenFOAM/OpenFOAM-170/etc/bashrc
. $HOME/OpenFOAM/OpenFOAM-1.70/etc/bashrc
. $HOME/OpenFOAM/OpenFOAM170/etc/bashrc
. /opt/openfoam170/etc/bashrc

but still the same problem of "command not found" when typing "icoFOAM - help"
(I've installed version 1.70).
I must be doing something seriously daft, but as I say I'm new to Ubuntu and OpenFoam...
Any other pointers or ABC guide would be great!
SilentRunner is offline   Reply With Quote

Old   July 2, 2010, 19:15
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Nigel,

Uhm... but it doesn't get any simpler than following the official installation instructions: http://www.openfoam.com/download/ubuntu.php

And another thing: it's icoFoam, not icoFOAM!! In Linux letter case in files and folders is almost as important as your own life Remember that:
Quote:
With great power comes great responsibility.
And for many people, Linux is waaaay more powerful than Windows - although in essence, digitally it's possible to do anything... that isn't physical!

Working with Linux teaches you a valuable lesson: be very cautious with what you type, because one wrong letter case, one wrong digit or one dot in the wrong place, and PUFF... you will just get a GIGO (Garbage In - Garbage Out) And the same goes for CFD


So, my advice is to follow the instructions again and very closely! You will need to learn to be very focused when using OpenFOAM. It will mostly be text based control and editing; only post processing will likely be graphical via ParaView.
That's one of the reasons (at least I think it is) why OpenCFD lays out a tutorial explaining how to use it, and doesn't simply post a install script and tell people to "click here to install" And this Ubuntu packaging system is already a big step in the right direction for new users, because with OpenFOAM 1.6 it wasn't this easy!!

Best regards and good luck!
Bruno
wyldckat is offline   Reply With Quote

Old   July 3, 2010, 10:09
Smile icoFoam: command not found
  #8
New Member
 
Nigel
Join Date: Jul 2010
Posts: 3
Rep Power: 7
SilentRunner is on a distinguished road
DOH!
It had installed fine, but as you say I tried "icoFOAM -help" whereas it should have been "icoFoam -help". It confused me though because the software is called "OpenFOAM"...

Thanks for your advice. Now down to the tutorial...
SilentRunner is offline   Reply With Quote

Old   August 27, 2010, 05:48
Default
  #9
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
Hi all,
I just also tried to install OF but for some reason i got stuck.
Installation went alright so far but when it comes to the configuration there seams to be something wrong.
May be I should mention first ( I don't know how important that is ) that OF is not installed in my Home-folder but in a folder that is superior to Home called opt.

So I'm now in this superior folder typing

Code:
colin@colin:/$gedit ~/.bashrc
getting a non OF file without the typical header of OF
and the last lines are:
Code:
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
after that I'm typing the required line:
Code:
. /opt/openfoam171/etc/bashrc
I now save and exit gedit
and type the line:
Code:
 . ~/.bashrc
no failure message or so on then I'm opening an other terminal getting an initial failure message:

Code:
bash: opt/openfoam171/etc/bashrc: No such file or directory
and consequently icoFoam -help results in a command not found

an other thing to mention when I open the terminal I'm in the directory

Code:
colin@colin:~$
which is root/home/colin not like openfoam which is
root/opt/openfoam171

I hope you can help me
regards
Colin
colinB is offline   Reply With Quote

Old   August 27, 2010, 06:56
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9
gwierink is on a distinguished road
Hi Colin,

Are you sure you wrote ". /opt/openfoam171/etc/bashrc" correctly, because the bash error says it can't find "opt/openfoam171/etc/bashrc" instead of that it can't find "/opt/openfoam171/etc/bashrc"?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   August 27, 2010, 07:20
Default
  #11
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
@gwierink
yep my fault it was exactly what you mention!
I need to learn to read more closely!
sry for the inconveniences
regards
Colin
colinB is offline   Reply With Quote

Old   January 21, 2014, 05:19
Default Still Getting the samething icoFoam: command not found
  #12
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
followed all the ways mentioned in 'http://www.openfoam.org/download/ubuntu.php' and also tried all the possible ways online including CFD online threads, but still getting the samething icoFoam: command not found
inf.vish is offline   Reply With Quote

Old   January 21, 2014, 16:26
Default
  #13
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Vishal,

OK, not much to work with, so I'll ask several questions, in an attempt to help diagnose the problem:
  1. Which Ubuntu version are you using?
  2. And which architecture? You can see which one it is by running:
    Code:
    uname -m
  3. What does this command give you:
    Code:
    cat /etc/apt/sources.list.d/openfoam.list
  4. Does this command give you any error messages:
    Code:
    sudo apt-get update
  5. Did this command give you any error messages:
    Code:
    sudo apt-get install openfoam222
  6. What does this command give you:
    Code:
    ls -l /opt/openfoam222/etc/bashrc
  7. What do these two commands give you:
    Code:
    source /opt/openfoam222/etc/bashrc
    echo $WM_PROJECT_DIR
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 22, 2014, 01:30
Default
  #14
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Dear Bruno,

first of all Thanks for your quick response
now the answers are as follows
1) ububtu version :: 12.04 LTS
2) Architecture :: x86_64
3) system response for the command:: << cat /etc/apt/sources.list.d/openfoam.list >>

deb http://www.openfoam.org/download/ubuntu precise main

4) no error message for the command :: << sudo apt-get update >>
but ya, the following message appears in last three lines

W: Duplicate sources.list entry http://www.openfoam.org/download/ubuntu/ precise/main amd64 Packages (/var/lib/apt/lists/www.openfoam.org_download_ubuntu_dists_precise_mai n_binary-amd64_Packages)
W: Duplicate sources.list entry http://www.openfoam.org/download/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/www.openfoam.org_download_ubuntu_dists_precise_mai n_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems


5) no error message for the command << sudo apt-get install openfoam222 >>
but i guess you may like to see the system response, <here it is shown>

Reading package lists... Done
Building dependency tree
Reading state information... Done
openfoam222 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 207 not upgraded.


6) response for the command << ls -l /opt/openfoam222/etc/bashrc >>

-rw-r--r-- 1 root root 7322 Jan 22 10:11 /opt/openfoam222/etc/bashrc

7) the response for the commands << source /opt/openfoam222/etc/bashrc
echo $WM_PROJECT_DIR >> is as follows

/home/eatin/OpenFOAM/OpenFOAM-2.2.2

waiting again for your quick response
Thanks Again Bruno !!!!

Last edited by inf.vish; January 22, 2014 at 06:18.
inf.vish is offline   Reply With Quote

Old   January 22, 2014, 19:30
Default
  #15
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Vishal,

Quote:
Originally Posted by inf.vish View Post
7) the response for the commands << source /opt/openfoam222/etc/bashrc
echo $WM_PROJECT_DIR >> is as follows

/home/eatin/OpenFOAM/OpenFOAM-2.2.2
OK, this last one tells the crucial piece of information. It seems that you already have at least one another version of OpenFOAM installed in your system, but is installed somewhere inside the folder " /home/eatin/OpenFOAM/".

If you need more than one version, please check these instructions: http://openfoamwiki.net/index.php/In...nFOAM_versions - namely section 2.2

If you only need one version, edit the file "~/.bashrc" and remove any references to the other OpenFOAM versions, or at least comment them out. Then start a new terminal and then do again step #7 from my previous post.

Best regards,
Bruno


PS: In my signature, there is this link: Posting code and output with [CODE] - it explains how to post code, so that you wouldn't need to use the "<<>>" for isolating the code in question.
inf.vish likes this.
wyldckat is offline   Reply With Quote

Old   January 23, 2014, 02:20
Default
  #16
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi Bruno,

eatin@EAT-Standalone:~$ echo $WM_PROJECT_DIR

after following the instructions given in the link, this is the response I got from system

thanks and regards,
vishal
inf.vish is offline   Reply With Quote

Old   January 23, 2014, 04:10
Default
  #17
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi Bruno,

Last date of project is very early, hence I tried to remove all the files manually and again freshly installed OF-2.2.2, but this time am facing the problem with paraview. ( Apply button is not working )

I have reinstalled paraview thrice but still the same issue. screenshots are attached for your convinience.

Bruno, I am afraid if my boss will kick my ass.
Awaiting a quick help from your side.

Thanks and Regards,
Vishal

Last edited by wyldckat; January 23, 2014 at 18:25. Reason: accidental double post
inf.vish is offline   Reply With Quote

Old   January 23, 2014, 18:43
Default
  #18
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Vishal,

OpenFOAM and Linux is all about the details. If you fail to see one very small detail, whatever it is, it will not give you the correct results.


What I meant was for you to run the two command lines again, not just the last one:
Code:
source /opt/openfoam222/etc/bashrc
echo $WM_PROJECT_DIR
As for the images, it looks like you're trying to use OpenFOAM as "root". Please, do not use OpenFOAM in root mode. Run this command to exit from root mode:
Code:
exit
To know if you are in "root" mode, run:
Code:
whoami
It should tell you your user name; but if it says "root", then you're in root mode.


Running gedit from the command line, sometimes does not work as good in Ubuntu as it did a few years ago. Use instead this command:
Code:
gnome-text-editor ~/.bashrc
And make sure you are not in root mode.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 24, 2014, 00:25
Default
  #19
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi Bruno,

OF-221 was installed in root mode by ex-employee. i am new in the office and since first day OF was not working fine. hence, after trying all the ways i reinstalled it in root mode. now atleast i am able to see some GUI.

With all due respect I would like to tell you that i have followed all the instruction given by you and got the following ((images are attached)). I am also attaching the screenShot of 'bashrc' file.

Thanks and Regards,
Vishal
inf.vish is offline   Reply With Quote

Old   January 24, 2014, 19:01
Default
  #20
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Vishal,

OK, from the looks of it, I think that if you start a new terminal now, OpenFOAM 2.2.2 should work as intended. Try running:
Code:
icoFoam -help
If it tells you about the options for using icoFoam, then you should now be able to follow the OpenFOAM User Guide without any problems: http://www.openfoam.org/docs/user/


As for what you are seeing at the end of the file "~/.bashrc", you can find a somewhat detailed explanation here: http://openfoamwiki.net/index.php/In...with_the_Shell

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 01:36
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 05:41
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26


All times are GMT -4. The time now is 08:35.