Skip to content

Instantly share code, notes, and snippets.

@jnhutchinson
Forked from tleonardi/bobR.sh
Last active August 29, 2015 14:20
Show Gist options
  • Save jnhutchinson/ff65601ab503189d1192 to your computer and use it in GitHub Desktop.
Save jnhutchinson/ff65601ab503189d1192 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Wrapper script to run Vim-R-plugin R sessions as interactive jobs on FAS RC Odyssey SLURM platform.
# To use it, edit ~/.vimrc and add 'let vimrplugin_r_path = <path_to_script>'
echo How much memory do you want?
echo "1) 4GB"
echo "2) 8GB"
echo "3) 16GB"
echo "4) 32GB"
echo "5) 64GB"
echo "6) 128GB"
read -t 10 -p '>' mem
if [[ "$mem" == '1' ]]; then
srun -t 720 -p interact --mem=4000 --pty R
elif [[ "$mem" == '2' ]]; then
srun -t 720 -p interact --mem=8000 --pty R
elif [[ "$mem" == '3' ]]; then
srun -t 720 -p interact --mem=16000 --pty R
elif [[ "$mem" == '4' ]]; then
srun -t 720 -p interact --mem=32000 --pty R
elif [[ "$mem" == '5' ]]; then
srun -t 720 -p interact --mem=64000 --pty R
else
srun -t 720 -p interact --mem=128000 --pty R
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment