Ticket 1364 - Default constraints
Summary: Default constraints
Status: RESOLVED INFOGIVEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Scheduling (show other tickets)
Version: 14.11.2
Hardware: Linux Linux
: 5 - Enhancement
Assignee: David Bigagli
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2015-01-13 23:09 MST by Marco Passerini
Modified: 2015-01-14 02:12 MST (History)
2 users (show)

See Also:
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: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
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.