Logo of Science Foundation Ireland  Logo of the Higher Education Authority, Ireland7 Capacities
Ireland's High-Performance Computing Centre | ICHEC
Home | News | Infrastructure | Outreach | Services | Research | Support | Education & Training | Consultancy | About Us | Login

ICHEC Software

Information about software packages installed on the ICHEC systems.


Versions Installed

Fionn: 2.2.2 2.4.0 3.0.1


OpenFOAM is an open source package for finite-volume based solution of problems in continuum mechanics, primarily Computational Fluid Dynamics (CFD). OpenFOAM is supplied with several standard solvers for different classes of flow problems, including multiphase flow and combustion. The object-oriented C++ implementation of OpenFOAM facilitates the development of custom flow solvers.


OpenFOAM is available under the terms of the GNU General Public License.


The OpenFOAM "cavity" tutorial case was scaled-up for benchmarking purposes by changing the number of points (in constant/polyMesh/blockMeshDict) from (20 20 1) to (512 512 1). The time-step deltaT (in system/controlDict) was reduced from 0.5 to 0.0001, and the endTime reduced to 0.01. A system/decomposeParDict file was introduced (essentially copied from wingMotion2D_pimpleDyMFoam) to control parallel decomposition.

The figure below shows total run-time for this case on both Stokes and Fionn, as a function of core-count only. Note that the 48-core run used 2 Fionn nodes, but 4 Stokes nodes. Even so, on a core-by-core comparison, performance on Fionn is almost twice as fast as on Stokes.

However, there are several different factors at play here as well as the different systems. OpenFOAM on Stokes was version 2.2.0, built with g++ and OpenMPI, while OpenFOAM on Fionn was version 2.2.2, built with Intel compilers and Intel MPI. It is difficult to identify which factor explains most of the performance gain, though perhaps the compiler is the most likely.

Like other jobs on ICHEC systems, OpenFOAM jobs must be submitted using a PBS script. The following is an example PBS script for allocating 1 node of Fionn (24 cores) for 30 minutes, then running the motorBike tutorial in parallel over 6 cores within that allocation. Note that OpenFOAM employs domain decomposition for parallel runs which is defined geometrically by decomposeParDict in the system directory. Each processor must be assigned a portion of the mesh on which to operate. For the case below, the corresponding decomposeParDict, the default shipped with the source, defines 6 regions. The solvers can therefore only be run over 6 cores. To vary this, the decomposeParDict must be edited accordingly (both numberOfSubdomains, and the (nx ny nz) "n" coeffs).

More detailed information on running OpenFOAM in parallel can be found here.

#PBS -l nodes=1:ppn=24
#PBS -l walltime=00:30:00
#PBS -N myJobName
#PBS -A MyProjectName
#PBS -o outputFileName
#PBS -e errorFileName

module purge
module load apps
module avail
module load openfoam/X.Y.Z
source /ichec/packages/OpenFOAM/OpenFOAM-X.Y.Z/etc/bashrc


echo "Starting at "
cp -r 0.org/ 0

# copy motorbike surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/

blockMesh >> blockMesh.log
decomposePar >> decomposePar.log

mpiexec -np 6 snappyHexMesh -overwrite -parallel >> snappyHexMesh.log
ls -d processor* | xargs -i rm -rf ./{}/0 $1
ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1
mpiexec -np 6 patchSummary -parallel >> patch.log
mpiexec -np 6 potentialFoam -parallel -noFunctionObjects -writep >> potentialFoam.log
mpiexec -np 6 simpleFoam -parallel >> simpleFoam.log
reconstructParMesh -constant >> reconstructParMesh.log
reconstructPar -latestTime >> reconstructPar.log

echo "Run completed at "

This job can be submitted using the command

qsub scriptname.pbs

where scriptname.pbs is the filename of the sample PBS script

Setting Environment Variables

Frequent OpenFOAM users will know that the custom linux environment is set by sourcing the bashrc contained within the source code. However, to ensure full capability of OpenFOAM the user will need to set the $WORK path before sourcing the bashrc. This is done with a command similar to

export WORK=/ichec/work/my_projectname/my_username


OpenFOAM comes with its own build of Paraview which it imports case data to using the paraFoam module. Paraview is built, as part of the OpenFOAM/2.1.1 module, on the login nodes of Stokes but we advise users to simply create the reader module using

paraFoam -touch

then transfer their case data to their local machine using a utility such as scp or sshfs. Not only will this prevent the shared login nodes from becoming clogged, but also allow for faster rendering as there will not be any live data transfer.

Additional Notes

Further information can be obtained from the OpenFOAM Foundation Website www.openfoam.org.

Return to the software index