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

OF 1.7 installation problem "command not found error"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2010, 07:59
Lightbulb OF 1.7 installation problem "command not found error"
  #1
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
hello Foamers,
I've tried to install OF 1.7 on my Ubuntu 10.04 as has been described in http://www.cfd-online.com/Forums/ope...am-fedora.html
i've edited .bashrc and have updated the shell.
But now, i can't use OF because of "command not found" error when typing blockMesh, icoFoam and so on.
What is the problem?

Last edited by maysmech; July 8, 2010 at 20:49.
maysmech is offline   Reply With Quote

Old   July 8, 2010, 08:16
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 maysmech,

OK, lets "isolate and conquer":
  1. What does this output:
    Code:
    echo $WM_PROJECT_DIR
  2. If the previous shows anything, then what does this output:
    Code:
    ls $WM_PROJECT_DIR
  3. If the previous shows the contents of your base OpenFOAM folder (OpenFOAM-1.7.0 and ThirdParty-1.7.0), then so far so good!
  4. Now, did you run ./Allwmake in the folder $WM_PROJECT_DIR/OpenFOAM-1.7.0? If you did, did you make a log of the output? If not, run again like so:
    Code:
    ./Allwmake > make.log 2>&1
    Then, when it's finished running, open the file make.log and search for "Error " (including the space) and if some appear, then you've got problems building OpenFOAM.
If you've reached point 4 with success, and without errors, then you're ready to go. Otherwise, you will need to tell us a few more things:
  1. what version of Fedora are you using?
  2. what architecture of Fedora are you using: i?86 or x86_64?
  3. If there are errors listed in the make.log file, pack it with:
    Code:
    tar -cjf make.log.tar.bz2 make.log
    and post it here in attachment.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 8, 2010, 09:45
Default
  #3
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Dear Bruno
Thanks,

Quote:
What does this output:
Code:
echo $WM_PROJECT_DIR
that is:
Code:
/home/maysam/OpenFOAM/OpenFOAM-1.7.0
Quote:
Now, did you run ./Allwmake in the folder $WM_PROJECT_DIR/OpenFOAM-1.7.0?
Yes, it has error 2 and 127, i tried to attach make.log but it can't be done here. i uploaded it in another site http://beyshare.com/en/download/CeSS...ke.log.tar.bz2
Quote:
what version of Fedora are you using?
what architecture of Fedora are you using: i?86 or x86_64?
I use Ubuntu 10.04 32bit.

Best regards,
maysam
maysmech is offline   Reply With Quote

Old   July 8, 2010, 13:31
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi maysam,

OK, apparently you seriously followed the wrong tutorial

Any particular reason for building your own OpenFOAM 1.7.0, instead of using the pre-built one for Ubuntu? See here: http://www.openfoam.com/download/ubuntu.php


If you really must build OpenFOAM for yourself, then you still need to install (at least) the following packages (in bold) in Ubuntu (this is the command line):
Code:
sudo apt-get install flex build-essential g++ python-dev libqt4-dev  libreadline5-dev zlib1g zlib1g-dev texinfo byacc bison
Then you can run Allwmake again!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 8, 2010, 20:39
Default
  #5
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
you still need to install (at least) the following packages (in bold) in Ubuntu (this is the command line):
Code:
sudo apt-get install flex build-essential g++ python-dev libqt4-dev  libreadline5-dev zlib1g zlib1g-dev texinfo byacc bison
Then you can run Allwmake again!
i update all things you told and by running allwmake it has error yet. here is new make.log: http://beyshare.com/en/download/lvDMH3F16lGZ/make.log.tar.bz2

Best.
maysmech is offline   Reply With Quote

Old   July 8, 2010, 20:51
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi maysmech,

Ooops, I missed one package:
Code:
sudo apt-get install binutils-dev
And Allwmake again!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 9, 2010, 16:41
Default
  #7
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
thank you very much for your effective helps. the problem has been solved. but by typing "paraFoam" and running paraview a window with "Open data with" appears and tells that a reader for the time files could not find and show readers to select like "LSDyna" "ParaviewDatafiles" and so on. but none of them can show results.
maysmech is offline   Reply With Quote

Old   July 9, 2010, 16:59
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi maysmech,

OK, two things:
  1. Follow these instructions:
    Quote:
    Originally Posted by wyldckat View Post
    As for ParaView 3.8.0, you won't need to build PV3FoamReader since it already has a very good native reader built in ParaView. You can change in the script OpenFOAM-1.7.0/bin/paraFoam were it says ".OpenFOAM" to ".foam", since ParaView 3.8.0 expects that "foam" is the file extension for OpenFOAM cases.
    This way you won't have to loose more time in building stuff.
  2. I hope you are following the instructions from the User Guide when running the cavity tutorial!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 9, 2010, 17:30
Default
  #9
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Follow these instructions
i changed .OpenFOAM to .foam in the file you told (it has 3 of them). now by typing paraFoam, paraview opens and immediately closes.

Last edited by maysmech; July 9, 2010 at 21:35.
maysmech is offline   Reply With Quote

Old   July 11, 2010, 06:48
Default
  #10
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
the paraview version is 3.4 not 3.8. i download 3.8 version from its site. now how can i upgrade the version? i didn't find anything in forum.
maysmech is offline   Reply With Quote

Old   July 11, 2010, 07:25
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi maysmech,

The file "OpenFOAM-1.7.0/etc/apps/paraview3/bashrc" is used to set the environment variables to point to the ParaView installation.
Now, you have (at least) two options:
  1. Either you install/unpack the downloaded ParaView 3.8.0 in the folder defined by the paraview3/bashrc file, namely here:
    Code:
    $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-3.8.0
  2. Or you change this line in paraview3/bashrc:
    Code:
    export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
    to where you installed ParaView. For example:
    Code:
    export ParaView_DIR=$HOME/paraview-3.8.0
Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 11, 2010, 18:52
Default
  #12
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
i've done the second one but by typing paraFoam the last version(3.4) is opening.
maysmech is offline   Reply With Quote

Old   July 11, 2010, 19:52
Default
  #13
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
i installed OF for Ubuntu easily by:
http://www.openfoam.com/download/ubuntu.php

now i have proper paraview 3.8 and OF 1.7.
But in the OpenFOAM folder Only run is available and there isn't any OF sources which can be changeable. Now, how can i make change in OF codes?
maysmech is offline   Reply With Quote

Old   July 12, 2010, 07:40
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi maysam,

OK, then the quickest way right now is to run this command:
Code:
chown $USERNAME:$USERNAME -R /opt/openfoam170
This will change the ownership of the folder /opt/openfoam170 from root to your user and thus you can now use that folder!

But use this only if you really need to change the OpenFOAM's core! If you just want to build new solvers or run the tutorials, then run the commands shown near the end of the Ubuntu instructions page:
Code:
mkdir -p $FOAM_RUN
cp -r $FOAM_TUTORIALS $FOAM_RUN
This will create a work folder for yourself named "$HOME/OpenFOAM/$USERNAME-1.7.0" where you can keep your projects!

The variables "$FOAM_RUN", "$FOAM_USER_LIBBIN" and "$FOAM_USER_APPBIN" are the OpenFOAM's pre-defined paths to your cases, user libraries and user applications!

Best regards,
Bruno
__________________

Last edited by wyldckat; July 21, 2010 at 15:12. Reason: not "$FOAM_LIBBIN" and "$FOAM_APPBIN", it's "$FOAM_USER_LIBBIN" and "$FOAM_USER_APPBIN"
wyldckat is offline   Reply With Quote

Old   July 21, 2010, 15:01
Default problems with user rights OF 1.7
  #15
New Member
 
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 16
claudia.h is on a distinguished road
Hi Bruno,

I have another question. I'm a newbie in OF and linux and i worked up to now with the OF version 1.6. I tried to install openFOAM 1.7. It runs without problems (thanks for your help again) but then I tried to change a solver (chtMultiRegionSimpleFoam). That wasn't possible because OpenFoam was situated in the folder /opt/openfoam170 from root. First I tried to adapt a solver with the superuser rights but than it wasn't possible to execute the openFoam commands.

Then I found your posting and tried to create the folder applications with cp -r $FOAM_APPBIN $FOAM_RUN. I got a folder called "linuxGccDPOpt" including files which i cant open, so I don't know if I have done this right. I thougt i get a folder which includes the folder structure from the /opt/openFoam/applications which includes also the folder solvers from which i could take one solver and adapt it. It would be very helpful for me if you could give me a hint how to get a possibility with OF 1.7 to create a new solver by adapting an existing solver.

I tried also your quick way with the aim to change the ownership from the folder /opt/openfoam170 but if I achieve the command without superuser rights I get the Info "Operation not permitted" and with the superuser rights nothing happen.

Maybe you could help me to solve this problem. Thanks!

Best Regards,
Claudia
claudia.h is offline   Reply With Quote

Old   July 21, 2010, 15:27
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Claudia,
Quote:
Originally Posted by claudia.h View Post
Then I found your posting and tried to create the folder applications with cp -r $FOAM_APPBIN $FOAM_RUN.
Ooops, if you hadn't pointed that out, I wouldn't have seen the blooper I made... but I fixed it now

OK, what you are looking for is $FOAM_APP, or $FOAM_SOLVERS and $FOAM_UTILITIES. So, I believe you want to run:
Code:
cp -r $FOAM_SOLVERS $WM_PROJECT_USER_DIR/solvers
If you run env or export, you will view the available environment variables. For example: I found about $WM_PROJECT_USER_DIR by running
Code:
export | grep $USERNAME
And another thing I mistyped... the -R in chown is before the user name and group... It should be like this:
Code:
sudo chown -R $USERNAME:$USERNAME /opt/openfoam170
Now, if by any chance the folder you just copied has the wrong permissions, then run:
Code:
chown -R $USERNAME:$USERNAME $WM_PROJECT_USER_DIR/solvers
As for building your own solvers/utilities, you will have to edit the file Make/files in the respective solver folder. Example, change the last line that has:
Code:
EXE = $(FOAM_APPBIN)/chtMultiRegionFoam
To:
Code:
EXE = $(FOAM_USER_APPBIN)/chtMultiRegionFoam2
Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 21, 2010, 18:26
Default solver problems
  #17
New Member
 
Claudia Hintringer
Join Date: May 2010
Posts: 10
Rep Power: 16
claudia.h is on a distinguished road
Hi Bruno,

thanks a lot!!! With your help i could copy the solvers and utilities folders in my home folder. First I tried to copy the chtMultiRegionSimpleFoam without changes in order to find out if the wmake command works. I changed the code in the Make/files and than I tried to carry out the wmake command in the terminal. First I thought it works but then I get an error.

cannot open output file /opt/openfoam170/applications/bin/linuxGccDPOpt/mychtMultiRegionSimpleFoam Permission denied

I tried to copy the folder bin like the others (solvers, utilities) with:
cp -r $FOAM_BIN $WM_PROJECT_USER_DIR/bin

but this doesn't works. I got a error:
cp: missing destination file operand
"cp --help" gives more information

I tried cp --help but i have not really an idea. So I used the command
sudo chown -R $USERNAME:$USERNAME /opt/openfoam170

After this I could achiev the command wmake. But now I have another Problem. I tried to run the tutorial chtMultiRegionSimpleFoam with my new solver mychtMultiRegionSimpleFoam (which up to now only has another name). I changed in the Allrun file the first line #!/bin/sh to #!/bin/bash and changed on line 37 the name to mychtMultiRegionSimpleFoam.
Then I started the tutorial with ./Allrun - I got no error, and the folders bottomAir, heater and so on in the folder 0 were created but nothing else (with the original solver there were log.files created and files for the writeIntervals). When i delete in the Allrun skript at line 37 "runApplication" and then achiev ./Allrun the solver works - I could see the result in paraView but in OF there are no folders with the Information of Temperature for the Iterations. I have no idea what happens. Maybe you also now something about how to solve this problem. Thanks for your help!

Best Regards, Claudia
claudia.h is offline   Reply With Quote

Old   July 22, 2010, 07:20
Default
  #18
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Claudia,

Quote:
Originally Posted by claudia.h View Post
I tried to copy the folder bin like the others (solvers, utilities) with:
cp -r $FOAM_BIN $WM_PROJECT_USER_DIR/bin
Uhm... the command you are looking for is this:
Code:
cp -r $FOAM_APPBIN $WM_PROJECT_USER_DIR/bin
The variable "$FOAM_BIN" doesn't exist, and thus the cp command only saw this:
Code:
cp -r $WM_PROJECT_USER_DIR/bin
Which leads to nowhere...

As for your other problem, I've got a feeling you skipped a crucial step that I already wrote about in the previous post:
Quote:
As for building your own solvers/utilities, you will have to edit the file Make/files in the respective solver folder. Example, change the last line that has:
Code:
EXE = $(FOAM_APPBIN)/chtMultiRegionFoam
To:
Code:
EXE = $(FOAM_USER_APPBIN)/chtMultiRegionFoam2
Let me remind you that in Linux/OpenFOAM, one wrong letter, letter case, digit, space or symbol, and you will get a GIGO situation: Garbage In - Garbage Out
So be veeeery careful with the changes you do to the code, otherwise what looks OK is in fact wrong

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 6, 2010, 09:15
Default
  #19
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 17
maysmech is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi maysam,

OK, apparently you seriously followed the wrong tutorial

Any particular reason for building your own OpenFOAM 1.7.0, instead of using the pre-built one for Ubuntu? See here: http://www.openfoam.com/download/ubuntu.php


If you really must build OpenFOAM for yourself, then you still need to install (at least) the following packages (in bold) in Ubuntu (this is the command line):
Code:
sudo apt-get install flex build-essential g++ python-dev libqt4-dev  libreadline5-dev zlib1g zlib1g-dev texinfo byacc bison
Then you can run Allwmake again!

Best regards,
Bruno
after i want update above comments this error is displayed:
Code:
user@user-laptop:~/OpenFOAM$ sudo apt-get install libreadline5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package libreadline5-dev
what is the reason?
maysmech is offline   Reply With Quote

Old   October 6, 2010, 09:19
Default
  #20
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Maysam,

Quote:
Originally Posted by maysmech View Post
after i want update above comments this error is displayed:
Code:
user@user-laptop:~/OpenFOAM$ sudo apt-get install libreadline5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package libreadline5-dev
what is the reason?
Which Ubuntu version are you using?

Best regards,
Bruno
__________________
wyldckat 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
[GAMBIT] Gambit Installation Serious Problem,,,,, devesh.baghel ANSYS Meshing & Geometry 2 February 22, 2010 08:29
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
Problem with Fortran installation. skarp CFX 0 August 4, 2007 08:09
installation problem Dr C.Bhasker Siemens 1 September 13, 2006 08:01
CFX 4.4 installation problem Pandu Sattvika CFX 1 December 1, 2001 05:07


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