Definition at line 630 of file pTools.py.
◆ __init__()
def GaudiMP.pTools.Syncer.__init__ |
( |
|
self, |
|
|
|
nWorkers, |
|
|
|
log, |
|
|
|
manyEvents = False , |
|
|
|
limit = None , |
|
|
|
step = None , |
|
|
|
firstEvent = None |
|
) |
| |
Definition at line 631 of file pTools.py.
632 self, nWorkers, log, manyEvents=False, limit=None, step=None, firstEvent=None
638 self.manyEvents = manyEvents
640 for i
in range(-2, nWorkers):
641 self.d[i] = SyncMini(Event(), lastEvent=Event())
643 self.limitFirst = firstEvent
645 self.keys = self.d.
keys()
646 self.nWorkers = nWorkers
◆ checkAll()
def GaudiMP.pTools.Syncer.checkAll |
( |
|
self | ) |
|
Definition at line 737 of file pTools.py.
740 currentStatus = [mini.check()
for mini
in self.d.values()]
741 return all(currentStatus)
◆ checkLastEvents()
def GaudiMP.pTools.Syncer.checkLastEvents |
( |
|
self | ) |
|
Definition at line 743 of file pTools.py.
743 def checkLastEvents(self):
745 stat = [sMini.checkLast()
for sMini
in self.d.values()]
◆ processHang()
def GaudiMP.pTools.Syncer.processHang |
( |
|
self | ) |
|
Definition at line 731 of file pTools.py.
731 def processHang(self):
732 self.log.critical(
"Some proc is hanging during Event processing!")
734 self.log.critical(
"Proc/Stat : %i / %s" % (k, self.d[k].
check()))
◆ syncAll()
def GaudiMP.pTools.Syncer.syncAll |
( |
|
self, |
|
|
|
step = "Not specified" |
|
) |
| |
Definition at line 649 of file pTools.py.
649 def syncAll(self, step="Not specified"):
654 sc = self.syncAllRolling()
658 for i
in range(0, self.limit, self.step):
660 self.log.info(
"%s : All procs done @ %i s" % (step, i))
663 time.sleep(self.step)
667 self.log.info(
"All processes : %s ok." % (step))
670 self.log.critical(
"Some process is hanging on : %s" % (step))
672 hangString =
"%s : Proc/Stat : %i/%s" % (step, k, self.d[k].
check())
673 self.log.critical(hangString)
◆ syncAllRolling()
def GaudiMP.pTools.Syncer.syncAllRolling |
( |
|
self | ) |
|
Definition at line 676 of file pTools.py.
676 def syncAllRolling(self):
698 if sMini.check()
or sMini.checkLast():
699 if sMini.checkLast()
and sMini.check():
702 alive = time.time() - begin
703 self.log.info(
"Audit : Node %i alive for %5.2f" % (k, alive))
709 wait = time.time() - sMini.getTime()
710 cond = wait > self.limit
712 cond = wait > self.limitFirst
716 self.log.critical(
"Single event wait : %5.2f" % (wait))
721 if self.checkLastEvents():
722 self.log.info(
"TC met for event loop")
726 time.sleep(self.step)
728 self.log.info(
"All processes Completed all Events ok")
◆ keys
GaudiMP.pTools.Syncer.keys |
◆ limit
GaudiMP.pTools.Syncer.limit |
◆ limitFirst
GaudiMP.pTools.Syncer.limitFirst |
◆ log
GaudiMP.pTools.Syncer.log |
◆ manyEvents
GaudiMP.pTools.Syncer.manyEvents |
◆ nWorkers
GaudiMP.pTools.Syncer.nWorkers |
◆ step
GaudiMP.pTools.Syncer.step |
The documentation for this class was generated from the following file: