diff --git a/start_vscode.sh b/start_vscode.sh index da7fa12b770b75153f4f94b505d602a07b0635a6..5f551c86b67004a06b72868da48fdba5458b769b 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