Ticket 1364

Summary: Default constraints
Product: Slurm Reporter: Marco Passerini <marco.passerini>
Component: SchedulingAssignee: David Bigagli <david>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 5 - Enhancement    
Priority: --- CC: brian, da
Version: 14.11.2   
Hardware: Linux   
OS: Linux   
Site: CSC - IT Center for Science Slinky Site: ---
Alineos Sites: --- Atos/Eviden Sites: ---
Confidential Site: --- Coreweave sites: ---
Cray Sites: --- DS9 clusters: ---
Google sites: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- NoveTech Sites: ---
Nvidia HWinf-CS Sites: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Tzag Elita Sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed:
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Marco Passerini 2015-01-13 23:09:06 MST
We would like to use the sbatch --constraint option to specify the processor architecture within a single partition.
However, we would like to have one of the two available options set by default. Is this possible in the Slurm configuration? Or do we need to develop a job submit plugin in order to do it?
Comment 1 Marco Passerini 2015-01-14 01:00:07 MST
Well, I got it somehow working with the job_submit.lua plugin, it was quite easy:

function slurm_job_submit ( job_desc, part_list, submit_uid )
        setmetatable (job_desc, job_req_meta)
        local part_rec = _build_part_table (part_list)

        if not job_desc.features and job_desc.partition=="parallel" then
          job_desc.features="sandybridge"
        end

        return 0
end



Let me know though if there's a way to specify the default in some other way.
Comment 2 Moe Jette 2015-01-14 02:12:06 MST
(In reply to Marco Passerini from comment #1)
> Well, I got it somehow working with the job_submit.lua plugin, it was quite
> easy:
> 
> function slurm_job_submit ( job_desc, part_list, submit_uid )
>         setmetatable (job_desc, job_req_meta)
>         local part_rec = _build_part_table (part_list)
> 
>         if not job_desc.features and job_desc.partition=="parallel" then
>           job_desc.features="sandybridge"
>         end
> 
>         return 0
> end
> 
> 
> 
> Let me know though if there's a way to specify the default in some other way.

That is your best solution. It is the same mechanism used by NASA Goddard for the same purpose.