Dry run and going live - KasperSkytte/slurmjobpacker GitHub Wiki
Dry run and going live
Dry run
As any user, no config needed:
cd /opt/slurmjobpacker
python3 -m sjp.daemon --dry-run --state-dir ~/sjp-dry
tail -f ~/sjp-dry/sjp.log
Logs, per new job, where Slurm put it and where sjp would have, plus every action it would take (command and reason). Nothing is changed:
--dry-runforcesobserve;- outside
enforce, onlyscontrol show,squeue,sacctmgr -nP showandsacctcan run; - the table goes to
policy.dryrun.lua, which the plugin doesn't read.
Summary: python3 -m sjp.report ~/sjp-dry/decisions.jsonl --summary.
Going live
- Run
sjpdinobserve(no table is written;sjp.place()returns"no table"). - Add
sjp.place()tojob_submit.lua, ensureJobSubmitPlugins=lua,scontrol reconfigure. mode = "advise", restartsjpd: partitions are chosen.mode = "enforce", restartsjpd: pins, rechecks, widening and QOS limits too.
Backing out
touch /etc/sjp/disable:sjp.place()returnsfalsefrom the next submission.mode = "observe"+ restart: the plugin sees stale data within seconds; raised caps are restored on stop.- Remove the
sjp.place()call.
Release remaining pins by hand:
for j in $(squeue -h -t PD -o %i); do
c=$(scontrol show job $j | grep -o 'AdminComment=sjp:pin=[^ ]*') || continue
from=$(echo "$c" | grep -o 'from=[^;]*'); from=${from#from=}
scontrol update jobid=$j reqnodelist= && scontrol update jobid=$j partition=$from
done