January 19, 2011, 19:07
|
|
#6
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Rep Power: 128
|
Hi Maurizio,
About the PPA version, did you run this command?
Code:
sudo apt-get install openfoam-dev-1.5-dev
Notice that there are two "-dev"! Then you have to start a new terminal and activate the respective environment.
As for the 1.5-dev version you have in "/opt":
- Well, "/opt" allegedly is only the default installation folder for when installing in shared computers or clusters, or when installing with a ".deb" or ".rpm" package. The pain with this kind of installation is that most people will build OpenFOAM with root permissions, so it can be automatically placed in the "/opt" folder, since it's the easiest way. It's also potentially the most dangerous way of doing this, since if something goes wrong in a path definition somewhere during the build process, you could damage the Linux installation.
- Secondly, as far as I can figure it out, the problem you are having is that the 1.5-dev version was installed in its already built version, without gcc 4.3.1 in the ThirdParty folder for 1.5-dev. In other words, you can use that OpenFOAM 1.5-dev installation, with the symbolic links fix, but you cannot build applications with gcc 4.4.3 to work with the one built with 4.3.1. At least, it's what I've been able do deduce from the information you provided.
So, how to fix this crazy ordeal? The simplest way I can think of is to rebuild 1.5-dev with your Ubuntu's gcc 4.4.3:
- First of all, DO NOT CHANGE TO ROOT user. Run this command for enabling your user direct access to the OpenFOAM folder in "/opt":
Code:
sudo o+w -R /opt/OpenFOAM
- Edit the file "/opt/OpenFOAM/OpenFOAM-1.5-dev/etc/settings.sh" and change where it says:
Code:
: ${compilerInstall:=OpenFOAM}
change it to:
Code:
: ${compilerInstall:=system}
It might not be exactly this line, but what matters is changing "OpenFOAM" to "system".
Save and close.
- Start a new terminal and activate the respective environment:
Code:
. /opt/OpenFOAM/OpenFOAM-1.5-dev/etc/bashrc
- Make sure you have allocated all of the processing power in your machine to be used for building OpenFOAM 1.5-dev:
Code:
export WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
Or simply, for example:
Code:
export WM_NCOMPPROCS=4
if your machine has 4 cores/threads.
- Clean up and fully build OpenFOAM 1.5-dev:
Code:
cd $WM_PROJECT_DIR
wcleanAll
./Allwmake > make.log 2>&1
And wait a while... it takes about 20-30min on an i7 920, up-to 6h on a single core 2GHz machine...
In the file "make.log" will be stored all of the messages for the whole build process.
- When it's done, run:
Code:
grep -e "Error " make.log | wc -l
Notice the space between the word Error and the quote symbol. This command should give you the count of the number of errors that might have occurred during the build process:- If 0 is the resulting value, then all is well.
- If a non zero value is returned, then something went very wrong Run:
Code:
tar -czf make.log.tar.gz make.log
and attach the file on your next post.
- Finally, if all went well, reverse the first step:
Code:
sudo o-w -R /opt/OpenFOAM
And hopefully, you should be able to build any and all applications and libraries for OpenFOAM 1.5-dev. And remember that you should copy the desired tutorial case or the whole tutorials folder to your user folder, so you can keep the version in "/opt" untouched!
As for making the ParaView version from OpenFOAM 1.7 work with 1.5-dev... I'll try to explain that tomorrow I'm too tired today...
Best regards and good luck!
Bruno
|
|
|