Skip to content
Snippets Groups Projects
Commit 3a727a01 authored by Moe Jette's avatar Moe Jette
Browse files

Update job_complete RPCs to take slurm and job return codes.

slurmctld can set a node down per bad slurmd return code in
job completion RPC.
slurmd has framework for returning both slurmd and and application
return codes on batch job completion.
Srun modified to send return codes on job completion
parent c61062d6
No related branches found
No related tags found
No related merge requests found
...@@ -177,7 +177,7 @@ main(int ac, char **av) ...@@ -177,7 +177,7 @@ main(int ac, char **av)
else else
printf("jobid %u\n", resp->job_id); printf("jobid %u\n", resp->job_id);
run_job_script(resp->job_id); run_job_script(resp->job_id);
slurm_complete_job(resp->job_id); slurm_complete_job(resp->job_id, 0, 0);
if (_verbose || _debug) if (_verbose || _debug)
info ("Spawned srun shell terminated"); info ("Spawned srun shell terminated");
exit (0); exit (0);
...@@ -276,10 +276,10 @@ main(int ac, char **av) ...@@ -276,10 +276,10 @@ main(int ac, char **av)
if (old_job) { if (old_job) {
debug("cancelling job step %u.%u", job->jobid, job->stepid); debug("cancelling job step %u.%u", job->jobid, job->stepid);
slurm_complete_job_step(job->jobid, job->stepid); slurm_complete_job_step(job->jobid, job->stepid, 0, 0);
} else if (!opt.no_alloc) { } else if (!opt.no_alloc) {
debug("cancelling job %u", job->jobid); debug("cancelling job %u", job->jobid);
slurm_complete_job(job->jobid); slurm_complete_job(job->jobid, 0, 0);
} }
exit(0); exit(0);
...@@ -382,7 +382,7 @@ sig_kill_alloc(int signum) ...@@ -382,7 +382,7 @@ sig_kill_alloc(int signum)
static uint32_t job_id = 0; static uint32_t job_id = 0;
if (signum == SIGINT) { /* <Control-C> */ if (signum == SIGINT) { /* <Control-C> */
slurm_complete_job (job_id); slurm_complete_job (job_id, 0, 0);
exit (0); exit (0);
} else if (signum < 0) } else if (signum < 0)
job_id = (uint32_t) (0 - signum); /* kluge to pass the job id */ job_id = (uint32_t) (0 - signum); /* kluge to pass the job id */
...@@ -446,7 +446,7 @@ create_job_step(job_t *job) ...@@ -446,7 +446,7 @@ create_job_step(job_t *job)
return_code_msg_t *rcmsg = (return_code_msg_t *) resp_msg.data; return_code_msg_t *rcmsg = (return_code_msg_t *) resp_msg.data;
error("unable to create job step: %s", error("unable to create job step: %s",
slurm_strerror(rcmsg->return_code)); slurm_strerror(rcmsg->return_code));
slurm_complete_job(job->jobid); slurm_complete_job(job->jobid, 0, rcmsg->return_code);
exit(1); exit(1);
} }
......
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