Example #1
0
File: gdbfe.py Project: thaolt/PGDB
 def remote_init(self):
     """Initialize things related to the remote communication and back-end daemons."""
     self.comm = CommunicatorFE(True)  # Initialize with locking.
     # One of {pid} and {launcher, launcher_args} will not be none, based
     # upon the command line input parsing.
     ret = self.comm.init_lmon(self.lmon_attach,
                               pid=self.lmon_pid,
                               launcher=self.lmon_launcher,
                               launcher_args=self.lmon_launcher_argv,
                               host=self.lmon_host)
     if not ret:
         # Terminate. Note at this point main is still waiting on the remote_up event,
         # so we have to set it.
         self.remote_up.set()
         self.interrupt_main()
         return False
     ret = self.comm.init_mrnet(local=self.local_launch)
     if not ret:
         # Terminate. See prior comment about remote_up.
         self.remote_up.set()
         self.interrupt_main()
         return False
     self.varobjs = {}
     for rank in self.comm.get_mpiranks():
         self.varobjs[rank] = VariableObjectManager()
     self.init_handlers()
     self.pprinter = GDBMIPrettyPrinter()
     self.sleep_time = 0.1
     self.blocks = []
     try:
         self.blocks += gdbconf.default_blocks
     except AttributeError:
         pass
     # Initialize the SBD system if needed.
     if gdbconf.use_sbd:
         self.sbd = SBDFE(self.comm)
     else:
         self.sbd = None
     return True