From 223002a32f81d8b178e0a5455c489624c8c91a39 Mon Sep 17 00:00:00 2001 From: "G. Edward Marti" Date: Fri, 2 Jun 2023 15:49:49 -0700 Subject: [PATCH 1/2] Added CPUS_PER_TASK to setup.sh and start.sh New parameter CPUS_PER_TASK specificies the number of cpus requested. --- setup.sh | 4 +++- start.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 60bfe13..be35a4a 100755 --- a/setup.sh +++ b/setup.sh @@ -90,8 +90,10 @@ MEM=20G TIME=8:00:00 +CPUS_PER_TASK=1 + +for var in FORWARD_USERNAME PORT PARTITION RESOURCE MEM TIME CPUS_PER_TASK CONTAINERSHARE MACHINEPREFIX DOMAINNAME USE_LSOF ISOLATEDCOMPUTENODE CONNECTION_WAIT_SECONDS -for var in FORWARD_USERNAME PORT PARTITION RESOURCE MEM TIME CONTAINERSHARE MACHINEPREFIX DOMAINNAME USE_LSOF ISOLATEDCOMPUTENODE CONNECTION_WAIT_SECONDS do echo "$var="'"'"$(eval echo '$'"$var")"'"' done >> params.sh diff --git a/start.sh b/start.sh index facaffe..bd5389f 100755 --- a/start.sh +++ b/start.sh @@ -58,6 +58,7 @@ command="sbatch --error=$RESOURCE_HOME/forward-util/$SBATCH_NAME.err --mem=$MEM --time=$TIME + --cpus-per-task=$CPUS_PER_TASK $RESOURCE_HOME/forward-util/$SBATCH_NAME $PORT \"${@:2}\"" echo ${command} From fc8e799c76664c95a14b05be3ea8c5a418ee42a9 Mon Sep 17 00:00:00 2001 From: "G. Edward Marti" Date: Fri, 2 Jun 2023 15:50:38 -0700 Subject: [PATCH 2/2] Added jupyter lab sbatch File sbatches/sherlock/jupyterlab.sbatch enables more modern jupyter lab notebooks --- sbatches/sherlock/jupyterlab.sbatch | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 sbatches/sherlock/jupyterlab.sbatch diff --git a/sbatches/sherlock/jupyterlab.sbatch b/sbatches/sherlock/jupyterlab.sbatch new file mode 100755 index 0000000..3a306ac --- /dev/null +++ b/sbatches/sherlock/jupyterlab.sbatch @@ -0,0 +1,9 @@ +#!/bin/bash + +PORT=$1 +NOTEBOOK_DIR=$2 +cd $NOTEBOOK_DIR + +module load python/3.6.1 +module load nodejs/9.5.0 +jupyter lab --no-browser --port=$PORT