Package PyFoam :: Package Execution :: Module FoamThread
[hide private]
[frames] | no frames]

Module FoamThread

source code

Thread wrappers for OpenFOAM

Classes [hide private]
  FoamThread
Thread running an OpenFOAM command

Functions [hide private]
  checkForStopFile(thrd)
Checks for the file 'stop' in the directory of the FoamRun.
  getLinuxMem(thrd)
Reads the Memory usage of a thread on a linux-System

Imports: sys, threading.Thread, threading.Lock, threading.Timer, popen2.Popen4, subprocess, time.time, time.sleep, resource.getrusage, resource.getpagesize, resource.RUSAGE_CHILDREN, os.uname, os.kill, os.path, os.unlink, signal, Basics.LineReader.LineReader, Infrastructure.Logging.foamLogger, Error.warning


Function Details [hide private]

checkForStopFile(thrd)

source code 
Checks for the file 'stop' in the directory of the FoamRun. If it exists it is removed and the run is stopped gracefully

getLinuxMem(thrd)

source code 
Reads the Memory usage of a thread on a linux-System
Parameters:
  • thrd - the thread object in question