Cluster usage tips for Mac.
Remove need for password
This is particularly useful for the speedy click-to-download iTerm2 integration.
Full instructions here.
Briefly, generate key
ssh-keygen -t rsa
(leave passphrase empty)
Upload to host
ssh-copy-id -i ~/.ssh/id_rsa.pub email@example.com
Setup profile for each cluster
Allows to quickly start a new connection
Preferences > Profiles > plus button
- name (cluster name)
- shortcut key (Ctrl-Cmd-2)
- Command (Login Shell
- Working directory (Home directory)
Colors tab - choose a colour scheme to uniquely identify it from a local terminal
Keys tab > presets > Natural text editing - Allows to navigate with alt-arrow, cmd-arrow and insert
# in vim
Code your own commands accessible by clicking terminal selections. For example to allow to sftp to a file through BBEdit (this is not needed anymore. Simply right click on any file and it opens in default app on your Mac):
Smart selection > Word bounded by whitespace > edit actions
make a new one
- Title - Open in BBEdit
- Action - Run Command...
- parameter -
/usr/bin/open -a BBEdit sftp://\u@\h/\d//\0
Install iTerm integration
log in to cluster
iTerm2 > install Shell integration
Allows to click to download files shown on screen and Alt-drag files from the mac to the iTerm2 window to upload them to current folder.
You can use tmux -CC to control tmux through iTerm2.
- Cmd-D vertical split
- Cmd-Shift-D horizontal split
- Cmd-Ctrl-Shift-Enter Manage sessions
Shell integration is unstable in remote tmux sessions, thus turned off by default. It was too unstable for me. Nevertheless, to turn on, add to your
Useful commands for slurm
start interactive job
alias int="srun --time=4:00:00 --ntasks=1 --nodes=1 --partition=sixhour --pty /bin/bash -l"
Queue of your jobs only (edit "user")
alias sq="squeue -u user"
queue of (inaccurately) estimated start time of your jobs only (edit "user")
alias sqs="squeue -u user --start"
Available processors in queue of choice
sp="sinfo -o%C --partition QUEUE"
Available memory in queue of choice
sm="sinfo -o%e --partition QUEUE"
Completed job information to make efficient usage of future jobs
Set vim as default (used in broot)
export VISUAL=vim; export EDITOR=vim;
Other slurm commands
Information on available resources