Created
April 27, 2018 09:33
-
-
Save DSuveges/6930326e59efe11e36071e25896bd9cf to your computer and use it in GitHub Desktop.
This little function opens an interactive shell on a computing node with a given amount of memory.
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
function getInteractiveJob (){ | |
MEMLIM=1000 | |
DEFAULTSHELL=$(which bash) | |
if [[ ! -z "${1}" ]]; then | |
MEMLIM=$(( $1 * 1000 )) | |
fi | |
# Submitting a request to get interactive shell: | |
bsub -M${MEMLIM} -R"select[mem>${MEMLIM}] rusage[mem=${MEMLIM}]" -Ip "${DEFAULTSHELL}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment