Definition at line 591 of file pTools.py.
◆ __init__()
def GaudiMP.pTools.Syncer.__init__ |
( |
|
self, |
|
|
|
nWorkers, |
|
|
|
log, |
|
|
|
manyEvents = False , |
|
|
|
limit = None , |
|
|
|
step = None , |
|
|
|
firstEvent = None |
|
) |
| |
Definition at line 592 of file pTools.py.
603 self.manyEvents = manyEvents
605 for i
in range(-2, nWorkers):
606 self.d[i] = SyncMini(Event(), lastEvent=Event())
608 self.limitFirst = firstEvent
610 self.keys = self.d.keys()
611 self.nWorkers = nWorkers
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
◆ checkAll()
def GaudiMP.pTools.Syncer.checkAll |
( |
|
self | ) |
|
Definition at line 704 of file pTools.py.
707 currentStatus = [mini.check()
for mini
in self.d.values()]
708 return all(currentStatus)
◆ checkLastEvents()
def GaudiMP.pTools.Syncer.checkLastEvents |
( |
|
self | ) |
|
Definition at line 710 of file pTools.py.
710 def checkLastEvents(self):
712 stat = [sMini.checkLast()
for sMini
in self.d.values()]
◆ processHang()
def GaudiMP.pTools.Syncer.processHang |
( |
|
self | ) |
|
Definition at line 698 of file pTools.py.
698 def processHang(self):
699 self.log.critical(
'Some proc is hanging during Event processing!')
701 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 614 of file pTools.py.
614 def syncAll(self, step="Not specified"):
619 sc = self.syncAllRolling()
623 for i
in range(0, self.limit, self.step):
625 self.log.info(
'%s : All procs done @ %i s' % (step, i))
628 time.sleep(self.step)
632 self.log.info(
"All processes : %s ok." % (step))
635 self.log.critical(
'Some process is hanging on : %s' % (step))
637 hangString =
"%s : Proc/Stat : %i/%s" % (step, k,
639 self.log.critical(hangString)
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
◆ syncAllRolling()
def GaudiMP.pTools.Syncer.syncAllRolling |
( |
|
self | ) |
|
Definition at line 642 of file pTools.py.
642 def syncAllRolling(self):
664 if sMini.check()
or sMini.checkLast():
665 if sMini.checkLast()
and sMini.check():
668 alive = time.time() - begin
670 "Audit : Node %i alive for %5.2f" % (k, alive))
676 wait = time.time() - sMini.getTime()
677 cond = wait > self.limit
679 cond = wait > self.limitFirst
683 self.log.critical(
'Single event wait : %5.2f' % (wait))
688 if self.checkLastEvents():
689 self.log.info(
'TC met for event loop')
693 time.sleep(self.step)
695 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: