Skip to content

unkaktus/robin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง robin

robin is a tool for easy job managment on HPC like referencing by name, logging, logging into nodes.

Works on Slurm, PBSPro, and tmux.

Binary installation

  1. In case you don't have internet access there, you can use mitten (https://github.com/unkaktus/mitten).

  2. Download and install the robin binary:

curl -L -o robin https://github.com/unkaktus/robin/releases/latest/download/robin-linux-amd64
mkdir -p ~/bin
mv robin ~/bin/
chmod +x ~/bin/robin
  1. Add $HOME/bin into your $PATH into your .bashrc:
export PATH="$HOME/bin:$PATH"

Manual building

  1. Install Go (https://go.dev)

  2. Build robin for Linux:

git clone https://github.com/unkaktus/robin
cd robin/cmd/robin
env GOOS=linux GOARCH=amd64 go build
  1. scp the robin binary to your favorite supercomp and add it to your $PATH.

Example uses

List jobs

$ robin list
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚         NAME          โ”‚  STATE  โ”‚ QUEUE โ”‚          TIME           โ”‚ NODES โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Compare_Apples        โ”‚ R [0]   โ”‚ small โ”‚ [8%] 2h0m41s/24h0m0s    โ”‚     8 โ”‚
โ”‚ Compare_Oranges       โ”‚ Q [0]   โ”‚ small โ”‚ [0%] 0s/20h0m0s         โ”‚     2 โ”‚
โ”‚ Compare_Bananas       โ”‚ F [9]   โ”‚ small โ”‚ [0%] 0s/20h0m0s         โ”‚    16 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Logs

Open full logs in $EDITOR (defauts to vim):

$ robin logs Compare_Apples

Follow the log tail of a job:

$ robin logs -f Compare_Apples

Shell

To connect to the shell on the job nodes, you first need to start your job binary via robin nest:

export MPI_SHEPHERD=true # Needed for PBSPro
[mpirun -n 16] robin nest ./exe/binary

Then, to connect to the shell of the node 1 (starting from 0) of running job Compare_Apples:

$ robin shell Compare_Apples/1
node123$

Exec

Using robin exec, you can execute a single command on the job nodes:

$ robin exec Compare_Apples/4 "ps aux"
  PID TTY           TIME CMD
 9993 ttys000    0:00.05 compare_apples

Stopping jobs

Cancel job Compare_Apples:

$ robin cancel Compare_Apples

Port forwarding

Forward a port to the node of a job:

$ robin port-forward -p 11111 -m supercomp compare_apples

Changing directory to the job root

You might want to add the following function to your .bashrc, that will bring you to the directory from which the job was submitted:

cdj () {
        cd $(robin list --json | jq -r '.[] | select(.Name=="'$1'").WorkingDirectory')
}

Note that it requires jq.

About

๐Ÿง Productive batch job management

Resources

License

Stars

Watchers

Forks

Packages

No packages published