Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs.it4i.cz
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
docs.it4i.cz
Commits
5eb66135
Commit
5eb66135
authored
7 months ago
by
Jan Siwiec
Browse files
Options
Downloads
Patches
Plain Diff
Update openfoam.md
parent
a05ed7f5
No related branches found
No related tags found
No related merge requests found
Pipeline
#39705
failed
7 months ago
Stage: test
Stage: build
Stage: deploy
Stage: after_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs.it4i/software/viz/openfoam.md
+14
-16
14 additions, 16 deletions
docs.it4i/software/viz/openfoam.md
with
14 additions
and
16 deletions
docs.it4i/software/viz/openfoam.md
+
14
−
16
View file @
5eb66135
!!!warning
This page has not been updated yet. The page does not reflect the transition from PBS to Slurm.
# OpenFOAM
# OpenFOAM
OpenFOAM is a free, open source CFD software package.
OpenFOAM is a free, open source CFD software package.
...
@@ -108,7 +105,7 @@ runApplication icoFoam
...
@@ -108,7 +105,7 @@ runApplication icoFoam
Job submission (example for Karolina):
Job submission (example for Karolina):
```
console
```
console
$
qsub
-A
OPEN-0-0
-
q
q
prod
-l
select
=
1:ncpus
=
128,wall
time
=
03:00:00 test.sh
$
sbatch
-A
PROJECT_ID
-
p
q
cpu
--nodes
=
1
--ntasks
=
128
--
time
=
03:00:00 test.sh
```
```
For information about job submission, look
[
here
][
2
]
.
For information about job submission, look
[
here
][
2
]
.
...
@@ -140,21 +137,22 @@ runApplication decomposePar
...
@@ -140,21 +137,22 @@ runApplication decomposePar
Job submission
Job submission
```
console
```
console
$
qsub
-A
OPEN-0-0
-
q
q
prod
-l
select
=
1:ncpus
=
16,wall
time
=
03:00:00 test.sh
$
sbatch
-A
PROJECT_ID
-
p
q
cpu
--nodes
=
1
--ntasks
=
16
--
time
=
03:00:00 test.sh
```
```
This job creates a simple block mesh and domain decomposition. Check your decomposition and submit parallel computation:
This job creates a simple block mesh and domain decomposition. Check your decomposition and submit parallel computation:
!!! note
!!! note
Create a testParallel.
pbs PBS
script:
Create a testParallel.
slurm
script:
```
bash
```
bash
#!/bin/bash
#!/bin/bash
#PBS -N motorBike
#SBATCH --job-name=motorBike
#PBS -l select=2:ncpus=16
#SBATCH --nodes=2
#PBS -l walltime=01:00:00
#SBATCH --ntasks-per-node=16
#PBS -q qprod
#SBATCH --time=01:00:00
#PBS -A OPEN-0-0
#SBATCH --partition=qcpu
#SBATCH --account=ACCOUNT_ID
ml openfoam/2.2.1-icc-openmpi1.6.5-DP
ml openfoam/2.2.1-icc-openmpi1.6.5-DP
source
$FOAM_BASHRC
source
$FOAM_BASHRC
...
@@ -163,11 +161,11 @@ cd $FOAM_RUN/tutorials/incompressible/simpleFoam/motorBike
...
@@ -163,11 +161,11 @@ cd $FOAM_RUN/tutorials/incompressible/simpleFoam/motorBike
nproc
=
32
nproc
=
32
mpirun
-hostfile
${
PBS
_NODE
FILE
}
-np
$nproc
snappyHexMesh
-overwrite
-parallel
|
tee
snappyHexMesh.log
mpirun
-hostfile
${
$SLURM_JOB
_NODE
LIST
}
-np
$nproc
snappyHexMesh
-overwrite
-parallel
|
tee
snappyHexMesh.log
mpirun
-hostfile
${
PBS
_NODE
FILE
}
-np
$nproc
potentialFoam
-noFunctionObject-writep
-parallel
|
tee
potentialFoam.log
mpirun
-hostfile
${
$SLURM_JOB
_NODE
LIST
}
-np
$nproc
potentialFoam
-noFunctionObject-writep
-parallel
|
tee
potentialFoam.log
mpirun
-hostfile
${
PBS
_NODE
FILE
}
-np
$nproc
simpleFoam
-parallel
|
tee
simpleFoam.log
mpirun
-hostfile
${
$SLURM_JOB
_NODE
LIST
}
-np
$nproc
simpleFoam
-parallel
|
tee
simpleFoam.log
```
```
`nproc`
– the number of subdomains
`nproc`
– the number of subdomains
...
@@ -175,7 +173,7 @@ mpirun -hostfile ${PBS_NODEFILE} -np $nproc simpleFoam -parallel | tee simpleFoa
...
@@ -175,7 +173,7 @@ mpirun -hostfile ${PBS_NODEFILE} -np $nproc simpleFoam -parallel | tee simpleFoa
Job submission
Job submission
```
console
```
console
$
qsub
testParallel.
pbs
$
srun
testParallel.
slurm
```
```
## Compile Your Own Solver
## Compile Your Own Solver
...
@@ -198,7 +196,7 @@ $ cd applications/solvers
...
@@ -198,7 +196,7 @@ $ cd applications/solvers
Copy icoFoam solver’s source files:
Copy icoFoam solver’s source files:
```
console
```
console
$
cp
-r
$FOAM_SOLVERS
/incompressible/icoFoam/
My_icoFoam
$
cp
-r
$FOAM_SOLVERS
/incompressible/icoFoam/My_icoFoam
$
cd
My_icoFoam
$
cd
My_icoFoam
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment