OpenFOAM: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 8: Line 8:
: Here is an example of a serial submission script for OpenFOAM 5.0:
: Here is an example of a serial submission script for OpenFOAM 5.0:
<pre>
<pre>
#$ -cwd
#!/bin/bash
#$ -l h_rt=01:00:00
#SBATCH --time=00:01:00
#SBATCH --account=def-someuser


module purge
module purge
Line 21: Line 22:
: Here is an example of a parallel submission script for OpenFOAM 2.3.0:
: Here is an example of a parallel submission script for OpenFOAM 2.3.0:
<pre>
<pre>
#$ -cwd
#!/bin/bash
#$ -l h_rt=01:00:00
#SBATCH --account=def-someuser
#$ -pe ompi* 4
#SBATCH --ntasks=4              # number of MPI processes
#SBATCH --mem-per-cpu=1024M      # memory; default unit is megabytes
#SBATCH --time=0-00:10          # time (DD-HH:MM)


module purge
module purge
module load gcc/4.6.4 openmpi/gcc openfoam/2.3.0
module load openfoam/5.0
source $OPENFOAM/etc/bashrc
source $FOAM_ETC/bashrc


decomposePar
blockMesh
blockMesh
mpirun icoFoam -parallel
setFields
srun interFoam -parallel
</pre>
</pre>


: Mesh preparation (<code>blockMesh</code>) may be fast enough to be done at the command line (see [[User_Guide#Head_node_policies|Head Node Policies]]).  The solver (<code>icoFoam</code> and others) is usually the most expensive step and should always be submitted as a Grid Engine job except in very small test cases or tutorials.
: Mesh preparation (<code>blockMesh</code>) may be fast enough to be done at the command line (see [[Running jobs]]).  The solver (<code>icoFoam</code> and others) is usually the most expensive step and should always be submitted as a Slurm job except in very small test cases or tutorials.


; Performance:
; Performance:
cc_staff
1,486

edits

Navigation menu