diff --git a/NEWS b/NEWS index 9e0f27e122ee7f29c6db1a70706328a49e1c85f2..44db9a986b3c44a6e21e7baf40db38884d832a18 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,9 @@ documents those changes that are of interest to users and admins. -- If the environment variable is greater than MAX_ENV_STRLEN don't set it in the job env otherwise the exec() fails. -- Optimize scontrol hold/release logic for job arrays. + -- Modify srun to report an exit code of zero rather than nine if some tasks + exit with a return code of zero and others are killed with SIGKILL. Only an + exit code of zero did this. * Changes in Slurm 14.03.0 ========================== diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index ff91439a4c38e9ea82aa8e824ef8bc7d1b4fd5a4..5bdd1537ed018f6cba5033992d3fab7ef6033bd9 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -349,7 +349,7 @@ static void _task_finish(task_exit_msg_t *msg) msg_printed = 1; } } - if (*local_global_rc == 0) + if (*local_global_rc == NO_VAL) *local_global_rc = msg->return_code; } @@ -490,6 +490,7 @@ extern int launch_p_step_launch( task_state = task_state_create(job->ntasks); local_srun_job = job; local_global_rc = global_rc; + *local_global_rc = NO_VAL; first_launch = 1; } else task_state_alter(task_state, job->ntasks); diff --git a/src/plugins/task/cray/task_cray.c b/src/plugins/task/cray/task_cray.c index fa60798ffd848ec8b218d96fbc9f978b098975ec..fa924452f3bb5bf2944ee687ddcab36a208cb60d 100644 --- a/src/plugins/task/cray/task_cray.c +++ b/src/plugins/task/cray/task_cray.c @@ -369,7 +369,7 @@ extern int task_p_post_term (stepd_step_rec_t *job, // Check the result if (status == 0) { // Cancel the job step, since we didn't find the exiting msg - fprintf(stderr, "Terminating job step, task %d improper exit\n", + error("Terminating job step, task %d improper exit", job->envtp->procid); slurm_terminate_job_step(job->jobid, job->stepid); }