Hoppa yfir í aðalefni

OpenFOAM

Hlaða inn OpenFOAM

OpenFOAM er fáanlegt í gegnum safnið lib-engine/modules/all. En þar sem lib-engine safnið er áreiðanlegt á lib-edda. Því þarf að hlaða inn lib-edda safninu áður en Það er hlaðið OpenFOAM frá lib-engine.

$ ml use /hpcapps/lib-edda/modules/all/Core
$ ml use /hpcapps/lib-engine/modules/all
$ ml load OpenFOAM

Keyra OpenFOAM með SBATCH | Dæmi compressibleInterFoam

Hér er dæmi hvernig er hægt að keyra OpenFOAM með SBATCH skriptu

#!/bin/bash

#SBATCH --mail-type=ALL
#SBATCH --mail-user=uname@hi.is # for example uname@hi.is
#SBATCH --partition=any_partition # request node from a specific partition
#SBATCH --nodes=1 # number of nodes
#SBATCH --ntasks-per-node=4 # 48 cores per node (96 in total)
#SBATCH --mem-per-cpu=2300 # MB RAM per cpu core
#SBATCH --time=0-04:00:00 # run for 4 hours maximum (DD-HH:MM:SS)
#SBATCH --hint=nomultithread # Suppress multithread
#SBATCH --output=myjob-%j.out
#SBATCH --error=myjob-%j.err




ml use /hpcapps/lib-edda/modules/all/Core # load lib-edda library
ml use /hpcapps/lib-engine/modules/all # loading lib-engine library

# loading OpenFOAM
ml load OpenFOAM/10-OpenMPI-4.1.5

source $FOAM_BASH

# run decomposition
blockMesh
setFields
decomposePar

#run openfoam simulation
mpiexec -np 4 compressibleInterFoam -parallel > log.compress &