-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprinceKNL.lua
More file actions
43 lines (27 loc) · 971 Bytes
/
princeKNL.lua
File metadata and controls
43 lines (27 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/env lua
local princeKNL = { }
local princeUtils = require "princeUtils"
local slurm_log = princeUtils.slurm_log
local user_log = princeUtils.user_log
local job_desc = nil
local function compute_node_is_OK()
if job_desc.req_nodes ~= nil and job_desc.req_nodes == "phi-01-02" and
job_desc.pn_min_memory > 186*1024 then
user_log("Memory declaration can not be more than 186GB with phi-01-02")
return false
end
return true
end
local function setup_parameters_and_check_is_OK(job_desc_)
job_desc = job_desc_
if job_desc.req_nodes ~= nil then slurm_log("req_nodes: %s", job_desc.req_nodes) end
-- if not compute_node_is_OK() then return false end
-- job_desc.shared = 0
job_desc.qos = "knl"
slurm_log("QoS is reset to: %s", job_desc.qos)
return true
end
-- functions
princeKNL.setup_parameters_and_check_is_OK = setup_parameters_and_check_is_OK
slurm_log("To load princeKNL.lua")
return princeKNL