Package PyFoam :: Package Infrastructure :: Module FoamServer
[hide private]
[frames] | no frames]

Module FoamServer

source code

A XMLRPC-Server that answeres about the current state of a Foam-Run

Classes [hide private]
  FoamAnswerer
The class that handles the actual requests (only needed to hide the Thread-methods from the world
  FoamServer
This is the class that serves the requests about the FOAM-Run
Functions [hide private]
 
findFreePort()
Finds a free server port on this machine and returns it
source code
x in the interval [0, 1).
random() source code
Variables [hide private]
  PY3 = False
  __package__ = 'PyFoam.Infrastructure'
  environ = {'M4_SYSTEM': '1', 'CMAKE_SYSTEM': '1', 'WM_NCOMPPRO...

Imports: Lock, ParameterFile, RingBuffer, ServerBase, ServerProxy, Thread, Timer, allLines, allPlots, config, extract_tb, foamLogger, foamMPI, freeServerPort, getloadavg, getpid, path, select, sleep, socket, string, sys, time, uname, userName, versionString, warning


Function Details [hide private]

findFreePort()

source code 

Finds a free server port on this machine and returns it

Valid server ports are in the range 18000 upward (the function tries to find the lowest possible port number

ATTENTION: this part may introduce race conditions


Variables Details [hide private]

environ

Value:
{'M4_SYSTEM': '1', 'CMAKE_SYSTEM': '1', 'WM_NCOMPPROCS': '1', 'WM_MPLI\
B': 'MACPORTOPENMPI', 'METIS_SYSTEM': '1', 'LESS': '-R', 'WM_CXXFLAGS'\
: '-m64 -fPIC', 'WM_COMPILER_ARCH': '', 'HWLOC_SYSTEM': '1', 'DBUS_LAU\
NCHD_SESSION_BUS_SOCKET': '/tmp/launch-YT2LFL/unix_domain_listener', '\
FOAM_LIB': '/Users/bgschaid/foam/foam-extend-3.1/lib', 'SHELL': '/bin/\
zsh', 'WM_ARCH_BASE': 'darwin', 'SECURITYSESSIONID': '186a4', 'WM_OPTI\
ONS': 'darwinIntel64Gcc48DPDebug', 'FLEX_SYSTEM': '1', 'PARMETIS_DIR':\
 '/opt/local', 'FOAM_MPI_LIBBIN': '/Users/bgschaid/foam/foam-extend-3.\
...