|
LSST Applications g0da5cf3356+25b44625d0,g17e5ecfddb+50a5ac4092,g1c76d35bf8+585f0f68a2,g295839609d+8ef6456700,g2e2c1a68ba+cc1f6f037e,g38293774b4+62d12e78cb,g3b44f30a73+2891c76795,g48ccf36440+885b902d19,g4b2f1765b6+0c565e8f25,g5320a0a9f6+bd4bf1dc76,g56364267ca+403c24672b,g56b687f8c9+585f0f68a2,g5c4744a4d9+78cd207961,g5ffd174ac0+bd4bf1dc76,g6075d09f38+3075de592a,g667d525e37+cacede5508,g6f3e93b5a3+da81c812ee,g71f27ac40c+cacede5508,g7212e027e3+eb621d73aa,g774830318a+18d2b9fa6c,g7985c39107+62d12e78cb,g79ca90bc5c+fa2cc03294,g881bdbfe6c+cacede5508,g91fc1fa0cf+82a115f028,g961520b1fb+2534687f64,g96f01af41f+f2060f23b6,g9ca82378b8+cacede5508,g9d27549199+78cd207961,gb065e2a02a+ad48cbcda4,gb1df4690d6+585f0f68a2,gb35d6563ee+62d12e78cb,gbc3249ced9+bd4bf1dc76,gbec6a3398f+bd4bf1dc76,gd01420fc67+bd4bf1dc76,gd59336e7c4+c7bb92e648,gf46e8334de+81c9a61069,gfed783d017+bd4bf1dc76,v25.0.1.rc3
LSST Data Management Base Package
|
Classes | |
| class | Cache |
| class | Comm |
| class | Debugger |
| class | NoOp |
| class | PickleHolder |
| class | Pool |
| class | PoolMaster |
| class | PoolNode |
| class | PoolSlave |
| class | PoolWrapper |
| class | PoolWrapperMeta |
| class | ReductionThread |
| class | SingletonMeta |
| Metaclass to produce a singleton. More... | |
| class | Tags |
Functions | |
| def | unpickleInstanceMethod (obj, name) |
| def | pickleInstanceMethod (method) |
| def | unpickleFunction (moduleName, funcName) |
| def | pickleFunction (function) |
| def | getBatchType () |
| def | setBatchType (batchType) |
| def | abortOnError (func) |
| def | guessPickleObj () |
| def | pickleSniffer (abort=False) |
| def | catchPicklingError (func) |
| def | startPool (comm=None, root=0, killSlaves=True) |
| Start a process pool. More... | |
Variables | |
| string | NODE = "%s:%d" % (os.uname()[1], os.getpid()) |
| def lsst.ctrl.pool.pool.abortOnError | ( | func | ) |
Function decorator to throw an MPI abort on an unhandled exception
Definition at line 107 of file pool.py.
| def lsst.ctrl.pool.pool.catchPicklingError | ( | func | ) |
Function decorator to catch errors in pickling and print something useful
Definition at line 234 of file pool.py.
| def lsst.ctrl.pool.pool.getBatchType | ( | ) |
| def lsst.ctrl.pool.pool.guessPickleObj | ( | ) |
Try to guess what's not pickling after an exception This tends to work if the problem is coming from the regular pickle module. If it's coming from the bowels of mpi4py, there's not much that can be done.
Definition at line 162 of file pool.py.
| def lsst.ctrl.pool.pool.pickleFunction | ( | function | ) |
Pickle a function This assumes that we can recreate the function object by grabbing it from the proper module. This may be violated if the function is a lambda or in __main__. In that case, I recommend recasting the function as an object with a __call__ method. Another problematic case may be a wrapped (e.g., decorated) method in a class: the 'method' is then a function, and recreating it is not as easy as we assume here.
Definition at line 71 of file pool.py.
| def lsst.ctrl.pool.pool.pickleInstanceMethod | ( | method | ) |
Pickle an instance method The instance method is divided into the object and the method name.
Definition at line 46 of file pool.py.
| def lsst.ctrl.pool.pool.pickleSniffer | ( | abort = False | ) |
Context manager to sniff out pickle problems
If there's a pickle error, you're normally told what the problem
class is. However, all SWIG objects are reported as "SwigPyObject".
In order to figure out which actual SWIG-ed class is causing
problems, we need to go digging.
Use like this:
with pickleSniffer():
someOperationInvolvingPickle()
If 'abort' is True, will call MPI abort in the event of problems.
Definition at line 187 of file pool.py.
| def lsst.ctrl.pool.pool.setBatchType | ( | batchType | ) |
| def lsst.ctrl.pool.pool.startPool | ( | comm = None, |
|
root = 0, |
|||
killSlaves = True |
|||
| ) |
Start a process pool.
Returns a PoolMaster object for the master node. Slave nodes are run and then optionally killed. If you elect not to kill the slaves, note that they will emerge at the point this function was called, which is likely very different from the point the master is at, so it will likely be necessary to put in some rank dependent code (e.g., look at the 'rank' attribute of the returned pools). Note that the pool objects should be deleted (either by going out of scope or explicit 'del') before program termination to avoid a segmentation fault. @param comm: MPI communicator @param root: Rank of root/master node @param killSlaves: Kill slaves on completion?
Definition at line 1216 of file pool.py.
| def lsst.ctrl.pool.pool.unpickleFunction | ( | moduleName, | |
| funcName | |||
| ) |
Unpickle a function This has to be a named function rather than a lambda because pickle needs to find it.
Definition at line 60 of file pool.py.
| def lsst.ctrl.pool.pool.unpickleInstanceMethod | ( | obj, | |
| name | |||
| ) |
Unpickle an instance method This has to be a named function rather than a lambda because pickle needs to find it.
Definition at line 37 of file pool.py.