ensembleSharedObj
index
ensembleSharedObj.py

create a Python object shared across an EnsembleSimulation
 
Method of sharing python objects across between processes associated with
ensembleSimulation.EnsembleSimulations.

 
Classes
       
Random
SharedObj

 
class Random
    an ensemble-safe Random object- the same result from random is
    distributed throughout the ensembleSimulation.EnsembleSimulation
    
 
  Methods defined here:
__init__(s)

 
class SharedObj
   
    a Python object shared across ensemble simulation members.
    The shared object must be picklable- meaning it should be a Python type.
    Strange memory errors will occur if non-picklable objects are shared.
    SWIG objects do not seem to be pickable.
    
 
  Methods defined here:
__del__(s)
__init__(s, ens=0, obj=0)

        arguments:
          ens - optional EnsembleSimulation object.
          obj - optional initial value for variable.
        
barrierGet(s)
 return the non-shared value of the shared object w/ barrier.
        Must be called when all threads are active.
        
get(s)
 return the value of the shared object. 
set(s, obj)
 set the value of the shared object

 
Functions
       
getpid(...)
getpid() -> pid
 
Return the current process id
unlink(...)
unlink(path)
 
Remove a file (same as remove(path)).