diff --git a/orte/tools/orterun/help-orterun.txt b/orte/tools/orterun/help-orterun.txt index 24070c596d..49d5486039 100644 --- a/orte/tools/orterun/help-orterun.txt +++ b/orte/tools/orterun/help-orterun.txt @@ -639,3 +639,14 @@ number of processes to run: Num procs: %d Please correct this value and try again. +# +[orterun:timeout] +The user-provided time limit for job execution has been +reached: + + MPIEXEC_TIMEOUT: %s + +The job will now be aborted. Please check your code and/or +adjust/remove the job execution time limit (as specified +by MPIEXEC_TIMEOUT in your environment). + diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index c357298386..e507d428fb 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -3060,10 +3060,14 @@ static void build_debugger_args(orte_app_context_t *debugger) void orte_timeout_wakeup(int sd, short args, void *cbdata) { orte_job_t *jdata = (orte_job_t*)cbdata; + char *tm; /* this function gets called when the job execution time * has hit a prescribed limit - so just abort */ + tm = getenv("MPIEXEC_TIMEOUT"); + orte_show_help("help-orterun.txt", "orterun:timeout", + true, (NULL == tm) ? "NULL" : tm); ORTE_UPDATE_EXIT_STATUS(ORTE_ERROR_DEFAULT_EXIT_CODE); /* abort the job */ ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_FORCED_EXIT);