diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 106b846c3840a8928be7de3d55131864f988211c..38385f47f62dc33be40bfa939978e8f026b7052b 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -495,6 +495,7 @@ The batch script will only be submitted to the controller if the resources necessary to grant its job allocation are immediately available. If the job allocation will have to wait in a queue of pending jobs, the batch script will not be submitted. +NOTE: There is limitted support for this option with batch jobs. .TP \fB\-i\fR, \fB\-\-input\fR=<\fIfilename pattern\fR> diff --git a/doc/man/man3/slurm_allocate_resources.3 b/doc/man/man3/slurm_allocate_resources.3 index 886b8beaf3c9e0fb63fb63fa00c18a794c6852cc..e646152e74d71f53fd361c494eddda4803c30a43 100644 --- a/doc/man/man3/slurm_allocate_resources.3 +++ b/doc/man/man3/slurm_allocate_resources.3 @@ -213,6 +213,8 @@ On success, zero is returned. On error, \-1 is returned, and Slurm error code is .LP \fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re\-link your code. .LP +\fBESLURM_CAN_NOT_START_IMMEDIATELY\fR the job can not be started immeidately as requested. +.LP \fBESLURM_DEFAULT_PARTITION_NOT_SET\fR the system lacks a valid default partition. .LP \fBESLURM_JOB_MISSING_PARTITION_KEY\fR use of this partition is restricted through a credential provided only to user root. This job lacks such a valid credential. diff --git a/slurm/slurm_errno.h b/slurm/slurm_errno.h index e26b5a933d9dacac9ce2bb23fbca9d497cc3b12b..6cc5042932c9a83602a8ba9d79743d318b0200e9 100644 --- a/slurm/slurm_errno.h +++ b/slurm/slurm_errno.h @@ -189,6 +189,7 @@ enum { ESLURM_PARTITION_IN_USE, ESLURM_STEP_LIMIT, ESLURM_JOB_SUSPENDED, + ESLURM_CAN_NOT_START_IMMEDIATELY, /* switch specific error codes, specific values defined in plugin module */ ESLURM_SWITCH_MIN = 3000, diff --git a/src/common/slurm_errno.c b/src/common/slurm_errno.c index 2e71607ced268b12b3136643474f5081d6ddd5ff..e6cd4d84a42587cd5f4a7b6e85b1c50cac7c7f91 100644 --- a/src/common/slurm_errno.c +++ b/src/common/slurm_errno.c @@ -280,6 +280,8 @@ static slurm_errtab_t slurm_errtab[] = { "Step limit reached for this job" }, { ESLURM_JOB_SUSPENDED, "Job is current suspended, requested operation disabled" }, + { ESLURM_CAN_NOT_START_IMMEDIATELY, + "Job can not start immediately" }, /* slurmd error codes */ diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 9b9ccee11dcf94653eb30fe4a1eb1c215a42bf8e..a8471068770866f84d6aee7be07793395965b9fb 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -2639,6 +2639,8 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) false, NULL, 0, uid, &job_ptr); unlock_slurmctld(job_write_lock); END_TIMER2("_slurm_rpc_submit_batch_job"); + if (job_desc_msg->immediate && (error_code != SLURM_SUCCESS)) + error_code = ESLURM_CAN_NOT_START_IMMEDIATELY; } /* return result */