diff --git a/ema_workbench/em_framework/futures_mpi.py b/ema_workbench/em_framework/futures_mpi.py index 5cf77e233..a5b117602 100644 --- a/ema_workbench/em_framework/futures_mpi.py +++ b/ema_workbench/em_framework/futures_mpi.py @@ -90,46 +90,19 @@ def logwatcher(stop_event): comm = MPI.COMM_WORLD.Accept(port, info, root) _logger.debug("client connected...") - # while not stop_event.is_set(): - # record = comm.irecv(None, MPI.ANY_SOURCE, tag=0) - # success = False - # message = None - # start_time = time.time() - # - # while not success or ( - # (time.time() - start_time) > 10 - # ): # what is a good timeout number given initialization of worker processes? - # success, message = record.test() - # time.sleep(1) - # - # if success: - # try: - # logger = logging.getLogger(message.name) - # except Exception as e: - # # AttributeError if record does not have a name attribute - # # TypeError record.name is not a string - # raise e - # else: - # logger.callHandlers(message) - # else: - # record.cancel() - # record.Free() - # else: - # _logger.info("closing logwatcher") - while not stop_event.is_set(): if rank == root: record = comm.recv(None, MPI.ANY_SOURCE, tag=0) try: logger = logging.getLogger(record.name) except Exception as e: + _logger.info(repr(record)) if record.msg is None: _logger.info("received sentinel") break else: # AttributeError if record does not have a name attribute # TypeError record.name is not a string - _logger.info("some exception {e}") raise e else: logger.callHandlers(record)