Esempio n. 1
0
    def do_work_wait(self):
        barrier(self.svc.comm, "Going to wait work on all. Return True when all is over")

        ans = self.work_wait()  # True when wait is over

        # # override mechanisms
        force_fn = os.path.join(self.controldir, 'force_stop')
        if os.path.isfile(force_fn):
            self.log.warn("Force stop detected. work_wait was %s. return True", ans)
            return True
        else:
            self.log.debug("No force stop file %s found", force_fn)

        force_fn = os.path.join(self.controldir, 'force_continue')
        if os.path.isfile(force_fn):
            self.log.warn("Force continue detected. work_wait was %s. return False", ans)
            return False
        else:
            self.log.debug("No force continue file %s found", force_fn)

        return ans
 def test_mpiservice_barrier(self):
     '''test mpiservice barrier'''
     ms = hm.MpiService()
     hm.barrier(ms.comm, 'Wibble')
Esempio n. 3
0
 def do_work_stop(self):
     """Stop the work"""
     barrier(self.svc.comm, "Going to stop work on ")
     self.stop_work_service()
Esempio n. 4
0
 def do_work_start(self):
     """Start the work"""
     barrier(self.svc.comm, "Going to run pre-start work on rank %s" % self.svc.rank)
     self.pre_start_work_service()
     barrier(self.svc.comm, "Going to start work on rank %s" % self.svc.rank)
     self.start_work_service()
Esempio n. 5
0
 def test_mpiservice_barrier(self):
     '''test mpiservice barrier'''
     ms = hm.MpiService()
     hm.barrier(ms.comm, 'Wibble')