Commit 4657ab94 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Fix bad sbatch het offset output

Bug 6513

First offset is good but second is bad -- didn't request task count.

$ cat etc/job_submit.lua
function slurm_job_submit(job_desc, part_list, submit_uid)
        slurm.log_user("submit1\nstuff")
        slurm.log_user("submit2")
        slurm.log_user("submit3")

    -- slurm.log_user("case 0")
    if job_desc.num_tasks == slurm.NO_VAL or job_desc.num_tasks == nil then
        slurm.log_user("Batch submit error:  Must specify either number of nodes or number of tasks!")
        -- reject the job
        return slurm.ERROR
    end

        return slurm.SUCCESS
end

function slurm_job_modify(job_desc, job_rec, part_list, modify_uid)
        slurm.log_user("modify1")
        slurm.log_user("modify2")
        slurm.log_user("modify3")
        return slurm.SUCCESS
end

slurm.log_user("initialized")
return slurm.SUCCESS

$ sbatch -Ablah2 -n1 --wrap="hostname" : -J asdfl
sbatch: error: 0: initialized
sbatch: error: 0: submit1
sbatch: error: 0: stuff
sbatch: error: 0: submit2
sbatch: error: 0: submit3
sbatch: error: submit1
sbatch: error: stuff
sbatch: error: submit2
sbatch: error: submit3
sbatch: error: Batch submit error:  Must specify either number of nodes or number of tasks!
sbatch: error: Batch job submission failed: Unspecified error

$ sbatch -Ablah2 -n1 --wrap="hostname" : -J asdfl
sbatch: error: 0: initialized
sbatch: error: 0: submit1
sbatch: error: 0: stuff
sbatch: error: 0: submit2
sbatch: error: 0: submit3
sbatch: error: 1: submit1
sbatch: error: 1: stuff
sbatch: error: 1: submit2
sbatch: error: 1: submit3
sbatch: error: 1: Batch submit error:  Must specify either number of nodes or number of tasks!
sbatch: error: Batch job submission failed: Unspecified error

srun already handles this
parent a415b8f6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment