Created
May 22, 2014 10:21
-
-
Save tleonardi/3dba464b4d69b889751c to your computer and use it in GitHub Desktop.
Wrapper script to run Vim-R-plugin R sessions as interactive jobs on LSF platforms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wrapper script to run Vim-R-plugin R sessions as interactive jobs on LSF platforms. | |
# To use it, edit ~/.vimrc and add 'let vimrplugin_r_path = <path_to_script>' | |
# lets you deicde | |
echo What version of R do you want? | |
echo "1) R vX.X.X" | |
echo "2) R vZ.Z.Z" | |
echo "3) R vY.Y.Y" | |
read -t 60 -p '>' answer | |
if [[ "$answer" == '2' ]]; then | |
R=<path to R Z.Z.Z> | |
elif [[ "$answer" == '3' ]]; then | |
R=<path to R Y.Y.Y> | |
else | |
R=<path to R X.X.X> | |
fi | |
echo How much memory do you want? | |
echo "1) 1GB" | |
echo "2) 5GB" | |
echo "3) 20GB" | |
read -t 10 -p '>' mem | |
if [[ "$mem" == '3' ]]; then | |
bsub -q research-rh6 -M 20000 -R 'rusage[mem=20000]' -XF -Is $R | |
elif [[ "$mem" == '2' ]]; then | |
bsub -q research-rh6 -M 5000 -R 'rusage[mem=5000]' -XF -Is $R | |
else | |
bsub -q research-rh6 -M 1000 -R 'rusage[mem=1000]' -XF -Is $R | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment