diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 1b4a160b220996867a9ab80757a82e82f5ebdf12..9e7d8660b5f88a59ec38bdecbbbde52835acd206 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 a1ed5936ab3ddeb2e9b372eaa7127b82c93df4e9..607e19aedc20a09c19062ef3b9b93b2edb62cf45 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 f3b008c6a9cac5613706112aff86516aaca797b0..25c4848d00fa2a25352fccd4d007814197147c8d 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);