I use openfoam Version 1606+ When I run pisoFoam, in htop (to show CPU Usage) I can see that pisoFoam only uses one core (of course usage 99%). What do I have to modify if I want to use all cores of my CPU?
Best regards
I use openfoam Version 1606+ When I run pisoFoam, in htop (to show CPU Usage) I can see that pisoFoam only uses one core (of course usage 99%). What do I have to modify if I want to use all cores of my CPU?
Best regards
To run pisoFoam
parallel, roughly the following steps need to be taken:
decomposePar
(assuming you set system/decomposeParDict
file appropriately).pisoFoam
in parallel mode via this example command: mpirun -np X pisoFoam -parallel >& logFile(SampiyonCanakkaleDardanel)
, i.e. X
is the integer number of processors being used. Say you have 4 cores in your workstation, then X = 4
.Please note that you do not need to modify anything within pisoFoam
to perform a parallel task.
This is the typical workflow (after you generate your mesh):
checkMesh > log.checkMesh.1 2>&1
decomposePar > log.decomposePar 2>&1
renumberMesh > log.renumberMesh 2>&1
checkMesh > log.checkMesh.2 2>&1
mpiexec -n 5 pisoFoam -parallel > log.pisoFoam 2>&1
reconstructPar
Notes:
-parallel
flag.renumberMesh
is useful in cases of large meshes. functionObjects
as much as you can, as saving time directories can consume a lot of disk space.