Skip to content

Commit

Permalink
Minimizing diff between orte.py and orte_lib.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Santcroos committed Jan 9, 2017
1 parent 4d23d49 commit e79fa66
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/radical/pilot/agent/lm/orte_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def lrms_config_hook(cls, name, cfg, lrms, logger):
# Process is gone: fatal!
raise Exception("ORTE DVM process disappeared")


# ----------------------------------------------------------------------
def _watch_dvm(dvm_process):

Expand Down Expand Up @@ -165,10 +164,10 @@ def lrms_shutdown_hook(cls, name, cfg, lrms, lm_info, logger):
if 'dvm_uri' in lm_info:
try:
logger.info('terminating dvm')
orte_submit = cls._which('orterun')
if not orte_submit:
orterun = cls._which('orterun')
if not orterun:
raise Exception("Couldn't find orterun")
subprocess.Popen([orte_submit, "--hnp", lm_info['dvm_uri'], "--terminate"])
subprocess.Popen([orterun, "--hnp", lm_info['dvm_uri'], "--terminate"])
except Exception as e:
logger.exception('dmv termination failed')

Expand All @@ -191,9 +190,9 @@ def construct_command(self, cu, launch_script_hop):
cud = cu['description']
task_exec = cud['executable']
task_cores = cud['cores']
task_mpi = cud.get('mpi') or False
task_mpi = cud.get('mpi') or False
task_args = cud.get('arguments') or []
task_argstr = " ".join(task_args)
task_argstr = self._create_arg_string(task_args)

if 'task_slots' not in opaque_slots:
raise RuntimeError('No task_slots to launch via %s: %s' \
Expand Down

0 comments on commit e79fa66

Please sign in to comment.