Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
hpc-team
HPCasCode
Commits
0ebd5a77
Commit
0ebd5a77
authored
3 years ago
by
Andreas Hamacher
Browse files
Options
Downloads
Patches
Plain Diff
adding a slurmctld.prolog
parent
ea6cfadc
No related branches found
No related tags found
1 merge request
!466
adding a slurmctld.prolog
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/slurm-common/files/slurmctld.prolog
+16
-0
16 additions, 0 deletions
roles/slurm-common/files/slurmctld.prolog
roles/slurm-common/tasks/main.yml
+4
-0
4 additions, 0 deletions
roles/slurm-common/tasks/main.yml
with
20 additions
and
0 deletions
roles/slurm-common/files/slurmctld.prolog
0 → 100644
+
16
−
0
View file @
0ebd5a77
#!/bin/sh
JOBID
=
$
SLURM_JOB_ID
if
[
!
-
z
$
SLURM_ARRAY_JOB_ID
];
then
JOBID
=
"${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}"
fi
if
[
"$JOBID"
==
""
];
then
exit
0
fi
CPULINE
=
$
(
scontrol
show
job
$
JOBID
-
dd
2
>&
1
)
if
[
$
?
-
ne
0
];
then
exit
0
fi
COMMENT
=
$
(
echo
-
e
"$CPULINE"
|
perl
-
n
-
e'/.*Nodes=([\w\-\[\],]+) CPU_IDs=([\w\-,]+) Mem=(\w+) GRES=([\w:\(\)\-,]*).*/ && print "|$1|$2|$4|;"'
)
UPDATE
=
$
(
scontrol
update
job
=
$
JOBID
admincomment
=
"$COMMENT"
2
>&
1
)
exit
0
This diff is collapsed.
Click to expand it.
roles/slurm-common/tasks/main.yml
+
4
−
0
View file @
0ebd5a77
...
...
@@ -140,6 +140,10 @@
template
:
src=slurm.epilog.j2 dest=/opt/slurm/etc/slurm.epilog mode=755
become
:
true
-
name
:
install slurmctld prolog
file
:
src=files/slurmctld.prolog dest=/opt/slurm-latest/etc/slurmctld.prolog mode=755
become
:
true
when
:
inventory_hostname in groups.ManagementNodes
-
name
:
setup envirnment variables
template
:
src=slurm_setup.sh.j2 dest=/etc/profile.d/slurm_setup.sh
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment