OpenFOAM: Difference between revisions

From TRACC Wiki
Jump to navigation Jump to search
 
Line 3: Line 3:
To use OpenFOAM, load an OpenFOAM module:
To use OpenFOAM, load an OpenFOAM module:


  module load openfoam
  module load openfoam/10


to always get the latest stable version. The OpenFOAM modules will load the appropriate version of MPI for you. Loading any other MPI modules either before or after an OpenFOAM module is likely to cause problems.
The OpenFOAM modules will load the appropriate version of MPI for you. Loading any other MPI modules either before or after an OpenFOAM module is likely to cause problems.


Unless otherwise noted in the module name, OpenFOAM will be compiled with GCC and Intel MPI for performance reasons.
The various versions of OpenFOAM have all been compiled with OpenMPI. If you experience problems with OpenFOAM, contact us to find a solution or appropriate fix.
 
To load a number of convenient aliases into your environment, add the appropriate line below to your shell configuration files:
 
source $FOAM_INST_DIR/OpenFOAM-1.6/etc/aliases.sh
source $FOAM_INST_DIR/OpenFOAM-1.6/etc/aliases.csh
 
The following job script should be sufficient to get you started with running parallel jobs:
 
#!/bin/bash
. /etc/profile.d/modules.sh
module load openfoam
cd $PBS_O_WORKDIR
# don't use -np or -machinefile
mpirun <foamExec> <otherArgs> -parallel | tee logfile
 
You needn't (and shouldn't) specify a hostfile or number of processors; mpirun will automatically use $PBS_NODEFILE as the hostfile.


=== Pre- and post-processing ===
=== Pre- and post-processing ===

Latest revision as of 20:16, December 4, 2023

Getting started

To use OpenFOAM, load an OpenFOAM module:

module load openfoam/10

The OpenFOAM modules will load the appropriate version of MPI for you. Loading any other MPI modules either before or after an OpenFOAM module is likely to cause problems.

The various versions of OpenFOAM have all been compiled with OpenMPI. If you experience problems with OpenFOAM, contact us to find a solution or appropriate fix.

Pre- and post-processing

Resource-intensive pre- and post-processing should be done on a compute node, not on a login node. See our info about pre- and post-processing for STAR-CCM+ for how to run interactive and graphical applications on compute nodes.

Documentation

The official OpenFOAM documentation is available at OpenFOAM. The OpenFOAM Wiki is also useful.