Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
slurm-factory
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
slurm-factory
Merge requests
!3
style: use variable instead of hardcoded
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
style: use variable instead of hardcoded
style-use-variable
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Bo-Chun Chen
requested to merge
style-use-variable
into
main
4 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#3 (closed)
👍
1
👎
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
eddf21f4
1 commit,
4 months ago
1 file
+
5
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
etc/slurm/job_submit.lua
+
5
−
2
Options
@@ -26,6 +26,9 @@ local grp = require("posix").grp
function
slurm_job_submit
(
job_desc
,
part_list
,
submit_uid
)
local
target_group
=
"gpfs5"
local
target_feature
=
"gpfs5"
local
default_feature
=
"gpfs4"
local
username
=
pwd
.
getpwuid
(
submit_uid
).
pw_name
local
group_member
=
grp
.
getgrnam
(
target_group
).
gr_mem
local
found
=
false
@@ -35,12 +38,12 @@ function slurm_job_submit(job_desc, part_list, submit_uid)
for
i
,
member
in
ipairs
(
group_member
)
do
if
member
==
username
then
found
=
true
job_desc
.
features
=
"gpfs5"
job_desc
.
features
=
target_feature
break
end
end
if
not
found
then
job_desc
.
features
=
"gpfs4"
job_desc
.
features
=
default_feature
end
slurm
.
log_info
(
"username:"
..
username
)
Loading