From eb24fe4fd8d32d296e47ed535efb92ae2d978598 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 4 Oct 2005 17:19:23 +0000 Subject: [PATCH] If the job fails to launch properly, set its state to ABORTED, which will fire some subscriptions that will eventually result in invoking terminate_job (i.e., terminate anything that may have been successfully started by launch). This commit was SVN r7622. --- orte/mca/rmgr/urm/rmgr_urm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/orte/mca/rmgr/urm/rmgr_urm.c b/orte/mca/rmgr/urm/rmgr_urm.c index 66d39dfab0..bd1b0168a3 100644 --- a/orte/mca/rmgr/urm/rmgr_urm.c +++ b/orte/mca/rmgr/urm/rmgr_urm.c @@ -31,6 +31,7 @@ #include "orte/mca/iof/iof.h" #include "orte/mca/ns/ns.h" #include "orte/mca/rml/rml.h" +#include "orte/mca/soh/soh.h" #include "orte/mca/rmgr/urm/rmgr_urm.h" @@ -164,9 +165,21 @@ static int orte_rmgr_urm_map(orte_jobid_t jobid) static int orte_rmgr_urm_launch(orte_jobid_t jobid) { + int ret, ret2; + OPAL_TRACE(1); - return mca_rmgr_urm_component.urm_pls->launch(jobid); + if (ORTE_SUCCESS != + (ret = mca_rmgr_urm_component.urm_pls->launch(jobid))) { + ORTE_ERROR_LOG(ret); + ret2 = orte_soh.set_job_soh(jobid, ORTE_JOB_STATE_ABORTED); + if (ORTE_SUCCESS != ret2) { + ORTE_ERROR_LOG(ret2); + return ret2; + } + } + + return ret; } static int orte_rmgr_urm_terminate_job(orte_jobid_t jobid)