Parallel simulations and decomposeParDict file
We need to be able to run simulations in parallel as explained in https://www.openfoam.com/documentation/user-guide/3-running-applications/3.2-running-applications-in-parallel
I guess the API should be something like:
params.parallel.nsubdoms = 16
params.parallel.method = "simple"
params.parallel.nsubdoms_xyz = None
params.parallel.delta = None
params.parallel.hierarchical.order = "xyz"
params.parallel.scotch.processor_weights = ...
params.parallel.scotch.strategy = "b"
params.parallel.manual.data_file = None
...
We need to create a decomposeParDict
file as explained here :
https://www.openfoam.com/documentation/guides/v2112/doc/openfoam-guide-parallel.html
Default should be params.parallel.nsubdoms = 1
and in this case, no decomposeParDict should be created. We need a mechanism for that.
We need to have a default _helper_decomposeParDict
which supports most common cases (methods).
The run
task should be made more complex to handle parallel simulations (detect decomposeParDict, read it and call the right commands).
Commands that should be run in case there is a decomposeParDict file:
decomposePar
mpirun -np 4 icoFoam -parallel > log &