CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Installation on Rocks 5.4 (

tonyuprm January 21, 2011 14:54

Installation on Rocks 5.4
1 Attachment(s)
Hi all,

I'm trying to install OpenFOAM 1.7.1 on a Rocks 5.4 Cluster. Im installing from source in the /opt directory. Im getting several errors. The first errors are related to MPI. Attached is the log file.

Attachment 6168

Thanks in advance!

wyldckat January 21, 2011 15:47

Greetings Tony,

OK, two things:
  1. What's the gcc version you are using in Rocks 5.4? According to, Rocks 5.4 installs by default gcc 4.1.2 and the minimum required by OpenFOAM 1.7 is gcc 4.3.?.
  2. It doesn't seem like you unpacked the ThirdParty package. This means that it won't build: OpenMPI, libscotch, libmetis. The first one is for MPI and the two others are for being able to divide the meshes with smart algorithms.
Did you read the whole instructions page: Source Pack Installation :confused:
In special, you should have noticed the sections:
  • Unpacking the Sources (where it also talks about the ThirdParty package)
  • Checking the System (where it talks about the gcc version ;))

I don't have experience with know Rocks, so I don't know if it provides more recent gcc versions or not, nor do I know which MPI toolbox it provides. Same goes for the libraries Metis and Scotch.

In case Rocks doesn't provide a more recent gcc, then try the latest build scripts in this blog page: Automated scripts for building gcc 4.4.x and 4.5.x for using with OpenFOAM 1.7 series
Oh, before I forget, either one of those builds scripts assume that you have the ThirdParty folder...

Best regards,

tonyuprm January 22, 2011 22:56

3 Attachment(s)
Thanks for your reply Bruno. The gcc package Rocks has by default is 4.1.2. The newer version for gcc is in a package called gcc44. This is installed and the version is 4.4.0. I did not have the Third-Party directory. I unpacked this directory as well and ran .Allwmake again. That didnt work. I tried changing the $WM_DIR/rules/linux64Gcc/c++ as you suggested for Fedora installation in another post which had helped me before. That didnt work either. The log file couldnt fit in one file so here it is split up.

Attachment 6175

Attachment 6176

Attachment 6177



wyldckat January 23, 2011 00:26

Hi Tony,

I ended up investigating a bit more about Rocks and found out that it's based on CentOS, who in turn is based on RedHat Enterprise Linux. And the thread that has the solution you need is related to the latter one: OpenFOAM install on RHEL 5.5 :D

edit: You should check which MPI library/toolbox your Rocks installation is using! If it uses OpenMPI by default, you can simply change from OPENMPI to SYSTEMOPENMPI in the file "OpenFOAM-1.7.1/etc/bashrc". If it uses something else, check that relevant area in that "OpenFOAM-1.7.1/etc/bashrc" file, as well in the relevant MPI area in "OpenFOAM-1.7.1/etc/".

edit 2 (trying to save forum space ;)): I forgot to mention that since you'll be compiling with a very different gcc version, you better do a clean up before rebuilding again with the new compiler. For that, run:


At this stage, any errors that might be outputted can be disregarded. Those commands that start with "foam" are aliases defined when the OpenFOAM environment is activated (when sourcing OpenFOAM's "bashrc" file); the first one gets you to the main folder for OpenFOAM and the second one to the respective ThirdParty folder.

Best regards,

chandramurthy January 25, 2011 13:59

I have been working successfully (including paraFoam) on rocks 4.3 HPC cluster with openfoam 1.4.1, 1.5, 1.6.x versions. Aslo, recently moved on to centos 5.4/5.5 amd64 arch.
it's a bit more complicated to setup the thing. drop me a mail, i can explain.

All times are GMT -4. The time now is 21:40.