Stacks Image 16072

For Academics

Cluster tips

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/ [email protected]


Setup profile for each cluster

Allows to quickly start a new connection

Preferences > Profiles > plus button

General tab

  • name (cluster name)
  • shortcut key (Ctrl-Cmd-2)
  • Command (Login Shell ssh [email protected])
  • 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

Advanced tab

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 .bashrc



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

seff -jobID

Set vim as default (used in broot)

export VISUAL=vim;
export EDITOR=vim;

Other slurm commands

Information on available resources


Usage by user

sreport user top start=0101 end=0201 TopCount=50 -t hourper --tres=cpu,gpu

report user top start=0101 end=0201 TopCount=50 -t hourper --tres=mem
Previous Post 8 / 47 Post


Sex chromosome twitter bot

Mimulus twitter bot

Silene twitter bot

I setup the sexChr_papers twitter bot following Rob Lanfear's instructions.

I am interested in papers on sex chromosome evolution, and thus remove medical search terms. The pubmed search is sex chromosome NOT aneuploidy NOT patient? NOT chronic NOT acute NOT clinical NOT prenatal NOT diagnostic NOT congenital NOT infant? NOT syndrome NOT trisom* NOT sperm.

Casey Bergman is gathering literature Twitter bots here.