radical-cybertools / radical.pilot

RADICAL-Pilot
http://radical-cybertools.github.io/radical-pilot/index.html
Other
54 stars 23 forks source link

Review requirement to use only PRIMARY session for Task- and Pilot-Managers #3047

Closed mtitov closed 11 months ago

mtitov commented 1 year ago

Based on the fix for EnTK*: https://github.com/radical-cybertools/radical.entk/blob/4568f28f7552781b46f06b620df4d078eec62353/src/radical/entk/execman/rp/task_manager.py#L81-L86

Method _tmgr is set for multiprocessing.Process (link)

            session = self._rmgr.session
            self._rmgr._session = None

            self._tmgr_process = mp.Process(target=self._tmgr,
                                            name='task-manager',
                                            args=(self._uid,
                                                  self._rmgr,
                                                  self._zmq_info))
            self._tmgr_process.daemon = True

            self._rmgr._session = session

(*) https://github.com/radical-cybertools/radical.entk/pull/654

andre-merzky commented 11 months ago

We discussed this in the EnTK context. At the moment the workaround in EnTK (reset the session type manually) seems well confined and stable, so we agreed not to change the RP level as it would increase complexity and documentation load with little other benefit. We should revisit this if other, similar issues pop up some day.