cc_staff
1,486
edits
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> | ||
# | #!/bin/bash | ||
# | #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> | ||
# | #!/bin/bash | ||
# | #SBATCH --account=def-someuser | ||
# | #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 | module load openfoam/5.0 | ||
source $ | source $FOAM_ETC/bashrc | ||
decomposePar | |||
blockMesh | blockMesh | ||
setFields | |||
srun interFoam -parallel | |||
</pre> | </pre> | ||
: Mesh preparation (<code>blockMesh</code>) may be fast enough to be done at the command line (see [[ | : 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: |