๐ง spanner ๐ง
spanner
is a tool for easy job managment on HPC like referencing by name, logging, logging into nodes.
Works across Slurm and PBSPro.
Easy installation using Mamba
Install MambaForge on your cluster. In case you don't
have internet access there, you can use mitten
(https://github.com/unkaktus/mitten).
Then, install spanner
itself:
mamba install -c https://mamba.unkaktus.art spanner
Installation using Go
-
Install MambaForge on your cluster. In case you don't
have internet access there, you can use mitten
(https://github.com/unkaktus/mitten).
-
Install Go
mamba install go
- Install
spanner
:
go install github.com/unkaktus/spanner/cmd/spanner@latest
- Add
$HOME/go/bin
into your $PATH
into your .bashrc
:
export PATH="$HOME/go/bin:$PATH"
Manual building
-
Install Go (https://go.dev)
-
Build spanner
for Linux:
git clone https://github.com/unkaktus/spanner
cd spanner/cmd/spanner
env GOOS=linux GOARCH=amd64 go build
scp
the spanner
binary to your favorite supercomp and add it to your $PATH
.
Example uses
List jobs
$ spanner 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
):
$ spanner logs Compare_Apples
Follow the log tail of a job:
$ spanner logs -f Compare_Apples
Shell
To connect to the shell on the job nodes, you first need
to start your job binary via spanner tent
:
[mpirun -n 16] spanner tent ./exe/binary
Then, to connect to the shell of the node 1 of running job Compare_Apples
:
$ spanner shell Compare_Apples 1
node123$
Stopping jobs
Cancel job Compare_Apples
:
$ spanner cancel Compare_Apples
Portable jobs
Start a portable job using compare_apples.begin
file
and configuration file data.csv
for the run:
$ spanner begin -f compare_apples.begin data.csv
Remote commands
Do all above without logging manually to the cluster:
$ spanner on supercomp list
$ spanner on supercomp shell compare_apples
This requires to have spanner
to be installed and
added to the PATH
there.
Port forwarding
Forward a port to the node of a job:
$ spanner port-forward -p 11111 -m supercomp compare_apples