From bc8ca60e721a8f736d0e671ce3fc9bfcb4dda7a3 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 26 Apr 2006 16:23:11 +0000
Subject: [PATCH] Remove vestigial function _comp_msg, add operation time
 report to slurm_ckpt_comp function.

---
 src/plugins/checkpoint/aix/checkpoint_aix.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/plugins/checkpoint/aix/checkpoint_aix.c b/src/plugins/checkpoint/aix/checkpoint_aix.c
index 95490f9441b..873ee38c7ce 100644
--- a/src/plugins/checkpoint/aix/checkpoint_aix.c
+++ b/src/plugins/checkpoint/aix/checkpoint_aix.c
@@ -64,8 +64,6 @@ struct check_job_info {
 	char    *error_msg;
 };
 
-static void _comp_msg(struct step_record *step_ptr, 
-		struct check_job_info *check_ptr);
 static void _send_sig(uint32_t job_id, uint32_t step_id, uint16_t signal,
 		char *node_name, slurm_addr node_addr);
 static int  _step_sig(struct step_record * step_ptr, uint16_t wait, 
@@ -261,9 +259,12 @@ extern int slurm_ckpt_comp ( struct step_record * step_ptr, time_t event_time,
 	/* We need an error-free reply from each compute node, 
 	 * plus POE itself to note completion */
 	if (check_ptr->reply_cnt++ == check_ptr->node_cnt) {
-		info("Checkpoint complete for job %u.%u",
-			step_ptr->job_ptr->job_id, step_ptr->step_id);
-		check_ptr->time_stamp = time(NULL);
+		time_t now = time(NULL);
+		long delay = (long) difftime(now, check_ptr->time_stamp);
+		info("Checkpoint complete for job %u.%u in %ld seconds",
+			step_ptr->job_ptr->job_id, step_ptr->step_id,
+			delay);
+		check_ptr->time_stamp = now;
 		_ckpt_dequeue_timeout(step_ptr->job_ptr->job_id,
 			step_ptr->step_id, event_time);
 	}
@@ -394,15 +395,6 @@ static int _step_sig(struct step_record * step_ptr, uint16_t wait,
 	return SLURM_SUCCESS;
 }
 
-static void _comp_msg(struct step_record *step_ptr, 
-		struct check_job_info *check_ptr)
-{
-	long delay = (long) difftime(time(NULL), check_ptr->time_stamp);
-	info("checkpoint done for job %u.%u, secs %ld errno %d", 
-		step_ptr->job_ptr->job_id, step_ptr->step_id, 
-		delay, check_ptr->error_code);
-}
-
 /* Checkpoint processing pthread
  * Never returns, but is cancelled on plugin termiantion */
 static void *_ckpt_agent_thr(void *arg)
-- 
GitLab