Blast from the past: installing OpenFOAM 1.5 in modern Linux boxes
Here we are in 2011 and we need good oldie OpenFOAM 1.5 to work in our latest über advanced Linux box.
Our trusty gcc compiler nowadays comes in flavours 4.4.x, 4.5.x and 4.6.0 was released a little while ago.
The official release of OpenFOAM 1.5 latest compatible gcc was 4.3.x. And you think to yourself: now what do I do?
Well, not to worry! After a request from the forum user kurne, I rolled up my sleeves and made a cookbook script of a hybrid OpenFOAM 1.5 with 1.7.x script updates. The script is attached and currently is for 64bit machines only - why? Because nowadays 64bit is the standard
NOTE: v2 works for both 64bit and 32bit builds as well, although I haven't tested it yet... As for v3, check the "Further notes" section near the end of this post.
How to use it? Well, first I would advise you to install from source the latest OpenFOAM, which right now is 1.7.1 or 1.7.x. Why? Because then you would be certain that all of the necessary packages are already installed. You can also try simply installing the packages listed here: Building OpenFOAM1.7.0 from source post #4 and onward
OK, no, you can't use it yet! Now you've got to edit your ~/.bashrc file, also known as $HOME/.bashrc. Probably near the end of it you'll find something like this:
Well, now you're going to want 1.5 as well. Therefore, change any lines that look like the one above to something like this:
As you can plainly see, I'm assuming that OpenFOAM 1.5 will be installed in the base folder "$HOME/OpenFOAM".
Start a new terminal/console! Hopefully you don't need to logout and then log back in. Run:
If nothing happens and it outputs an error saying something like "not found", then you're ready to go on.
Now, download the file attached to this post. Unpack it:
And Now you can run it:
At the end, it should display this friendly message:
This message indicates that you're ready to go! Run:
To start the environment for OpenFOAM 1.5.
If you want to use any of your other OpenFOAM installations, simply run the respective alias:
If by any chance it stops running before or without that friendly message, then post it in the comments to this page. If your trying to use it in Ubuntu, then please do it here: OpenFOAM-1.5 on Ubuntu 10.04
Ah, I almost forgot: what about ParaView you ask?
Well, there's more than one way to do many things and installing ParaView is no exception:
Further notes:
Good luck!
Bruno
Our trusty gcc compiler nowadays comes in flavours 4.4.x, 4.5.x and 4.6.0 was released a little while ago.
The official release of OpenFOAM 1.5 latest compatible gcc was 4.3.x. And you think to yourself: now what do I do?
Well, not to worry! After a request from the forum user kurne, I rolled up my sleeves and made a cookbook script of a hybrid OpenFOAM 1.5 with 1.7.x script updates. The script is attached and currently is for 64bit machines only - why? Because nowadays 64bit is the standard
NOTE: v2 works for both 64bit and 32bit builds as well, although I haven't tested it yet... As for v3, check the "Further notes" section near the end of this post.
How to use it? Well, first I would advise you to install from source the latest OpenFOAM, which right now is 1.7.1 or 1.7.x. Why? Because then you would be certain that all of the necessary packages are already installed. You can also try simply installing the packages listed here: Building OpenFOAM1.7.0 from source post #4 and onward
OK, no, you can't use it yet! Now you've got to edit your ~/.bashrc file, also known as $HOME/.bashrc. Probably near the end of it you'll find something like this:
Code:
. $HOME/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc
Code:
alias of171='. $HOME/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc' alias of15='. $HOME/OpenFOAM/OpenFOAM-1.5/etc/bashrc'
Start a new terminal/console! Hopefully you don't need to logout and then log back in. Run:
Code:
foam
Now, download the file attached to this post. Unpack it:
Code:
gunzip of15w17.sh.gz
Code:
./of15w17.sh
Code:
All done and ready to get work! Well, only if you run: source /home/username/OpenFOAM/OpenFOAM-1.5/etc/bashrc
Code:
of15
If you want to use any of your other OpenFOAM installations, simply run the respective alias:
Code:
of171
Ah, I almost forgot: what about ParaView you ask?
Well, there's more than one way to do many things and installing ParaView is no exception:
- On how to build ParaView 3.8.0 with a custom Qt 4.6: Building ParaView 3.8.0 with custom Qt 4.6.3
- On how to get and use the pre-built ParaView 3.8.0 from www.paraview.org to work with OpenFOAM: Using the official pre-built ParaView 3.8.0 version with OpenFOAM...
- Use the one that comes with the latest .deb/.rpm from www.openfoam.com.
Further notes:
- NOTE about v3: the attachment "of15w17_v3.sh.gz" was only tested yet with Ubuntu 11.10 x86_64.
It assumes you've already installed packages for Ubuntu mentioned here: http://www.openfoam.org/download/git.php
Also on Ubuntu, don't forget to also run:
Code:sudo apt-get install libglib2.0-dev binutils-dev
- Related to the previous bullet point:Quote:Now I remember, I saw this before while I was trying to build Gcc 4.3.3 on Ubuntu 11.10. Things changed so much that a new few hacks are necessary. One such hack is this for 64bit platforms:
Code:export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
The reason why this was added is because the library moved from the usual "/usr/lib" folder. To see where the required "libc.a" is located, run:
Code:dpkg-query -S libc.a
Good luck!
Bruno
Total Comments 1
Comments
-
Updated instructions
Instructions on how to build OpenFOAM 1.5 and 1.5.x for more recent Ubuntu versions can be found here:
Posted August 13, 2014 at 14:57 by wyldckat