robin
is a tool for easy job managment on HPC like referencing by name, logging, logging into nodes.
Works on Slurm, PBSPro, and tmux.
-
In case you don't have internet access there, you can use
mitten
(https://github.com/unkaktus/mitten). -
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
- Add
$HOME/bin
into your$PATH
into your.bashrc
:
export PATH="$HOME/bin:$PATH"
-
Install Go (https://go.dev)
-
Build
robin
for Linux:
git clone https://github.com/unkaktus/robin
cd robin/cmd/robin
env GOOS=linux GOARCH=amd64 go build
scp
therobin
binary to your favorite supercomp and add it to your$PATH
.
$ 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 │
╰───────────────────────┴─────────┴───────┴─────────────────────────┴───────╯
Open full logs in $EDITOR
(defauts to vim
):
$ robin logs Compare_Apples
Follow the log tail of a job:
$ robin logs -f Compare_Apples
To connect to the shell on the job nodes, you first need
to start your job binary via robin nest
:
[mpirun -n 16] robin nest ./exe/binary
For nest
on PBS Pro, you need to export the following variable
inside your job:
export MPI_SHEPHERD=true
Then, to connect to the shell of the node 1 of running job Compare_Apples
:
$ robin shell Compare_Apples 1
node123$
Cancel job Compare_Apples
:
$ robin cancel Compare_Apples
Start a portable job using compare_apples.begin
file
and configuration file data.csv
for the run:
$ robin begin -f compare_apples.begin data.csv
This requires to have robin
to be installed and
added to the PATH
there.
Forward a port to the node of a job:
$ robin port-forward -p 11111 -m supercomp compare_apples
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
.