Translations of this page:

OpenFOAM

Start version which you want to use by loading correct environment module. Modules are named with following scheme: openfoam/MPI-version/compiler/version

Example of the runscript needed for Slurm.

#!/bin/bash
### NOTE: if you are running on cluster STYX, you need to add
### -l flag after the /bin/bash !!!!
### job script example with 4 cores on exactly 1 node
### parallel computation of damBreak case with finer mesh
###
 
## name of your job
#SBATCH -J foamjobname
 
## system error message output file
## leave %j as it's being replaced by JOB ID number
#SBATCH -e foamjobname.%j.std.err
 
## system message output file
#SBATCH -o foamjobname.%j.std.out
 
## send mail after job is finished
#SBATCH --mail-type=end
#SBATCH --mail-user=<lut_user_name>@lut.fi
 
## memory limit per allocated CPU core
## try to put this limit as low as reasonably achievable
## too low calculation will fail, too high resources are wasted
## limit is specified in MB
## example: 1 GB is 1000
#SBATCH --mem-per-cpu=1000
 
## how long a job takes, wallclock time d-hh:mm:ss
## here 1 hour is used
#SBATCH -t 0-01:00:00
 
## number of nodes (if necessary)
## -N 1 (job run on exactly one node)
## -N <minnodes:maxnodes>
#SBATCH -N 1
 
## number of cores
#SBATCH -n 4
 
## name of queue 
#SBATCH -p phase_name
 
## load necessary environment modules 
module load openfoam/openmpi-1.8.4-gcc/gcc-4.9.2/2.3.1
 
## change directory to your calculation directory
## note that the case has been already initialized and decomposed before
cd /home/<username>/openfoam/openmpi-1.8.4-gcc/gcc-4.9.2/2.3.1/run/tutorials/multiphase/interFoam/laminar/damBreakFine/
 
## run my MPI executable
srun --mpi=pmi2 interFoam -parallel
 
/opt/webdata/webroot/wiki/data/pages/en/hpc/software/openfoam.txt · Last modified: 2016/11/17 13:00 by mnikku
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki