Skip to content
Snippets Groups Projects
Commit 7fcfe519 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'PrologSlurmctld' into 'master'

adding a slurmctld.prolog

See merge request !466
parents 20d04f86 0ebd5a77
No related branches found
No related tags found
1 merge request!466adding a slurmctld.prolog
#!/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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment