CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Openfoam 2.1 installation in ubuntu 12.04 (http://www.cfd-online.com/Forums/openfoam-installation/101289-openfoam-2-1-installation-ubuntu-12-04-a.html)

jsm April 30, 2012 08:29

Openfoam 2.1 installation in ubuntu 12.04
 
Dear All,

I am Fluent user till now. I am more interested in learning openfoam. First I tried in virtual box - ubuntu 11.04 & openfoam 2.1.

It looks more interesting. So I installed ubuntu 12.04 64 bit in my desktop with dual booting. Now I want to install openfoam 2.1.

Here I have question. Is it OK to install openfoam in ubuntu 12.04. Or shall I need to wait for some more time. Openfoam offcial website didn't tell anything about ubuntu 12.04 installation.

Also I want to compile the source pack instead of debian pack. Could anyone tell me about the procedure and in future how to update openfoam for bug fixes. I already read the source pack compiling procedure in website. But I want to know your experience and issues in this.

Thanks in advance

GerhardHolzinger April 30, 2012 09:14

I don't know about the differences of source pack and repository release. I've installed OF as described at the repository release page http://www.openfoam.org/download/git.php

This worked quite well. Updating is quite easy (when using the git-repository)

Just change to your installation directory (/home/user/OpenFOAM/OpenFoam-2.1-x)
and type

git pull

this downloads only the files, that changed since your last update or when you installed OF. After that, just compile the sources again with

./Allwmake

jsm April 30, 2012 09:50

Hi Gerhard

Are you installed in Ubuntu 12.04 64 bit version? I want to install source pack -http://www.openfoam.org/download/source.php.

If I install source pack installation, then can I use "git pull" to get the latest bug fixes? Question might be silly. But I don't know about this.

GerhardHolzinger April 30, 2012 10:29

Hi,

I currently use ubuntu 10.04 LTS 64 bit. As I said, I don't know exactly the difference between source pack and repository release. So I hope an experienced user will answer this question.

The OpenFOAM homepage states on this site http://www.openfoam.org/download/ that the repository is updated regularly.

Quote:

Those users compiling from source can receive regular updates to OpenFOAM by downloading the Git repository distribution of OpenFOAM. Known as 2.1.x, this version is managed and updated daily by the OpenFOAM Foundation and can be conveniently “pulled” using the Git distributed revision control system.
It seems as if the source pack is updated less frequently than the repsitory.

Quote:

Source Pack

Version 2.1.0, released 19/12/11
versus

Quote:

Git Repository

Version 2.1.x, updated regularly


wyldckat April 30, 2012 10:57

Greetings to both!

I didn't mention anything here before because Gerhard hasn't be wrong, at least as far as I can tell.
So as an experienced user I can say that: yes, Gerhard is correct and 2.1.x is the version of OpenFOAM that has frequent updates, but there are two important details to keep in mind:
  • As already stated, doing "git pull" is not enough to get the updates. It should be at least:
    Code:

    git pull
    ./Allwmake

  • The git version is usually advised only to more experienced users, namely those who have already built the "source" package a couple of times and feel more comfortable with building OpenFOAM.

    The reason is simple: the latest git version doesn't always build and work as intended. Updates are sometimes done in a fashion that can lead to you having a working solver in one day and not working after the update. Technically, it will be because the solver wasn't properly working before... but also because sometimes there are quick updates that aren't fully tested.
One last tip - run the following command before Allwmake:
Code:

export WM_NCOMPPROCS=4
Where 4 is the number of cores (parallel processes) to be used during the build process, so it will build faster.

Best regards,
Bruno

jsm April 30, 2012 13:55

Hi Bruno,

Thanks for your information. Now I understood the difference between source pack and repository pack. I will install openfoam 2.1 from source pack and compile it. I think it will be good starting point.

From your reply, I concluded that Openfoam 2.1 can be installed in Ubuntu 12.04 64 bit without any issues.

I will try and let you know the details.

jsm April 30, 2012 13:58

Hi Gerhard Holzinger,

Thanks for your comments and quick response:)

GerhardHolzinger May 2, 2012 03:38

Quote:

Originally Posted by wyldckat (Post 358490)
One last tip - run the following command before Allwmake:
Code:

export WM_NCOMPPROCS=4
Where 4 is the number of cores (parallel processes) to be used during the build process, so it will build faster.

Best regards,
Bruno


This really boosted compilation.

wyldckat May 2, 2012 16:55

Hi Gerhard,

Quote:

Originally Posted by GerhardHolzinger (Post 358758)
This really boosted compilation.

In case you're wondering the impact of number of cores vs time it takes to build, here's an old blog post of mine: Build times for OpenFOAM 2.0.x code with Ubuntu 10.10 with its gcc 4.4.5

Best regards,
Bruno

Wesley May 6, 2012 15:19

Alternative: install oneiric instead of precise
 
Not everybody is comfortable building from the source code. It is not bad for OpenFoam, but it can be a bit daunting if it is the first time you are trying to compile.

It appears the version compiled for the previous version of Ubuntu (11.10, oneiric ocelot) will work on version 12.04 (precise pangolin)

If you followed the instruction on the instruction on the openfoam ubuntu page:
http://www.openfoam.org/download/ubuntu.php

The repository for openfoam was put into your list for your package manager.

If you are using synaptic (I assume the other package managers behave in a similar manner):
  • launch synaptic
  • click on "Settings" in the menu bar
  • click on "Repositories" in that menu
  • in the "Software Sources" window that pops up, click on the tab for "Other Software"
  • select/highlight the line that says "Independent"
  • click "Edit..."
  • Change the line for "Distribution" from "precise" to "oneiric"
That worked for me without the need to compile myself. I have tried the icoFoam tutorial, but other simulations yet.

I hope some people find this to be helpful.

Wes

wyldckat May 6, 2012 17:21

Hi Wesley,

Good instructions! But I'm not 100% certain if Synaptic is installed by default in 12.04. Therefore, the quickest thing to do would be this:
Code:

sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu oneiric main > /etc/apt/sources.list.d/openfoam.list"
This command line is for replacing the first two command lines from here: http://www.openfoam.org/download/ubuntu.php

Best regards,
Bruno

romant May 7, 2012 04:56

Quote:

Originally Posted by wyldckat (Post 359592)
Hi Wesley,

Good instructions! But I'm not 100% certain if Synaptic is installed by default in 12.04. Therefore, the quickest thing to do would be this:
Code:

sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu oneiric main > /etc/apt/sources.list.d/openfoam.list"
This command line is for replacing the first two command lines from here: http://www.openfoam.org/download/ubuntu.php

Best regards,
Bruno

You are right, it is not part of the official installation (the Ubuntu Software Center is the standard package manager GUI).


All times are GMT -4. The time now is 20:15.