From 62c9e5c64cb3328ef4bbace28feb7cfaa30d4c0a Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 7 Dec 2013 15:33:56 +0000 Subject: [PATCH] Really is better if we output a message indicating that the job was aborted due to hitting the execution time limit Refs trac:3960 This commit was SVN r29833. The following Trac tickets were found above: Ticket 3960 --> https://svn.open-mpi.org/trac/ompi/ticket/3960 --- orte/tools/orterun/help-orterun.txt | 11 +++++++++++ orte/tools/orterun/orterun.c | 4 ++++ 2 files changed, 15 insertions(+) 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);