PyFoam.Execution.ParallelExecution module

Things that are needed for convenient parallel Execution

class PyFoam.Execution.ParallelExecution.LAMMachine(machines=None, nr=None)[source]

Bases: PyFoam.Basics.Utilities.Utilities

Wrapper class for starting an stopping a LAM-Machine

boot()[source]

Boots a LAM-machine using the machine-file

buildMPIrun(argv, expandApplication=True)[source]

Builds a list with a working mpirun command (for that MPI-Implementation) :param argv: the original arguments that are to be wrapped :param expandApplication: Expand the :return: list with the correct mpirun-command

cpuNr()[source]
machineOK()[source]

Check whether the LAM machine was properly booted

stop()[source]

Stops a LAM-machine (if one is running)

writeDecomposition(sDir, par)[source]

Write parameter file for a decomposition :param par:Parameters specific for that kind of decomposition :type par:str :param sDir: Solution directory :type sDir: PyFoam.RunDictionary.SolutionDirectory

writeMetis(sDir)[source]

Write the parameter-File for a metis decomposition :param sDir: Solution directory :type sDir: PyFoam.RunDictionary.SolutionDirectory

writeSimple(sDir, direction)[source]

Write the parameter-File for a metis decomposition :param sDir: Solution directory :type sDir: PyFoam.RunDictionary.SolutionDirectory :param direction: direction in which to decompose (0=x, 1=y, 2=z)