Skip to content
Snippets Groups Projects
Commit ebf9ccb0 authored by Danny Auble's avatar Danny Auble
Browse files

remove terminate_job api from perl

parent c3304a35
No related branches found
No related tags found
No related merge requests found
...@@ -573,11 +573,6 @@ slurm_complete_job(slurm_t self, uint32_t job_id, uint32_t job_rc=0) ...@@ -573,11 +573,6 @@ slurm_complete_job(slurm_t self, uint32_t job_id, uint32_t job_rc=0)
C_ARGS: C_ARGS:
job_id, job_rc job_id, job_rc
int
slurm_terminate_job(slurm_t self, uint32_t job_id)
C_ARGS:
job_id
int int
slurm_terminate_job_step(slurm_t self, uint32_t job_id, uint32_t step_id) slurm_terminate_job_step(slurm_t self, uint32_t job_id, uint32_t step_id)
C_ARGS: C_ARGS:
......
...@@ -578,18 +578,6 @@ Note the completion of a job and all of its steps. ...@@ -578,18 +578,6 @@ Note the completion of a job and all of its steps.
=back =back
=head3 $rc = $slurm->terminate_job($job_id);
Terminates all steps of an existing job by sending a REQUEST_TERMINATE_JOB rpc to all slurmd in the the job allocation, and then calls slurm_complete_job().
=over 2
=item * IN $job_id: the job's id.
=item * RET: 0 on success, otherwise return -1 and set errno to indicate the error.
=back
=head3 $rc = $slurm->terminate_job_step($job_id, $step_id); =head3 $rc = $slurm->terminate_job_step($job_id, $step_id);
Terminates a job step by sending a REQUEST_TERMINATE_TASKS rpc to all slurmd of a job step, and then calls slurm_complete_job_step() after verifying that all nodes in the job step no longer have running tasks from the job step. (May take over 35 seconds to return.) Terminates a job step by sending a REQUEST_TERMINATE_TASKS rpc to all slurmd of a job step, and then calls slurm_complete_job_step() after verifying that all nodes in the job step no longer have running tasks from the job step. (May take over 35 seconds to return.)
......
#!/usr/bin/perl -T #!/usr/bin/perl -T
use Test::More tests => 5; use Test::More tests => 4;
use Slurm qw(:constant); use Slurm qw(:constant);
use POSIX qw(:signal_h); use POSIX qw(:signal_h);
...@@ -24,7 +24,7 @@ ok($resp, "submit batch job") or diag ("submit_batch_job: " . $slurm->strerror() ...@@ -24,7 +24,7 @@ ok($resp, "submit batch job") or diag ("submit_batch_job: " . $slurm->strerror()
$jobid = $resp->{job_id} if $resp; $jobid = $resp->{job_id} if $resp;
# 3 - 5 # 3 - 4
SKIP: { SKIP: {
skip "no job", 4 unless $jobid; skip "no job", 4 unless $jobid;
...@@ -34,10 +34,6 @@ SKIP: { ...@@ -34,10 +34,6 @@ SKIP: {
$rc = $slurm->terminate_job_step($jobid, 0); $rc = $slurm->terminate_job_step($jobid, 0);
ok($rc == SLURM_SUCCESS || $slurm->get_errno() == ESLURM_ALREADY_DONE, "termite job step") ok($rc == SLURM_SUCCESS || $slurm->get_errno() == ESLURM_ALREADY_DONE, "termite job step")
or diag("terminate_job_step: " . $slurm->strerror()); or diag("terminate_job_step: " . $slurm->strerror());
$rc = $slurm->terminate_job($jobid);
ok($rc == SLURM_SUCCESS || $slurm->get_errno() == ESLURM_ALREADY_DONE, "terminate job")
or diag("terminate_job: " . $slurm->strerror());
} }
$slurm->kill_job($jobid, SIGKILL) if $jobid; $slurm->kill_job($jobid, SIGKILL) if $jobid;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment