Skip to content

Instantly share code, notes, and snippets.

@cra
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save cra/f6e79bf25135df0f6557 to your computer and use it in GitHub Desktop.

Select an option

Save cra/f6e79bf25135df0f6557 to your computer and use it in GitHub Desktop.
$ squeue -u andrey | awk '{print $1}' | grep -v 'JOBID' > /tmp/andrey_pending_jobs
for jid in ` squeue -u igomo | awk '{print $1}' | xargs grep -v 'JOBID' `
do
scontrol update Dependency=after:`cat /tmp/andrey_pending_jobs | tr '\n' ':' | sed 's/.$//'` JobId=${jid}
done
# .bashrc aliases
go2workdir ()
{
WorkDir=`scontrol show jobid $1 | grep WorkDir= | awk -F'=' '{print $2}'`
cd $WorkDir
}
function tell_me_more_about()
{
scontrol show job $1
}
function srename()
{
echo "Update job $1: change name to $2"
scontrol update Name=$2 JobId=$1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment