CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Incomplete installation of OpenFOAM 2.1.1 on ubuntu 12.10 (http://www.cfd-online.com/Forums/openfoam-installation/113806-incomplete-installation-openfoam-2-1-1-ubuntu-12-10-a.html)

zania February 27, 2013 03:20

Incomplete installation of OpenFOAM 2.1.1 on ubuntu 12.10
 
Hello
To install I followed the instructions 2.4 Ubuntu 12.10
http://openfoamwiki.net/index.php/In...u#Ubuntu_12.10
by following the detailed step-by-step instructions below...
Steps:
  1. Switch to root mode (administrator) and install the necessary packages (run one line at a time):
… all the way down
I got a file OpenFOAM and within that
file OpenFOAM-2.1.1 (not the file ThirdParty-2.1.1) and
OpenFOAM-2.1.1.tgz
ThirdParty-2.1.1.tgz
icoFoam –help Does not give anything
gedit ~/.bashrc doesn’t contain line OpenFOAM
Question:Do I have to uninstall and start from the beginning?
Thanks

wyldckat February 27, 2013 04:52

Greetings zania and welcome to the forum!

Inside the folder "$HOME/OpenFOAM/OpenFOAM-2.1.1", do you have a file named "make.log"? If you do, follow the instructions that were given on the instructions, namely:
Code:

#Create a tarball in case you've seen any errors (it's the first error that matters)
#or if you don't understand the output
#and attach the file "make.log.tar.gz" to a post in the designated thread

tar -czf make.log.tar.gz make.log

edit: A follow-up question: what did you exactly do in step #3?

Best regards,
Bruno

zania February 27, 2013 05:21

More information on Incomplete installation of OpenFOAM 2.1.1
 
Hello Bruno
Thanks for your welcome and the quick response!
Inside the folder “OpenFOAM/OpenFOAM-2.1.1”, I do not have a file named "make.log"?

To your follow-up question: what did you exactly do in step #3? I copied
For i386:
#here you can change 4 to the number of cores you've gotsource $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32 echo "source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc $FOAM_SETTINGS" >> $HOME/.bashrc
All the Best

wyldckat February 27, 2013 09:54

Hi zania,

OK, then check the following details:
  1. What does this output:
    Code:

    echo $HOME
    ls -l $HOME

    It should tell you where your home folder is and also list the contents of your home folder.
  2. What does this output:
    Code:

    ls -l $HOME/OpenFOAM
    It should show you the contents of the OpenFOAM folder, which should be 2 "*.tgz" files and 2 folders for "OpenFOAM-2.1.1" and "ThirdParty-2.1.1".
  3. And what does this output:
    Code:

    ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
    It should show you a file list similar to this one: https://github.com/OpenFOAM/OpenFOAM-2.1.x
If either one of these do not correspond to the description I made, then let us know!

Best regards,
Bruno

zania February 27, 2013 13:32

Trying your instructions
 
Hello Bruno Thank you for your patience!
Trying your instructions:
  1. What does this output:
Code:
echo $HOMEls -l $HOME
It should tell you where your home folder is and also list the contents of your home folder.
eva@eva-Inspiron-1525:~$ echo $HOME
/home/eva
eva@eva-Inspiron-1525:~$ ls -l $HOME
σύνολο 56
drwxr-xr-x 3 root root 4096 Φεβ 20 20:10 OpenFOAM
-rw-r--r-- 1 eva eva 8445 Φεβ 9 22:41 examples.desktop
drwxrwxr-x 2 eva eva 4096 Φεβ 26 20:33 Ubuntu One
drwxrwxr-x 2 eva eva 4096 Φεβ 26 20:51 user
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Βίντεο
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Δημόσια
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Έγγραφα
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Εικόνες
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Επιφάνεια εργασίας
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Λήψεις
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Μουσική
drwxr-xr-x 2 eva eva 4096 Φεβ 9 22:49 Πρότυπα

  1. What does this output:
Code:
ls -l $HOME/OpenFOAM
It should show you the contents of the OpenFOAM folder, which should be 2 "*.tgz" files and 2 folders for "OpenFOAM-2.1.1" and "ThirdParty-2.1.1".
ls: αδυναμία πρόσβασης του (Its in Greek: inability to access) /home/eva/OpenFOAM: Δεν υπάρχει τέτοιο αρχείο ή κατάλογος (there is not such file)
And what does this output:
Code:
ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
eva@eva-Inspiron-1525:~$ ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
ls: αδυναμία πρόσβασης του /home/eva/OpenFOAM/OpenFOAM-2.1.1: Δεν υπάρχει τέτοιο αρχείο ή κατάλογος
eva@eva-Inspiron-1525:~$
It should show you a file list similar to this one: https://github.com/OpenFOAM/OpenFOAM-2.1.x

After the installation a file OpenFOAM was created @ user eva that contains
eva@eva-Inspiron-1525:~$ cd OpenFOAM
eva@eva-Inspiron-1525:~/OpenFOAM$ ls
OpenFOAM-2.1.1 OpenFOAM-2.1.1.tgz ThirdParty-2.1.1.tgz
:mad:not the file ThirdParty-2.1.1
eva@eva-Inspiron-1525:~/OpenFOAM$ cd OpenFOAM-2.1.1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ ls
Allwmake bin doc README.html src wmake
applications COPYING etc README.org tutorials
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$
Best regards

wyldckat February 27, 2013 13:53

Hi zania,

Looks like you forgot to run the exit command at the end of the step #1. This lead to having the "OpenFOAM" folder set to root permissions:
Quote:

Code:

drwxr-xr-x 3 root root 4096 Φεβ  20 20:10 OpenFOAM

You can restore permissions to this folder by running:
Code:

sudo chown -R eva:eva /home/eva/OpenFOAM
To play it safe, I suggest that you start a new terminal window and fix the missing part of step #2:
Code:

cd ~
cd OpenFOAM
tar xzf ThirdParty-2.1.1.tgz

If after this the folder "ThirdParty-2.1.1" doesn't exist, then the file "ThirdParty-2.1.1.tgz" might be broken...


Afterwards, continue from step #3. And keep in mind that you only need root permissions for the very first step! After that, you do not need root permissions!

Best regards,
Bruno

zania February 27, 2013 16:00

Hi Bruno,
I am sorry to come back.
"ThirdParty-2.1.1" now exists.
But continuing from step #3 I got:
eva@eva-Inspiron-1525:~$ uname -m
i686
eva@eva-Inspiron-1525:~$ source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32
Το πρόγραμμα The programe 'mpicc' can be bound μπορεί να βρεθεί στα παρακάτω πακέτα in the:
* lam4-dev
* libmpich-mpd1.0-dev
* libmpich-shmem1.0-dev
* libmpich1.0-dev
* libmpich2-dev
* libopenmpi-dev
* libopenmpi1.6-dev
Try Δοκιμάστε: sudo apt-get install <sellected package επιλεγμένο πακέτο>
Το πρόγραμμα 'mpicc' μπορεί να βρεθεί στα παρακάτω πακέτα:
* lam4-dev
* libmpich-mpd1.0-dev
* libmpich-shmem1.0-dev
* libmpich1.0-dev
* libmpich2-dev
* libopenmpi-dev
* libopenmpi1.6-dev
Try Δοκιμάστε: sudo apt-get install <επιλεγμένο πακέτο>
eva@eva-Inspiron-1525:~$
eva@eva-Inspiron-1525:~$ echo "source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc $FOAM_SETTINGS" >> $HOME/.bashrc


What did I do wrong?


Thank you

wyldckat February 27, 2013 18:06

Hi zania,

I think I now understand what happened. The instructions on step #1 have (had) the following code at the very beginning:
Code:

sudo -s
#or
su -

The idea was to execute only one of these two commands, not both. I'll take care of making these instructions clearer...


Anyway, try running the following, one line at a time:
Code:

sudo -s
 
apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin
 
exit

Then start a new terminal. There shouldn't be any error messages. Then:
  1. Go into OpenFOAM's main folder:
    Code:

    cd ~/OpenFOAM
  2. Follow the instructions starting from step #4.

Best regards,
Bruno

zania February 28, 2013 07:48

I know I take too much of your time.
 
Hi Bruno,
I know I take too much of your time. Could you please check if its ok to carry to step 4.
eva@eva-Inspiron-1525:~$ sudo -s
[sudo] password for eva:
root@eva-Inspiron-1525:~# apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-
Ανάγνωση Λιστών Πακέτων... Ολοκληρώθηκε reading completed
Κατασκευή Δένδρου Εξαρτήσεων constructing dependence tree
Ανάγνωση περιγραφής της τρέχουσας κατάσταση... Ολοκληρώθηκε reading current state
(Σημείωση, επιλέχθηκε το libncurses5-dev αντί του libncurses-dev)
Notice it was chosen libncurses5-dev instead of libncurses-dev
(E: It was not located Αδυναμία εντοπισμού του πακέτου openmpi)
E: It was not located openmpi

root@eva-Inspiron-1525:~#

root@eva-Inspiron-1525:~# exit
exit
eva@eva-Inspiron-1525:~$

wyldckat February 28, 2013 09:22

Hi zania,

You forgot to add "bin" to the end of the apt-get line. Try this:
Code:

sudo apt-get install openmpi-bin
Best regards,
Bruno

zania March 1, 2013 06:05

Can I redo step #4?
 
Ηello Bruno
eva@eva-Inspiron-1525:~$ cd ~/OpenFOAM
eva@eva-Inspiron-1525:~/OpenFOAM$ cd OpenFOAM-2.1.1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ ./Allwmake > make.log 2>&1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ ./Allwmake > make.log 2>&1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ icoFoam -help
icoFoam: η εντολή δε βρέθηκε
gedit make.log
./Allwmake: 4: ./Allwmake: wmakeCheckPwd: not found
Error: Current directory is not $WM_PROJECT_DIR
The environment variables are inconsistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.

Can I open a new terminal and
Code:
cd ~/OpenFOAM
and
Follow the instructions starting from step #4.

I know your instructions are right. I just don’t follow them correctly.
All the best

wyldckat March 2, 2013 06:09

Hi zania,

Run:
Code:

source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32
And try step #4 once again.

Best regards,
Bruno

zania March 4, 2013 17:00

What should I choose in <selected package>
 
Hello Bruno I think I need more help

I got :
eva@eva-Inspiron-1525:~$ source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32
The program 'mpicc' can be found in the following:
* lam4-dev
* libmpich-mpd1.0-dev
* libmpich-shmem1.0-dev
* libmpich1.0-dev
* libmpich2-dev
* libopenmpi-dev
* libopenmpi1.6-dev
Try: sudo apt-get install <selected package>
The program 'mpicc' can be found in the following:
* lam4-dev
* libmpich-mpd1.0-dev
* libmpich-shmem1.0-dev
* libmpich1.0-dev
* libmpich2-dev
* libopenmpi-dev
* libopenmpi1.6-dev
Try: sudo apt-get install < selected package >
eva@eva-Inspiron-1525:~$


All the best

wyldckat March 4, 2013 18:13

Hi zania,

OK, start a new terminal.

Then run:
Code:

sudo apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev
And then run:
Code:

sudo apt-get install gnuplot libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin
Then try again:
Code:

source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32
Best regards,
Bruno

zania March 5, 2013 09:07

Do I have to exit terminal?
 
Hi Bruno

Q1) Do I have to exit terminal after the above two sudo … steps ?
Q2)After running code source … (of the above)
do I go to step #5 of the original instructions?
Thanks
All the best

wyldckat March 5, 2013 17:16

Hi zania,

Quote:

Originally Posted by zania (Post 411652)
Q1) Do I have to exit terminal after the above two sudo … steps ?

Sorry, I forgot to emphasize that when using sudo in-line with the command, it does not require you to exit from root mode, because sudo will only go into root more for that one line.

Quote:

Originally Posted by zania (Post 411652)
Q2)After running code source … (of the above)
do I go to step #5 of the original instructions?

I was hoping you would tell me first if the same error still occurred or not.
If there aren't any more error messages, then you must go to step #4. It's only after step #4 that you can to #5 ;).

Best regards,
Bruno

zania March 7, 2013 07:39

Can I add the echo … line now?
 
Hello Bruno
I know I give you a hard time!
I did the steps
Code:
sudo apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev
And then run:
Code:
sudo apt-get install gnuplot libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin
Then try again:
Code:
source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32

eva@eva-Inspiron-1525:~$ source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI WM_ARCH_OPTION=32


with no error

I did notecho "source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc $FOAM_SETTINGS" >> $HOME/.bashrc
and then step #4

eva@eva-Inspiron-1525:~$ cd OpenFOAM-2.1.1
bash: cd: OpenFOAM-2.1.1: There is not such file

so I tried

eva@eva-Inspiron-1525:~$ ls
examples.desktop Ubuntu One Δημόσια Επιφάνεια εργασίας Πρότυπα
FOAM_RUN user Έγγραφα Λήψεις
OpenFOAM Βίντεο Εικόνες Μουσική
eva@eva-Inspiron-1525:~$ cd OpenFOAM
eva@eva-Inspiron-1525:~/OpenFOAM$ cd OpenFOAM-2.1.1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ ./Allwmake > make.log 2>&1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$

eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ ./Allwmake > make.log 2>&1
eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$ icoFoam -help

Usage: icoFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-2.1.1 (see www.OpenFOAM.org)
Build: 2.1.1-221db2718bbb

eva@eva-Inspiron-1525:~/OpenFOAM/OpenFOAM-2.1.1$

The make log
make: Nothing to be done for `all'.

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

======================================== etc
From within the case (cavity) directory
I typed blockMesh and got the message
Command missing or something like that
I do not have the line OpenFOAM … in the .bashrc file. Is it because of the missed echo … line? Can I type it now?

Thanks

wyldckat March 7, 2013 09:23

You can do step #3 without any concerns. Feel free to edit the file "$HOME/.bashrc", to check what is already inside it.

As for not being able to run blockMesh, do as instructed in step #5:
Code:

#Create a tarball in case you've seen any errors (it's the first error that matters)
#or if you don't understand the output
#and attach the file "make.log.tar.gz" to a post in the designated thread
tar -czf make.log.tar.gz make.log


zania March 8, 2013 06:07

The mistakes I made
 
Hello Bruno
I got OpenFOAM installed finally (with much help)!
Thank you very much.

I had no experience at all in Ubuntu. The first mistake I made was at the beginning when I gave the code sudo, typing the user password, I was expecting ****** or something like that to appear. Since nothing happened I tried su.

All the Best

manuelffonseca November 15, 2014 17:56

Ubuntu 12.04
 
Quote:

Originally Posted by zania (Post 410345)
Hello
To install I followed the instructions 2.4 Ubuntu 12.10
http://openfoamwiki.net/index.php/In...u#Ubuntu_12.10
by following the detailed step-by-step instructions below...
Steps:
  1. Switch to root mode (administrator) and install the necessary packages (run one line at a time):
… all the way down
I got a file OpenFOAM and within that
file OpenFOAM-2.1.1 (not the file ThirdParty-2.1.1) and
OpenFOAM-2.1.1.tgz
ThirdParty-2.1.1.tgz
icoFoam –help Does not give anything
gedit ~/.bashrc doesn’t contain line OpenFOAM
Question:Do I have to uninstall and start from the beginning?
Thanks

Hi Zania i followed the instruccion in openfoam wiki to install openfoam 2.2.1 but i dont have connection in the pc that i have ubuntu, how i can to get the procedure, or how i have to do with that
apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev \ libncurses-dev libxt-dev libopenmpi-dev openmpi-bin

i cant install openfoam

best regards Zania


All times are GMT -4. The time now is 01:04.