From c57ae031c0daeef8804e68101f2314d872665e55 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Thu, 1 Dec 2011 15:55:57 -0800
Subject: [PATCH] BGQ - check to see if job has already completed before we
 heard about the step.  If so there is no need to do any step cleanup since
 the allocation has already been cleaned up.

---
 src/plugins/select/bluegene/select_bluegene.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c
index 97fc7385a9d..269a30262ab 100644
--- a/src/plugins/select/bluegene/select_bluegene.c
+++ b/src/plugins/select/bluegene/select_bluegene.c
@@ -1977,7 +1977,11 @@ extern int select_p_step_finish(struct step_record *step_ptr)
 	xassert(step_ptr);
 
 
+	if (IS_JOB_COMPLETING(step_ptr->job_ptr)) {
+		debug("step completion %u.%u was received after job "
+		      "allocation is already completing, no cleanup needed",
 		      step_ptr->job_ptr->job_id, step_ptr->step_id);
+		return SLURM_SUCCESS;
 	}
 
 	jobinfo = step_ptr->job_ptr->select_jobinfo->data;
-- 
GitLab