From f70dad8979f322e080ab99936c91eafb2ce8806f Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Tue, 1 Jun 2010 19:46:03 +0000 Subject: [PATCH] svn merge -r20363:20365 https://eris.llnl.gov/svn/slurm/branches/slurm-2.1 --- src/plugins/select/linear/select_linear.c | 9 ---- src/slurmctld/job_mgr.c | 50 ----------------------- src/slurmctld/slurmctld.h | 7 ---- 3 files changed, 66 deletions(-) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 1b4a160b220..9e7d8660b5f 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -91,15 +91,6 @@ int node_record_count; time_t last_node_update; struct switch_record *switch_record_table; int switch_record_cnt; -#ifdef HAVE_AIX -/* On AIX dlopen's RTLD_LAZY flag does NOT work, so we must define - * actual functions here in order to load this plugin from anywhere - * other than slurmctld */ -void job_preempt_remove(uint32_t job_id) -{ - ; -} -#endif struct select_nodeinfo { uint16_t magic; /* magic number */ diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index a1ed5936ab3..607e19aedc2 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8935,53 +8935,3 @@ _read_job_ckpt_file(char *ckpt_file, int *size_ptr) *size_ptr = data_size; return data; } - -/* - * Preempt a job using the proper job removal mechanism (checkpoint, requeue). - * Do not use this function for job suspend/resume. This is handled by the - * gang module. - */ -extern void job_preempt_remove(uint32_t job_id) -{ - int rc = SLURM_SUCCESS; - struct job_record *job_ptr; - uint16_t preempt_mode; - checkpoint_msg_t ckpt_msg; - - if ((job_ptr = find_job_record(job_id)) == NULL) { - error("job_preempt_remove could not find job %u", job_id); - return; - } - preempt_mode = slurm_job_preempt_mode(job_ptr); - if (preempt_mode == PREEMPT_MODE_REQUEUE) { - rc = job_requeue(0, job_id, -1, (uint16_t)NO_VAL); - if (rc == SLURM_SUCCESS) { - info("preempted job %u has been requeued", job_id); - } - } else if (preempt_mode == PREEMPT_MODE_CANCEL) { - (void) job_signal(job_id, SIGKILL, 0, 0); - } else if (preempt_mode == PREEMPT_MODE_CHECKPOINT) { - memset(&ckpt_msg, 0, sizeof(checkpoint_msg_t)); - ckpt_msg.op = CHECK_VACATE; - ckpt_msg.job_id = job_id; - rc = job_checkpoint(&ckpt_msg, 0, -1, (uint16_t)NO_VAL); - if (rc == SLURM_SUCCESS) { - info("preempted job %u has been checkpointed", job_id); - } - } else if ((preempt_mode == PREEMPT_MODE_SUSPEND) && - (slurm_get_preempt_mode() & PREEMPT_MODE_GANG)) { - debug("preempted job %u suspended by gang scheduler", job_id); - } else { - error("Invalid preempt_mode: %u", preempt_mode); - } - - if (rc != SLURM_SUCCESS) { - rc = job_signal(job_id, SIGKILL, 0, 0); - if (rc == SLURM_SUCCESS) - info("preempted job %u had to be killed", job_id); - else { - info("preempted job %u kill failure %s", - job_id, slurm_strerror(rc)); - } - } -} diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index f3b008c6a9c..25c4848d00f 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -887,13 +887,6 @@ extern int job_fail(uint32_t job_id); */ extern int job_node_ready(uint32_t job_id, int *ready); -/* - * Preempt a job using the proper job removal mechanism (checkpoint, requeue). - * Do not use this function for job suspend/resume. This is handled by the - * gang module. - */ -extern void job_preempt_remove(uint32_t job_id); - /* Record accounting information for a job immediately before changing size */ extern void job_pre_resize_acctg(struct job_record *job_ptr); -- GitLab