From f992d48484a9582cb923c64746de5a1af6d465b3 Mon Sep 17 00:00:00 2001
From: Mike Boss <mboss@ethz.ch>
Date: Wed, 27 Apr 2022 17:02:17 +0200
Subject: [PATCH] Rename BJOB_* variables to VSC_BJOB_*

---
 start_vscode.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/start_vscode.sh b/start_vscode.sh
index da7fa12..5f551c8 100755
--- a/start_vscode.sh
+++ b/start_vscode.sh
@@ -298,7 +298,7 @@ ENDSSH
 # run the code-server job on Euler and save the ip of the compute node in the file vscip in the home directory of the user on Euler
 echo -e "Connecting to $VSC_HOSTNAME to start the code-server in a batch job"
 
-BJOB_OUT=$(ssh $VSC_SSH_OPT bsub -n $VSC_NUM_CPU -W $VSC_RUN_TIME -R "rusage[mem=$VSC_MEM_PER_CPU_CORE]" $VSC_SNUM_GPU<<ENDBSUB
+VSC_BJOB_OUT=$(ssh $VSC_SSH_OPT bsub -n $VSC_NUM_CPU -W $VSC_RUN_TIME -R "rusage[mem=$VSC_MEM_PER_CPU_CORE]" $VSC_SNUM_GPU<<ENDBSUB
 module load $VSC_MODULE_COMMAND
 export XDG_RUNTIME_DIR="\$HOME/vsc_runtime"
 VSC_IP_REMOTE="\$(hostname -i)"
@@ -307,7 +307,7 @@ code-server --bind-addr=\${VSC_IP_REMOTE}:8899
 ENDBSUB
 )
 
-BJOB_ID=$(echo $BJOB_OUT | awk '/is submitted/{print substr($2, 2, length($2)-2);}')
+VSC_BJOB_ID=$(echo $BJOB_OUT | awk '/is submitted/{print substr($2, 2, length($2)-2);}')
 
 # wait until batch job has started, poll every $VSC_WAITING_INTERVAL seconds to check if /cluster/home/$VSC_USERNAME/vscip exists
 # once the file exists and is not empty the batch job has started
-- 
GitLab