Package PyFoam :: Package Execution :: Module ParallelExecution :: Class LAMMachine
[hide private]
[frames] | no frames]

Class LAMMachine

source code

                object --+    
                         |    
Basics.Utilities.Utilities --+
                             |
                            LAMMachine

Wrapper class for starting an stopping a LAM-Machine

Instance Methods [hide private]
  __init__(self, machines=None, nr=None)
  machineOK(self)
Check whether the LAM machine was properly booted
  stop(self)
Stops a LAM-machine (if one is running)
  boot(self)
Boots a LAM-machine using the machine-file
  cpuNr(self)
  buildMPIrun(self, argv)
Builds a list with a working mpirun command (for that MPI-Implementation)
  writeMetis(self, sDir)
Write the parameter-File for a metis decomposition
  writeSimple(self, sDir, direction)
Write the parameter-File for a metis decomposition
  writeDecomposition(self, sDir, par)
Write parameter file for a decomposition @param par:Parameters specific for that kind of decomposition @type par:str

Inherited from Basics.Utilities.Utilities: execute, listDirectory, writeDictionaryHeader

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]

Inherited from Basics.Utilities.Utilities: excludeNames


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, machines=None, nr=None)
(Constructor)

source code 
Parameters:
  • machines - Name of the file with the machine information
  • nr - Number of processes
Overrides: Basics.Utilities.Utilities.__init__

machineOK(self)

source code 
Check whether the LAM machine was properly booted

stop(self)

source code 
Stops a LAM-machine (if one is running)

boot(self)

source code 
Boots a LAM-machine using the machine-file

cpuNr(self)

source code 
None

buildMPIrun(self, argv)

source code 
Builds a list with a working mpirun command (for that MPI-Implementation)
Parameters:
  • argv - the original arguments that are to be wrapped
Returns:
list with the correct mpirun-command

writeMetis(self, sDir)

source code 
Write the parameter-File for a metis decomposition
Parameters:
  • sDir (PyFoam.RunDictionary.SolutionDirectory) - Solution directory

writeSimple(self, sDir, direction)

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

writeDecomposition(self, sDir, par)

source code 
Write parameter file for a decomposition @param par:Parameters specific for that kind of decomposition @type par:str
Parameters:
  • sDir (PyFoam.RunDictionary.SolutionDirectory) - Solution directory