CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Installation

Installation Procedure of OF220 on Ubuntu 10.04LTS

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

Like Tree8Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   March 8, 2013, 16:52
Default Installation Procedure of OF220 on Ubuntu 10.04LTS
  #1
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Dear all,

I have just been able to successfully compile OF220 on Ubuntu 10.04 LTS. My steps are given below. It should be noted that I previously have compiled other versions of OF on this machine, so I might have missed the need of certain dependencies.

Furthermore, I have not compiled neither QT nor Paraview.

0. Download the source code from
Code:
http://www.openfoam.org/download/source.php
and unpack the two tarred files in ~/OpenFOAM by

Code:
tar -xzf OpenFOAM-2.2.0.tgz
tar -xzf ThirdParty-2.2.0.tgz
1. Go to the file

Code:
~/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
and change the line 62 to the following

Code:
foamCompiler=ThirdParty
Then go to the file

Code:
~/OpenFOAM/OpenFOAM-2.2.0/etc/config/settings.sh
and change the line 244 to

Code:
gcc_version=gcc-4.6.2
2. Go to the ThirdParty-2.2.0 directory and obtain the needed third party source using:

Code:
svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch gcc-4.6.2
and download additional source code by putting the following lines directly into the browser-field (also see ThirdParty-2.2.0/README.org):

Code:
ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.4.tar.bz2
ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.0.tar.bz2
http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz
http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.3.tar.bz2
https://gforge.inria.fr/frs/download.php/31831/scotch_6.0.0.tar.gz
and extract these files one at the time using the following lines in the command line:

Code:
tar jxf openmpi-1.6.3.tar.bz2
tar jxf mpfr-3.1.0.tar.bz2
tar jxf gmp-5.0.4.tar.bz2
tar -xzf mpc-0.9.tar.gz
tar -xzf scotch_6.0.0.tar.gz
3. Source the bashrc file in the OpenFOAM distribution by

Code:
. ~/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
and execute in the command line, which compiles the local gcc-version

[CODE]
(cd ~/OpenFOAM/ThirdParty-2.2.0/; ./makeGcc)
[CODE]

4. After successfull compilation of gcc, then execute the following commands. I opened a new terminal:

Code:
cd ~/OpenFOAM/OpenFOAM-2.2.0
. etc/bashrc
export WM_NCOMPPROCS=8 # Here the number 8 is my number of processor
./Allwmake
5. After this step you should have been able to compile OF220 successfully. To make sure, try to execute

Code:
./Allwmake
again. This should give rise to a lot of "... is up to date".

Good luck,

Niels
kwardle, wyldckat, thg and 4 others like this.
ngj is offline   Reply With Quote

Old   March 20, 2013, 12:55
Default
  #2
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi Niels,

thanks a lot for your instruction. It also worked for me.

I just had to change one more thing because in my system GCC/UPC multilib feature is enabled:

In the makeGcc file I had to add that option after line 280

Quote:
--disable-multilib \
Besides from that I would like to know how you post-process you cases with the new OF version since you did not compile Paraview.

Did you link OF2.2 to a previous paraview installation of an older openfoam version? If yes how can i manage to do that?

Kind regards

Chrisi
Chrisi1984 is offline   Reply With Quote

Old   March 20, 2013, 13:00
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Chrisi,

Good to hear that you could use the guide.

With respect to paraFoam, then I am not using OF220 for simulations, but merely to check for cross-version compatibility of some code, which I have released. Besides that I never use paraFoam, but rather paraView directly. At one of my computers I have downloaded ParaView3.98, and it works perfectly.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   March 21, 2013, 09:49
Default
  #4
New Member
 
Eric Loo
Join Date: Mar 2009
Posts: 1
Rep Power: 0
apsus is on a distinguished road
Just in time for my project. Thanks for the easy-to-follow guide! Saved me a huge amount of time.
apsus is offline   Reply With Quote

Old   March 21, 2013, 16:15
Default
  #5
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi,

I just realized that my installation dos not work for parallel calculations.

Does somebody of you experienced the same?

Can the small change in the makeGcc file be responsible for that?

Where exactly I should store those files:

and where I have to type those commands:

Quote:
tar jxf openmpi-1.6.3.tar.bz2
tar jxf mpfr-3.1.0.tar.bz2
tar jxf gmp-5.0.4.tar.bz2
tar -xzf mpc-0.9.tar.gz
tar -xzf scotch_6.0.0.tar.gz
Perhabs I made a mistake with that.

Thanks in advance!

Kind regards

Chrisi
Chrisi1984 is offline   Reply With Quote

Old   March 22, 2013, 15:10
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Chrisi,

All the operations, which you are referring to are executed in the ThirdParty-2.2.0 directory.

With respect to parallel computing, I am sorry that I cannot help you, since I have tested the damBreak successfully in parallel. All I can ask is: Does the src/Pstream libraries compile successfully?

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   March 23, 2013, 06:03
Default
  #7
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi,

thanks for your hint. I recompiled everything after I executed the reffered things in the ThirdParty-2.2.0 directory.

Afterwards besides from decomposePar every command for parallel calculations worked.

Then I recompiled "decomposePar" in the application/utilities folder.

Now everything is running properly also in parallel!

Kind regards

Chrisi
Chrisi1984 is offline   Reply With Quote

Old   March 23, 2013, 06:32
Default
  #8
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,553
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Good

/ Niels
ngj is offline   Reply With Quote

Old   June 19, 2013, 20:18
Default
  #9
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi Niels,

I followed the same instruction. but when I did the
. ~/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc, I got this error


Warning in /home/bluesim/OpenFOAM/OpenFOAM-2.2.0/etc/config/settings.sh:
Cannot find /home/bluesim/OpenFOAM/ThirdParty-2.2.0/platforms/linux64/gcc-4.6.2 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'foamCompiler' setting to 'system'


How can i correct it?
DineshramBalaji is offline   Reply With Quote

Old   June 20, 2013, 17:09
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

@Dinesh: Which Linux distribution are you using? I ask this because it'll make it easier to assist you, in case you need additional packages for building Gcc 4.6.2.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 20, 2013, 18:11
Default
  #11
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi Bruno,

I am using Ubuntu 10.04.4. Thanks for the help.
DineshramBalaji is offline   Reply With Quote

Old   June 23, 2013, 17:15
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Dinesh,

Only today did I manage to look into this. Please try following these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_10.04 - section Ubuntu 10.04

They were tested with Gcc 4.5.2, which is the version defined in OpenFOAM's settings, but you can attempt to adjust to the Gcc 4.6.2, while also keeping in mind to use "Gcc46" instead of "Gcc45", whenever it appears.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 24, 2013, 16:28
Default
  #13
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi Bruno,

Thanks for the link. I tried the procedure. But I can't proceed more than step 5. When i start with the make gcc command, it doesn't proceed after that
DineshramBalaji is offline   Reply With Quote

Old   June 24, 2013, 17:27
Default
  #14
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Dinesh,

OK, then let's try to figure out what happened:
  1. Which architecture of Ubuntu are you using? To know, run:
    Code:
    uname -m
  2. Are you following the exact steps given on the wiki page?
  3. Did you start with a fresh copy of OpenFOAM 2.2.0 or at least undo some of the steps you had done with the previous instructions?
  4. Did you edit the file "~/.bashrc" and remove the old instruction for sourcing the environment? Namely a line similar to this one:
    Code:
    source $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
  5. Are you trying to build with Gcc 4.6.2 or Gcc 4.5.2?
  6. Which exact command gave you an error and what error was it?
    • For example, the following command:
      Code:
      ./makeGcc gcc-4.5.2 gmp-5.0.1 mpfr-2.4.2 mpc-0.8.1 > mkgcc.log 2>&1
      Should take a long while to run. No matter if it takes very long or very little time, the error messages will be logged inside the file "mkgcc.log".
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 24, 2013, 17:58
Default
  #15
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi,

1. The ubuntu architecture is x86_64

2. Yeah, I am following the exact procedure, step by step

3. No since this page contains procedure to download fresh OF 2.2 package, i am doing it in separate folder.

4. when i tried to source the bashrc, there was an error display, as first mentioned by me in this thread

5. I am trying to install gcc 4.6.2

6. the following command gave me the error
./makeGcc gcc-4.5.2 gmp-5.0.1 mpfr-2.4.2 mpc-0.8.1> mkgcc.log 2>&1

The error was

bash: export: `gmp-5.0.1': not a valid identifier
bash: export: `mpfr-2.4.2': not a valid identifier
bash: export: `mpc-0.8.1': not a valid identifier


is this error serious?
DineshramBalaji is offline   Reply With Quote

Old   June 24, 2013, 18:14
Default
  #16
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Dinesh,

OK, I gave this a quick try, but I did not try to build Gcc. Nonetheless, the following steps are what I did differently from the wiki page:
  1. Switched Gcc 4.6.1 to 4.6.2, as indicated by Niels, but I used the following command to do it:
    Code:
    sed -i -e 's=4.6.1=4.6.2=' $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/config/settings.sh
    This should be done between step #2 and #3.
  2. Used "WM_COMPILER=Gcc46" in step #3.
  3. On step #5, I did the following:
    Code:
    sed -i -e 's=\(--with-system-zlib \)=\1--disable-multilib =' makeGcc46
    
    ./getGcc gcc-4.6.2 mpfr-3.1.0 gmp-5.0.4 mpc-0.9
    ./makeGcc46 gcc-4.6.2 mpfr-3.1.0 gmp-5.0.4 mpc-0.9 > mkgcc.log 2>&1
    wmSET $FOAM_SETTINGS
    Note: If you have already downloaded the files and unpacked them in the ThirdParty-2.2.0 folder, then the "getGcc" line shouldn't be needed.
  4. Then it's just a matter of moving onwards to step #6, assuming the same error is not given after you do the last "wmSET" command line.
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 25, 2013, 16:07
Default
  #17
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi Bruno,

In addition to this error message,

Warning in /home/bluesim/OpenFOAM/OpenFOAM-2.2.0/etc/config/settings.sh:
Cannot find /home/bluesim/OpenFOAM/ThirdParty-2.2.0/platforms/linux64/gcc-4.6.2 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'foamCompiler' setting to 'system'


which the tutorial itself says we would get, I am also getting the following error

Cannot open configuration file /home/bluesim/OpenFOAM/ThirdParty-2.2.0/platforms/linux64Gcc/openmpi-1.6.3/share/openmpi/mpicc-wrapper-data.txt
Error parsing data file mpicc: Not found


is this error important or can be neglected along with the previous one?
DineshramBalaji is offline   Reply With Quote

Old   June 25, 2013, 18:04
Default
  #18
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Dinesh,

That is indeed a very strange error message. I feels like that there is a conflict of options when Open-MPI was chosen as the MPI toolbox for OpenFOAM.
The only thing that comes to mind is that you might have 2 or more lines in the file "~/.bashrc" that conflict with each other. Perhaps something like having both of the following lines:
Code:
source $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
source $HOME/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI foamCompiler=ThirdParty WM_COMPILER=Gcc46
So, I would suggest the following steps:
  1. Check the file "~/.bashrc" to see if there is only one reference to OpenFOAM 2.2.0.
  2. Start a new terminal, to make sure that there isn't any conflict of old and new variables.
  3. And if the same error does exist, continue with the instructions, in hope that the problem will solve itself.
Either way, this last message you've gotten should not affect the build process of Gcc 4.6.2.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 26, 2013, 20:22
Default
  #19
Member
 
Dinesh Balaji
Join Date: Oct 2012
Posts: 42
Rep Power: 4
DineshramBalaji is on a distinguished road
Hi Bruno,

Thanks for the help. Just proceeded ignoring the error. Everything seems to work fine including the paraview.
But the mpicc error seems to persist. For eg. when i give
wmSET $FOAM_SETTINGS
I get the following error
Cannot open configuration file /home/bluesim/OpenFOAM/ThirdParty-2.2.0/platforms/linux64Gcc/openmpi-1.6.3/share/openmpi/mpicc-wrapper-data.txt
Error parsing data file mpicc: Not found


Will this be affecting my simulation results?
DineshramBalaji is offline   Reply With Quote

Old   June 27, 2013, 04:30
Default
  #20
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Dinesh,

As I said before, this is a strange message you're getting. It should not affect your simulations, but it's possible that you might not be able to run in parallel.

What do the following commands give you?
Code:
echo $WM_MPLIB
echo $MPI_ARCH_PATH
which mpicc
which mpirun
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
Openfoam 2.1 installation in ubuntu 12.04 jsm OpenFOAM Installation 11 May 7, 2012 05:56
openFOAM installation in ubuntu 11.10 kirubhakaran OpenFOAM Installation 5 February 17, 2012 03:16
Installation of OpenFOAM-1.6 on Ubuntu 9.10 marval OpenFOAM Installation 2 March 17, 2010 10:33
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 02:03.